[update] 撤回了之前的部分代码,为自动收纳新增了安道系列,艺云和MAXHUB等,添加了DPIChangeDetection和ResolutionChangeDetection,修改了PPT的部分检测行为,还有一些更改忘了。

This commit is contained in:
Dubi906w 2024-06-12 21:04:10 +08:00
parent 17298a1899
commit e99983a8c6
21 changed files with 735 additions and 205 deletions

View File

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
namespace Ink_Canvas.Helpers
{
internal class DelayAction
{
Timer _timerDebounce;
/// <summary>
/// 防抖函式
/// </summary>
/// <param name="inv">同步的對象一般傳入控件不需要可null</param>
public void DebounceAction(int timeMs, ISynchronizeInvoke inv, Action action)
{
lock (this) {
if (_timerDebounce == null) {
_timerDebounce = new Timer(timeMs) { AutoReset = false };
_timerDebounce.Elapsed += (o, e) => {
_timerDebounce.Stop(); _timerDebounce.Close(); _timerDebounce = null;
InvokeAction(action, inv);
};
}
_timerDebounce.Stop();
_timerDebounce.Start();
}
}
private static void InvokeAction(Action action, ISynchronizeInvoke inv)
{
if (inv == null)
{
action();
}
else
{
if (inv.InvokeRequired)
{
inv.Invoke(action, null);
}
else
{
action();
}
}
}
}
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Interop;
using System.Windows;
namespace Ink_Canvas.Helpers {
internal class IsOutsideOfScreenHelper {
public static bool IsOutsideOfScreen(FrameworkElement target) {
var hwndSource = (HwndSource)PresentationSource.FromVisual(target);
if (hwndSource is null) {
return true;
}
var hWnd = hwndSource.Handle;
var targetBounds = GetPixelBoundsToScreen(target);
var screens = System.Windows.Forms.Screen.AllScreens;
return !screens.Any(x => x.Bounds.IntersectsWith(targetBounds));
System.Drawing.Rectangle GetPixelBoundsToScreen(FrameworkElement visual) {
var pixelBoundsToScreen = Rect.Empty;
pixelBoundsToScreen.Union(visual.PointToScreen(new Point(0, 0)));
pixelBoundsToScreen.Union(visual.PointToScreen(new Point(visual.ActualWidth, 0)));
pixelBoundsToScreen.Union(visual.PointToScreen(new Point(0, visual.ActualHeight)));
pixelBoundsToScreen.Union(visual.PointToScreen(new Point(visual.ActualWidth, visual.ActualHeight)));
return new System.Drawing.Rectangle(
(int)pixelBoundsToScreen.X, (int)pixelBoundsToScreen.Y,
(int)pixelBoundsToScreen.Width, (int)pixelBoundsToScreen.Height);
}
}
}
}

View File

@ -189,7 +189,10 @@
<Resource Include="Resources\DeveloperAvatars\RaspberryKan.jpg" /> <Resource Include="Resources\DeveloperAvatars\RaspberryKan.jpg" />
<Resource Include="Resources\DeveloperAvatars\wwei.png" /> <Resource Include="Resources\DeveloperAvatars\wwei.png" />
<Resource Include="Resources\DeveloperAvatars\yuwenhui2020.png" /> <Resource Include="Resources\DeveloperAvatars\yuwenhui2020.png" />
<Resource Include="Resources\Icons-png\AdmoxBooth.png" />
<Resource Include="Resources\Icons-png\AdmoxWhiteboard.png" />
<Resource Include="Resources\Icons-png\check-box-background.png" /> <Resource Include="Resources\Icons-png\check-box-background.png" />
<Resource Include="Resources\Icons-png\Donview.png" />
<Resource Include="Resources\Icons-png\EasiNote3.png" /> <Resource Include="Resources\Icons-png\EasiNote3.png" />
<Resource Include="Resources\Icons-png\eraser-line.png" /> <Resource Include="Resources\Icons-png\eraser-line.png" />
<Resource Include="Resources\Icons-png\eraser-outline.png" /> <Resource Include="Resources\Icons-png\eraser-outline.png" />
@ -203,6 +206,7 @@
<Resource Include="Resources\Icons-png\kuandoujiyanhuaji.png" /> <Resource Include="Resources\Icons-png\kuandoujiyanhuaji.png" />
<Resource Include="Resources\Icons-png\kuanneikuhuaji.png" /> <Resource Include="Resources\Icons-png\kuanneikuhuaji.png" />
<Resource Include="Resources\Icons-png\kuanshounvhuaji.png" /> <Resource Include="Resources\Icons-png\kuanshounvhuaji.png" />
<Resource Include="Resources\Icons-png\MaxHubWhiteboard.png" />
<Resource Include="Resources\Icons-png\playCircle.png" /> <Resource Include="Resources\Icons-png\playCircle.png" />
<Resource Include="Resources\Icons-png\redo.png" /> <Resource Include="Resources\Icons-png\redo.png" />
<Resource Include="Resources\Icons-png\setting.png" /> <Resource Include="Resources\Icons-png\setting.png" />
@ -323,6 +327,8 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\Icons-Fluent\ic_fluent_people_24_regular.png" /> <Resource Include="Resources\Icons-Fluent\ic_fluent_people_24_regular.png" />
<Resource Include="Resources\Icons-png\WenXiang.png" /> <Resource Include="Resources\Icons-png\WenXiang.png" />
<Resource Include="Resources\Icons-png\YiYunVisualPresenter.png" />
<Resource Include="Resources\Icons-png\YiYunWhiteboard.png" />
<Resource Include="Resources\new-icons\chevron-left.png" /> <Resource Include="Resources\new-icons\chevron-left.png" />
<Resource Include="Resources\new-icons\end-slides-show.png"> <Resource Include="Resources\new-icons\end-slides-show.png">
<CopyToOutputDirectory></CopyToOutputDirectory> <CopyToOutputDirectory></CopyToOutputDirectory>
@ -478,6 +484,9 @@
<None Remove="Resources\DeveloperAvatars\RaspberryKan.jpg" /> <None Remove="Resources\DeveloperAvatars\RaspberryKan.jpg" />
<None Remove="Resources\DeveloperAvatars\wwei.png" /> <None Remove="Resources\DeveloperAvatars\wwei.png" />
<None Remove="Resources\DeveloperAvatars\yuwenhui2020.png" /> <None Remove="Resources\DeveloperAvatars\yuwenhui2020.png" />
<None Remove="Resources\Icons-png\AdmoxBooth.png" />
<None Remove="Resources\Icons-png\AdmoxWhiteboard.png" />
<None Remove="Resources\Icons-png\Donview.png" />
<None Remove="Resources\Icons-png\EasiNote3.png" /> <None Remove="Resources\Icons-png\EasiNote3.png" />
<None Remove="Resources\Icons-png\HiteAnnotation.png" /> <None Remove="Resources\Icons-png\HiteAnnotation.png" />
<None Remove="Resources\Icons-png\HiteLightBoard.png" /> <None Remove="Resources\Icons-png\HiteLightBoard.png" />
@ -490,9 +499,12 @@
<None Remove="Resources\Icons-png\kuandoujiyanhuaji.png" /> <None Remove="Resources\Icons-png\kuandoujiyanhuaji.png" />
<None Remove="Resources\Icons-png\kuanneikuhuaji.png" /> <None Remove="Resources\Icons-png\kuanneikuhuaji.png" />
<None Remove="Resources\Icons-png\kuanshounvhuaji.png" /> <None Remove="Resources\Icons-png\kuanshounvhuaji.png" />
<None Remove="Resources\Icons-png\MaxHubWhiteboard.png" />
<None Remove="Resources\Icons-png\tiebahuaji.png" /> <None Remove="Resources\Icons-png\tiebahuaji.png" />
<None Remove="Resources\Icons-png\transparent-grid.png" /> <None Remove="Resources\Icons-png\transparent-grid.png" />
<None Remove="Resources\Icons-png\WenXiang.png" /> <None Remove="Resources\Icons-png\WenXiang.png" />
<None Remove="Resources\Icons-png\YiYunVisualPresenter.png" />
<None Remove="Resources\Icons-png\YiYunWhiteboard.png" />
<None Remove="Resources\new-icons\chevron-left.png" /> <None Remove="Resources\new-icons\chevron-left.png" />
<None Remove="Resources\new-icons\end-slides-show.png" /> <None Remove="Resources\new-icons\end-slides-show.png" />
<None Remove="Resources\new-icons\eye.png" /> <None Remove="Resources\new-icons\eye.png" />

View File

@ -25,9 +25,11 @@
MouseWheel="Window_MouseWheel" MouseWheel="Window_MouseWheel"
Foreground="Black" Foreground="Black"
SizeChanged="MainWindow_OnSizeChanged" SizeChanged="MainWindow_OnSizeChanged"
MouseMove="MainWindow_OnMouseMove"
Stylus.IsPressAndHoldEnabled="False" Stylus.IsPressAndHoldEnabled="False"
Stylus.IsFlicksEnabled="False" Stylus.IsFlicksEnabled="False"
Stylus.IsTapFeedbackEnabled="False" Stylus.IsTapFeedbackEnabled="False"
DpiChanged="MainWindow_OnDpiChanged"
Stylus.IsTouchFeedbackEnabled="False"> Stylus.IsTouchFeedbackEnabled="False">
<!--资源中添加命令--> <!--资源中添加命令-->
<Window.Resources> <Window.Resources>
@ -893,7 +895,8 @@
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</Border> </Border>
<ui:ToggleSwitch OnContent="" OffContent="" <ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchIsEnableFullScreenHelper" Toggled="ToggleSwitchIsEnableFullScreenHelper_Toggled" Name="ToggleSwitchIsEnableFullScreenHelper"
Toggled="ToggleSwitchIsEnableFullScreenHelper_Toggled"
IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" /> IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa" <TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
@ -923,7 +926,8 @@
</TextBlock> </TextBlock>
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</Border> </Border>
<ui:ToggleSwitch OnContent="" OffContent="" Toggled="ToggleSwitchIsEnableEdgeGestureUtil_Toggled" <ui:ToggleSwitch OnContent="" OffContent=""
Toggled="ToggleSwitchIsEnableEdgeGestureUtil_Toggled"
Name="ToggleSwitchIsEnableEdgeGestureUtil" IsOn="True" Name="ToggleSwitchIsEnableEdgeGestureUtil" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" /> FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
@ -959,12 +963,77 @@
</TextBlock> </TextBlock>
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</Border> </Border>
<ui:ToggleSwitch OnContent="" OffContent="" Toggled="ToggleSwitchIsEnableForceFullScreen_Toggled" <ui:ToggleSwitch OnContent="" OffContent=""
Toggled="ToggleSwitchIsEnableForceFullScreen_Toggled"
Name="ToggleSwitchIsEnableForceFullScreen" IsOn="True" Name="ToggleSwitchIsEnableForceFullScreen" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" /> FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa" <TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
Text="# 当检测到窗口大小变化时自动使用Win32API将本窗口的大小设置为主显示器大小设备像素大小不需要可以关闭实时生效。" /> Text="# 当检测到窗口大小变化时自动使用Win32API将本窗口的大小设置为主显示器大小设备像素大小不需要可以关闭实时生效。" />
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="启用DPIChangeDetection"
VerticalAlignment="Center"
FontSize="14" Margin="0,0,6,0" />
<Border Height="20" CornerRadius="3" Background="#7f1d1d" Margin="0,0,12,0"
Padding="4,0">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="3"
VerticalAlignment="Center">
<Image Width="15" Height="15" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#fca5a5"
Geometry="F1 M24,24z M0,0z M20.1758,20.0951L15.1058,9.97512C15.0358,9.83512,14.9958,9.68512,14.9958,9.52512L14.9958,2.99512 15.4958,2.99512C16.0458,2.99512 16.4958,2.54512 16.4958,1.99512 16.4958,1.44512 16.0458,0.995117 15.4958,0.995117L8.49582,0.995117C7.94582,0.995117 7.49582,1.44512 7.49582,1.99512 7.49582,2.54512 7.94582,2.99512 8.49582,2.99512L8.99582,2.99512 8.99582,9.52512C8.99582,9.67512,8.95582,9.83512,8.89582,9.97512L3.82582,20.0951C3.67582,20.4051 3.59582,20.7451 3.61582,21.0851 3.62582,21.4251 3.73582,21.7651 3.91582,22.0551 4.09582,22.3451 4.34582,22.5851 4.64582,22.7551 4.94582,22.9151 5.27582,23.0051 5.60582,23.0051L18.3758,23.0051C18.7558,23.0051 19.0558,22.9251 19.3558,22.7551 19.6558,22.5851 19.9058,22.3451 20.0858,22.0551 20.2658,21.7651 20.3658,21.4351 20.3858,21.0851 20.3958,20.7451 20.3258,20.4051 20.1758,20.1051L20.1758,20.0951z M10.6858,10.8651C10.8958,10.4451,11.0058,9.98512,11.0058,9.52512L11.0058,2.99512 13.0058,2.99512 13.0058,9.52512C13.0058,9.98512,13.1158,10.4551,13.3258,10.8651L15.3858,14.9951 8.62582,14.9951 10.6958,10.8651 10.6858,10.8651z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
<TextBlock Foreground="#fca5a5" Text="实验性选项" FontSize="12"
VerticalAlignment="Center">
</TextBlock>
</ui:SimpleStackPanel>
</Border>
<ui:ToggleSwitch OnContent="" OffContent=""
Toggled="ToggleSwitchIsEnableDPIChangeDetection_Toggled"
Name="ToggleSwitchIsEnableDPIChangeDetection" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
</ui:SimpleStackPanel>
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
Text="# 当检测到系统DPI变化时会尝试检测FloatingBar是否在屏幕内显示如果不在屏幕内显示将会尝试移动到屏幕内可见区域DPI调大会触发如果DPI调小是不会触发工具栏位置移动的请您手动调整。" />
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="启用ResolutionChangeDetection"
VerticalAlignment="Center"
FontSize="14" Margin="0,0,6,0" />
<Border Height="20" CornerRadius="3" Background="#7f1d1d" Margin="0,0,12,0"
Padding="4,0">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="3"
VerticalAlignment="Center">
<Image Width="15" Height="15" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#fca5a5"
Geometry="F1 M24,24z M0,0z M20.1758,20.0951L15.1058,9.97512C15.0358,9.83512,14.9958,9.68512,14.9958,9.52512L14.9958,2.99512 15.4958,2.99512C16.0458,2.99512 16.4958,2.54512 16.4958,1.99512 16.4958,1.44512 16.0458,0.995117 15.4958,0.995117L8.49582,0.995117C7.94582,0.995117 7.49582,1.44512 7.49582,1.99512 7.49582,2.54512 7.94582,2.99512 8.49582,2.99512L8.99582,2.99512 8.99582,9.52512C8.99582,9.67512,8.95582,9.83512,8.89582,9.97512L3.82582,20.0951C3.67582,20.4051 3.59582,20.7451 3.61582,21.0851 3.62582,21.4251 3.73582,21.7651 3.91582,22.0551 4.09582,22.3451 4.34582,22.5851 4.64582,22.7551 4.94582,22.9151 5.27582,23.0051 5.60582,23.0051L18.3758,23.0051C18.7558,23.0051 19.0558,22.9251 19.3558,22.7551 19.6558,22.5851 19.9058,22.3451 20.0858,22.0551 20.2658,21.7651 20.3658,21.4351 20.3858,21.0851 20.3958,20.7451 20.3258,20.4051 20.1758,20.1051L20.1758,20.0951z M10.6858,10.8651C10.8958,10.4451,11.0058,9.98512,11.0058,9.52512L11.0058,2.99512 13.0058,2.99512 13.0058,9.52512C13.0058,9.98512,13.1158,10.4551,13.3258,10.8651L15.3858,14.9951 8.62582,14.9951 10.6958,10.8651 10.6858,10.8651z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
<TextBlock Foreground="#fca5a5" Text="实验性选项" FontSize="12"
VerticalAlignment="Center">
</TextBlock>
</ui:SimpleStackPanel>
</Border>
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
Toggled="ToggleSwitchIsEnableResolutionChangeDetection_Toggled"
Name="ToggleSwitchIsEnableResolutionChangeDetection" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
</ui:SimpleStackPanel>
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
Text="# 当检测到系统分辨率变化时会尝试检测FloatingBar是否在屏幕内显示如果不在屏幕内显示将会尝试移动到屏幕内可见区域分辨率调小可能会触发如果在屏幕内不会自动调整位置请手动挡。" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</GroupBox> </GroupBox>
<GroupBox> <GroupBox>
@ -973,147 +1042,278 @@
FontSize="26" /> FontSize="26" />
</GroupBox.Header> </GroupBox.Header>
<ui:SimpleStackPanel Spacing="6"> <ui:SimpleStackPanel Spacing="6">
<TextBlock Margin="0,0,0,8" Text="自动收纳" FontWeight="Bold" Foreground="#fafafa"
FontSize="20" />
<Grid Margin="4,0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ui:SimpleStackPanel Grid.Row="0" Grid.Column="0" Orientation="Vertical">
<Image Source="/Resources/Icons-png/EasiNote.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃白板5" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInEasiNote" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Grid.Row="0" Grid.Column="1" Orientation="Vertical">
<Image Source="/Resources/Icons-png/EasiCamera.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃展台" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInEasiCamera" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiCamera_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Grid.Row="0" Grid.Column="2" Orientation="Vertical">
<Image Source="/Resources/Icons-png/EasiNote3.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃白板3" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInEasiNote3" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote3_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Grid.Row="0" Grid.Column="3" Orientation="Vertical">
<Image Source="/Resources/Icons-png/EasiNote3C.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃轻白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInEasiNote3C" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote3C_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="1" Grid.Column="0"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/EasiNote5C.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃轻白板5C" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInEasiNote5C" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote5C_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="1" Grid.Column="1"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/SeewoPinco.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="希沃品课" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInSeewoPincoTeacher" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInSeewoPincoTeacher_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="1" Grid.Column="2"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/HiteBoard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="鸿合白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInHiteTouchPro" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteTouchPro_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="1" Grid.Column="3"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/HiteCamera.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="鸿合展台" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInHiteCamera" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteCamera_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="2" Grid.Column="0"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/HiteLightBoard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="鸿合轻量白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInHiteLightBoard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteLightBoard_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="2" Grid.Column="1"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/WenXiang.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="文香白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInWxBoardMain" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInWxBoardMain_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="2" Grid.Column="2"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/Whiteboard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="微软白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInMSWhiteboard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInMSWhiteboard_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="2" Grid.Column="3"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/AdmoxWhiteboard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="安道白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInAdmoxWhiteboard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInAdmoxWhiteboard_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="3" Grid.Column="0"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/AdmoxBooth.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="安道展台" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInAdmoxBooth" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInAdmoxBooth_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="3" Grid.Column="1"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/YiYunWhiteboard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="艺云白板" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInQPoint" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInQPoint_Toggled" Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="3" Grid.Column="2"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/YiYunVisualPresenter.png"
Margin="0,0,0,4" Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="艺云展台" HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInYiYunVisualPresenter"
IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInYiYunVisualPresenter_Toggled"
Width="40" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Margin="0,18,0,0" Grid.Row="3" Grid.Column="3"
Orientation="Vertical">
<Image Source="/Resources/Icons-png/MaxHubWhiteboard.png" Margin="0,0,0,4"
Width="42"
Height="42" HorizontalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="MaxHub白板"
HorizontalAlignment="Center"
FontSize="14" Margin="0,0,0,4" />
<ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
HorizontalAlignment="Center"
Name="ToggleSwitchAutoFoldInMaxHubWhiteboard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInMaxHubWhiteboard_Toggled"
Width="40" />
</ui:SimpleStackPanel>
</Grid>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiNote.png" Margin="0,0,6,0" Width="28" <Image Source="/Resources/Icons-png/EasiNote.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" /> Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃白板”时自动收纳" VerticalAlignment="Center" <TextBlock Foreground="#fafafa" Text="自动收纳忽略桌面EN5批注窗口"
FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInEasiNote" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiNote.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="自动收纳忽略桌面EN批注窗口"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" /> VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent="" <ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
Name="ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno" Name="ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno"
IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold" IsOn="True" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno_Toggled" /> Toggled="ToggleSwitchAutoFoldInEasiNoteIgnoreDesktopAnno_Toggled" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiCamera.png" Margin="0,0,6,0" Width="28" <Image Source="/Resources/Icons-png/Donview.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" /> Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃视频展台”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInEasiCamera" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiCamera_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiNote3.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃白板3”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInEasiNote3" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote3_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiNote3C.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃轻白板”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInEasiNote3C" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote3C_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/HiteLightBoard.png" Margin="0,0,6,0"
Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“鸿合轻量白板”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInHiteLightBoard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteLightBoard_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/EasiNote5C.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃轻白板”(新版)时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInEasiNote5C" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInEasiNote5C_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/SeewoPinco.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“希沃品课”时自动收纳" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInSeewoPincoTeacher" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInSeewoPincoTeacher_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/HiteBoard.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“鸿合白板”时自动收纳" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInHiteTouchPro" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteTouchPro_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/HiteCamera.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“鸿合视频展台”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInHiteCamera" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInHiteCamera_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/WenXiang.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“文香白板”时自动收纳" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInWxBoardMain" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInWxBoardMain_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Foreground="#fafafa" Text="进入“中原旧白板”时自动收纳" <TextBlock Foreground="#fafafa" Text="进入“中原旧白板”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" /> VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent="" <ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
Name="ToggleSwitchAutoFoldInOldZyBoard" IsOn="True" Name="ToggleSwitchAutoFoldInOldZyBoard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInOldZyBoard_Toggled" /> Toggled="ToggleSwitchAutoFoldInOldZyBoard_Toggled" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/Whiteboard.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="进入“微软 Whiteboard”时自动收纳"
VerticalAlignment="Center" FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent=""
Name="ToggleSwitchAutoFoldInMSWhiteboard" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInMSWhiteboard_Toggled" />
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/Powerpoint.png" Margin="0,0,6,0" Width="28" <Image Source="/Resources/Icons-png/Powerpoint.png" Margin="0,0,6,0" Width="28"
Height="28" VerticalAlignment="Center" /> Height="28" VerticalAlignment="Center" />
<TextBlock Foreground="#fafafa" Text="播放PPT时自动收纳" VerticalAlignment="Center" <TextBlock Foreground="#fafafa" Text="播放PPT时自动收纳" VerticalAlignment="Center"
FontSize="14" Margin="0,0,16,0" /> FontSize="14" Margin="0,0,16,0" />
<ui:ToggleSwitch OnContent="" OffContent="" <ui:ToggleSwitch OnContent="" OffContent="" MinWidth="0"
Name="ToggleSwitchAutoFoldInPPTSlideShow" IsOn="True" Name="ToggleSwitchAutoFoldInPPTSlideShow" IsOn="True"
FontFamily="Microsoft YaHei UI" FontWeight="Bold" FontFamily="Microsoft YaHei UI" FontWeight="Bold"
Toggled="ToggleSwitchAutoFoldInPPTSlideShow_Toggled" /> Toggled="ToggleSwitchAutoFoldInPPTSlideShow_Toggled" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
<Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46" <Line HorizontalAlignment="Center" X1="0" Y1="0" X2="400" Y2="0" Stroke="#3f3f46"
StrokeThickness="1" Margin="0,4,0,4" /> StrokeThickness="1" Margin="0,4,0,4" />
<TextBlock Margin="0,0,0,8" Text="自动查杀" FontWeight="Bold" Foreground="#fafafa"
FontSize="20" />
<!--<ui:ToggleSwitch OnContent="" OffContent="" Name="ToggleSwitchAutoFoldInZySmartBoard" Header="进入“中原新白板(相似鸿合)”时自动收纳至侧边栏" IsOn="False" FontFamily="Microsoft YaHei UI" Toggled="ToggleSwitchAutoFoldInZySmartBoard_Toggled"/>--> <!--<ui:ToggleSwitch OnContent="" OffContent="" Name="ToggleSwitchAutoFoldInZySmartBoard" Header="进入“中原新白板(相似鸿合)”时自动收纳至侧边栏" IsOn="False" FontFamily="Microsoft YaHei UI" Toggled="ToggleSwitchAutoFoldInZySmartBoard_Toggled"/>-->
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left"> <ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Resources/Icons-png/PPTTools.png" Margin="0,0,6,0" Width="28" <Image Source="/Resources/Icons-png/PPTTools.png" Margin="0,0,6,0" Width="28"
@ -5915,7 +6115,6 @@
</Viewbox> </Viewbox>
</Grid> </Grid>
<Grid Name="GridForFloatingBarDraging" Background="#01000000" Visibility="Collapsed" <Grid Name="GridForFloatingBarDraging" Background="#01000000" Visibility="Collapsed"
MouseMove="SymbolIconEmoji_MouseMove" MouseUp="SymbolIconEmoji_MouseUp" /> MouseMove="SymbolIconEmoji_MouseMove" MouseUp="SymbolIconEmoji_MouseUp" />

View File

@ -14,6 +14,9 @@ using System.Runtime.InteropServices;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Drawing; using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Win32;
namespace Ink_Canvas { namespace Ink_Canvas {
public partial class MainWindow : Window { public partial class MainWindow : Window {
@ -184,6 +187,54 @@ namespace Ink_Canvas {
BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 0.5; BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 0.5;
BtnWhiteBoardSwitchPrevious.IsEnabled = CurrentWhiteboardIndex != 1; BtnWhiteBoardSwitchPrevious.IsEnabled = CurrentWhiteboardIndex != 1;
BorderInkReplayToolBox.Visibility = Visibility.Collapsed; BorderInkReplayToolBox.Visibility = Visibility.Collapsed;
SystemEvents.DisplaySettingsChanged += SystemEventsOnDisplaySettingsChanged;
}
private void SystemEventsOnDisplaySettingsChanged(object sender, EventArgs e) {
if (!Settings.Advanced.IsEnableResolutionChangeDetection) return;
ShowNotification($"检测到显示器信息变化,变为{System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width}x{System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height}");
new Thread(() => {
var isFloatingBarOutsideScreen = false;
var isInPPTPresentationMode = false;
Dispatcher.Invoke(() => {
isFloatingBarOutsideScreen = IsOutsideOfScreenHelper.IsOutsideOfScreen(ViewboxFloatingBar);
isInPPTPresentationMode = BtnPPTSlideShowEnd.Visibility == Visibility.Visible;
});
if (isFloatingBarOutsideScreen) dpiChangedDelayAction.DebounceAction(3000, null, () => {
if (!isFloatingBarFolded)
{
if (isInPPTPresentationMode) ViewboxFloatingBarMarginAnimation(60);
else ViewboxFloatingBarMarginAnimation(100, true);
}
});
}).Start();
}
private DelayAction dpiChangedDelayAction = new DelayAction();
private void MainWindow_OnDpiChanged(object sender, DpiChangedEventArgs e)
{
if (e.OldDpi.DpiScaleX != e.NewDpi.DpiScaleX && e.OldDpi.DpiScaleY != e.NewDpi.DpiScaleY && Settings.Advanced.IsEnableDPIChangeDetection)
{
ShowNotification($"系统DPI发生变化从 {e.OldDpi.DpiScaleX}x{e.OldDpi.DpiScaleY} 变化为 {e.NewDpi.DpiScaleX}x{e.NewDpi.DpiScaleY}");
new Thread(() => {
var isFloatingBarOutsideScreen = false;
var isInPPTPresentationMode = false;
Dispatcher.Invoke(() => {
isFloatingBarOutsideScreen = IsOutsideOfScreenHelper.IsOutsideOfScreen(ViewboxFloatingBar);
isInPPTPresentationMode = BtnPPTSlideShowEnd.Visibility == Visibility.Visible;
});
if (isFloatingBarOutsideScreen) dpiChangedDelayAction.DebounceAction(3000,null, () => {
if (!isFloatingBarFolded)
{
if (isInPPTPresentationMode) ViewboxFloatingBarMarginAnimation(60);
else ViewboxFloatingBarMarginAnimation(100, true);
}
});
}).Start();
}
} }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) {
@ -217,6 +268,8 @@ namespace Ink_Canvas {
} }
private void Window_Closed(object sender, EventArgs e) { private void Window_Closed(object sender, EventArgs e) {
SystemEvents.DisplaySettingsChanged -= SystemEventsOnDisplaySettingsChanged;
LogHelper.WriteLogToFile("Ink Canvas closed", LogHelper.LogType.Event); LogHelper.WriteLogToFile("Ink Canvas closed", LogHelper.LogType.Event);
} }

View File

@ -15,6 +15,7 @@ using Application = System.Windows.Application;
using File = System.IO.File; using File = System.IO.File;
using MessageBox = System.Windows.MessageBox; using MessageBox = System.Windows.MessageBox;
using iNKORE.UI.WPF.Modern; using iNKORE.UI.WPF.Modern;
using Microsoft.Office.Core;
namespace Ink_Canvas namespace Ink_Canvas
{ {
@ -79,8 +80,10 @@ namespace Ink_Canvas
public static bool IsShowingRestoreHiddenSlidesWindow = false; public static bool IsShowingRestoreHiddenSlidesWindow = false;
private static bool IsShowingAutoplaySlidesWindow = false; private static bool IsShowingAutoplaySlidesWindow = false;
private void TimerCheckPPT_Elapsed(object sender, ElapsedEventArgs e) { private void TimerCheckPPT_Elapsed(object sender, ElapsedEventArgs e) {
if (IsShowingRestoreHiddenSlidesWindow) return; if (IsShowingRestoreHiddenSlidesWindow || IsShowingAutoplaySlidesWindow) return;
try { try {
//var processes = Process.GetProcessesByName("wpp"); //var processes = Process.GetProcessesByName("wpp");
//if (processes.Length > 0 && !isWPSSupportOn) return; //if (processes.Length > 0 && !isWPSSupportOn) return;
@ -99,10 +102,7 @@ namespace Ink_Canvas
timerCheckPPT.Stop(); timerCheckPPT.Stop();
//获得演示文稿对象 //获得演示文稿对象
presentation = pptApplication.ActivePresentation; presentation = pptApplication.ActivePresentation;
pptApplication.PresentationClose += PptApplication_PresentationClose;
pptApplication.SlideShowBegin += PptApplication_SlideShowBegin;
pptApplication.SlideShowNextSlide += PptApplication_SlideShowNextSlide;
pptApplication.SlideShowEnd += PptApplication_SlideShowEnd;
// 获得幻灯片对象集合 // 获得幻灯片对象集合
slides = presentation.Slides; slides = presentation.Slides;
@ -119,80 +119,20 @@ namespace Ink_Canvas
// 在阅读模式下出现异常时,通过下面的方式来获得当前选中的幻灯片对象 // 在阅读模式下出现异常时,通过下面的方式来获得当前选中的幻灯片对象
slide = pptApplication.SlideShowWindows[1].View.Slide; slide = pptApplication.SlideShowWindows[1].View.Slide;
} }
pptApplication.PresentationOpen += PptApplication_PresentationOpen;
pptApplication.PresentationClose += PptApplication_PresentationClose;
pptApplication.SlideShowBegin += PptApplication_SlideShowBegin;
pptApplication.SlideShowNextSlide += PptApplication_SlideShowNextSlide;
pptApplication.SlideShowEnd += PptApplication_SlideShowEnd;
} }
if (pptApplication == null) return; if (pptApplication == null) return;
//BtnCheckPPT.Visibility = Visibility.Collapsed; //BtnCheckPPT.Visibility = Visibility.Collapsed;
// 跳转到上次播放页 // 此处是已经开启了
if (Settings.PowerPointSettings.IsNotifyPreviousPage) PptApplication_PresentationOpen(null);
Application.Current.Dispatcher.BeginInvoke(new Action(() => {
var folderPath = Settings.Automation.AutoSavedStrokesLocation +
@"\Auto Saved - Presentations\" + presentation.Name + "_" +
presentation.Slides.Count;
try {
if (!File.Exists(folderPath + "/Position")) return;
if (!int.TryParse(File.ReadAllText(folderPath + "/Position"), out var page)) return;
if (page <= 0) return;
new YesOrNoNotificationWindow($"上次播放到了第 {page} 页, 是否立即跳转", () => {
if (pptApplication.SlideShowWindows.Count >= 1)
// 如果已经播放了的话, 跳转
presentation.SlideShowWindow.View.GotoSlide(page);
else
presentation.Windows[1].View.GotoSlide(page);
}).ShowDialog();
}
catch (Exception ex) {
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
}
}), DispatcherPriority.Normal);
//检查是否有隐藏幻灯片
if (Settings.PowerPointSettings.IsNotifyHiddenPage) {
var isHaveHiddenSlide = false;
foreach (Slide slide in slides)
if (slide.SlideShowTransition.Hidden == Microsoft.Office.Core.MsoTriState.msoTrue) {
isHaveHiddenSlide = true;
break;
}
Application.Current.Dispatcher.BeginInvoke(new Action(() => {
if (isHaveHiddenSlide && !IsShowingRestoreHiddenSlidesWindow) {
IsShowingRestoreHiddenSlidesWindow = true;
new YesOrNoNotificationWindow("检测到此演示文档中包含隐藏的幻灯片,是否取消隐藏?",
() => {
foreach (Slide slide in slides)
if (slide.SlideShowTransition.Hidden ==
Microsoft.Office.Core.MsoTriState.msoTrue)
slide.SlideShowTransition.Hidden =
Microsoft.Office.Core.MsoTriState.msoFalse;
}).ShowDialog();
}
BtnPPTSlideShow.Visibility = Visibility.Visible;
}), DispatcherPriority.Normal);
}
//检测是否有自动播放
if (Settings.PowerPointSettings.IsNotifyAutoPlayPresentation)
Application.Current.Dispatcher.BeginInvoke(new Action(() => {
var isHaveAutoPlaySettings = false;
isHaveAutoPlaySettings = presentation.SlideShowSettings.AdvanceMode !=
PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
if (isHaveAutoPlaySettings && !IsShowingAutoplaySlidesWindow) {
IsShowingAutoplaySlidesWindow = true;
new YesOrNoNotificationWindow("检测到此演示文档中有自动播放或排练计时已经启用,是否取消?",
() => {
presentation.SlideShowSettings.AdvanceMode =
PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
}).ShowDialog();
}
BtnPPTSlideShow.Visibility = Visibility.Visible;
}), DispatcherPriority.Normal);
//如果检测到已经开始放映,则立即进入画板模式 //如果检测到已经开始放映,则立即进入画板模式
if (pptApplication.SlideShowWindows.Count >= 1) if (pptApplication.SlideShowWindows.Count >= 1)
PptApplication_SlideShowBegin(pptApplication.SlideShowWindows[1]); PptApplication_SlideShowBegin(pptApplication.SlideShowWindows[1]);
@ -204,7 +144,107 @@ namespace Ink_Canvas
} }
} }
private void PptApplication_PresentationOpen(Presentation Pres) {
// 跳转到上次播放页
if (Settings.PowerPointSettings.IsNotifyPreviousPage)
Application.Current.Dispatcher.BeginInvoke(new Action(() => {
var folderPath = Settings.Automation.AutoSavedStrokesLocation +
@"\Auto Saved - Presentations\" + presentation.Name + "_" +
presentation.Slides.Count;
try
{
if (!File.Exists(folderPath + "/Position")) return;
if (!int.TryParse(File.ReadAllText(folderPath + "/Position"), out var page)) return;
if (page <= 0) return;
new YesOrNoNotificationWindow($"上次播放到了第 {page} 页, 是否立即跳转", () => {
if (pptApplication.SlideShowWindows.Count >= 1)
// 如果已经播放了的话, 跳转
presentation.SlideShowWindow.View.GotoSlide(page);
else
presentation.Windows[1].View.GotoSlide(page);
}).ShowDialog();
}
catch (Exception ex)
{
LogHelper.WriteLogToFile(ex.ToString(), LogHelper.LogType.Error);
}
}), DispatcherPriority.Normal);
//检查是否有隐藏幻灯片
if (Settings.PowerPointSettings.IsNotifyHiddenPage)
{
var isHaveHiddenSlide = false;
foreach (Slide slide in slides)
if (slide.SlideShowTransition.Hidden == Microsoft.Office.Core.MsoTriState.msoTrue)
{
isHaveHiddenSlide = true;
break;
}
Application.Current.Dispatcher.BeginInvoke(new Action(() => {
if (isHaveHiddenSlide && !IsShowingRestoreHiddenSlidesWindow)
{
IsShowingRestoreHiddenSlidesWindow = true;
new YesOrNoNotificationWindow("检测到此演示文档中包含隐藏的幻灯片,是否取消隐藏?",
() => {
foreach (Slide slide in slides)
if (slide.SlideShowTransition.Hidden ==
Microsoft.Office.Core.MsoTriState.msoTrue)
slide.SlideShowTransition.Hidden =
Microsoft.Office.Core.MsoTriState.msoFalse;
IsShowingRestoreHiddenSlidesWindow = false;
}, () => {
IsShowingRestoreHiddenSlidesWindow = false;
}, () => {
IsShowingRestoreHiddenSlidesWindow = false;
}).ShowDialog();
}
BtnPPTSlideShow.Visibility = Visibility.Visible;
}), DispatcherPriority.Normal);
}
//检测是否有自动播放
if (Settings.PowerPointSettings.IsNotifyAutoPlayPresentation
// && presentation.SlideShowSettings.AdvanceMode == PpSlideShowAdvanceMode.ppSlideShowUseSlideTimings
&& BtnPPTSlideShowEnd.Visibility != Visibility.Visible)
{
bool hasSlideTimings = false;
foreach (Slide slide in presentation.Slides)
{
if (slide.SlideShowTransition.AdvanceOnTime == MsoTriState.msoTrue && slide.SlideShowTransition.AdvanceTime > 0)
{
hasSlideTimings = true;
break;
}
}
if (hasSlideTimings)
{
Application.Current.Dispatcher.BeginInvoke((Action)(() =>
{
if (hasSlideTimings && !IsShowingAutoplaySlidesWindow)
{
IsShowingAutoplaySlidesWindow = true;
new YesOrNoNotificationWindow("检测到此演示文档中自动播放或排练计时已经启用,可能导致幻灯片自动翻页,是否取消?",
() => {
presentation.SlideShowSettings.AdvanceMode =
PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
IsShowingAutoplaySlidesWindow = false;
}, () => {
IsShowingAutoplaySlidesWindow = false;
}, () => {
IsShowingAutoplaySlidesWindow = false;
}).ShowDialog();
}
}));
presentation.SlideShowSettings.AdvanceMode = PpSlideShowAdvanceMode.ppSlideShowManualAdvance;
}
}
}
private void PptApplication_PresentationClose(Presentation Pres) { private void PptApplication_PresentationClose(Presentation Pres) {
pptApplication.PresentationOpen -= PptApplication_PresentationOpen;
pptApplication.PresentationClose -= PptApplication_PresentationClose; pptApplication.PresentationClose -= PptApplication_PresentationClose;
pptApplication.SlideShowBegin -= PptApplication_SlideShowBegin; pptApplication.SlideShowBegin -= PptApplication_SlideShowBegin;
pptApplication.SlideShowNextSlide -= PptApplication_SlideShowNextSlide; pptApplication.SlideShowNextSlide -= PptApplication_SlideShowNextSlide;
@ -635,5 +675,6 @@ namespace Ink_Canvas
private void ImagePPTControlEnd_MouseUp(object sender, MouseButtonEventArgs e) { private void ImagePPTControlEnd_MouseUp(object sender, MouseButtonEventArgs e) {
BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null); BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null);
} }
} }
} }

View File

@ -11,6 +11,7 @@ using System.Windows.Media;
using System.Windows.Ink; using System.Windows.Ink;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Interop; using System.Windows.Interop;
using OSVersionExtension;
namespace Ink_Canvas { namespace Ink_Canvas {
public partial class MainWindow : Window { public partial class MainWindow : Window {
@ -602,6 +603,46 @@ namespace Ink_Canvas {
StartOrStoptimerCheckAutoFold(); StartOrStoptimerCheckAutoFold();
} }
private void ToggleSwitchAutoFoldInAdmoxWhiteboard_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Automation.IsAutoFoldInAdmoxWhiteboard = ToggleSwitchAutoFoldInAdmoxWhiteboard.IsOn;
SaveSettingsToFile();
StartOrStoptimerCheckAutoFold();
}
private void ToggleSwitchAutoFoldInAdmoxBooth_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Automation.IsAutoFoldInAdmoxBooth = ToggleSwitchAutoFoldInAdmoxBooth.IsOn;
SaveSettingsToFile();
StartOrStoptimerCheckAutoFold();
}
private void ToggleSwitchAutoFoldInQPoint_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Automation.IsAutoFoldInQPoint = ToggleSwitchAutoFoldInQPoint.IsOn;
SaveSettingsToFile();
StartOrStoptimerCheckAutoFold();
}
private void ToggleSwitchAutoFoldInYiYunVisualPresenter_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Automation.IsAutoFoldInYiYunVisualPresenter = ToggleSwitchAutoFoldInYiYunVisualPresenter.IsOn;
SaveSettingsToFile();
StartOrStoptimerCheckAutoFold();
}
private void ToggleSwitchAutoFoldInMaxHubWhiteboard_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Automation.IsAutoFoldInMaxHubWhiteboard = ToggleSwitchAutoFoldInMaxHubWhiteboard.IsOn;
SaveSettingsToFile();
StartOrStoptimerCheckAutoFold();
}
private void ToggleSwitchAutoFoldInPPTSlideShow_Toggled(object sender, RoutedEventArgs e) { private void ToggleSwitchAutoFoldInPPTSlideShow_Toggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return; if (!isLoaded) return;
Settings.Automation.IsAutoFoldInPPTSlideShow = ToggleSwitchAutoFoldInPPTSlideShow.IsOn; Settings.Automation.IsAutoFoldInPPTSlideShow = ToggleSwitchAutoFoldInPPTSlideShow.IsOn;
@ -909,6 +950,11 @@ namespace Ink_Canvas {
Settings.Automation.IsAutoFoldInWxBoardMain = false; Settings.Automation.IsAutoFoldInWxBoardMain = false;
Settings.Automation.IsAutoFoldInOldZyBoard = false; Settings.Automation.IsAutoFoldInOldZyBoard = false;
Settings.Automation.IsAutoFoldInMSWhiteboard = false; Settings.Automation.IsAutoFoldInMSWhiteboard = false;
Settings.Automation.IsAutoFoldInAdmoxWhiteboard = false;
Settings.Automation.IsAutoFoldInAdmoxBooth = false;
Settings.Automation.IsAutoFoldInQPoint = false;
Settings.Automation.IsAutoFoldInYiYunVisualPresenter = false;
Settings.Automation.IsAutoFoldInMaxHubWhiteboard = false;
Settings.Automation.IsAutoFoldInPPTSlideShow = false; Settings.Automation.IsAutoFoldInPPTSlideShow = false;
Settings.Automation.IsAutoKillPptService = false; Settings.Automation.IsAutoKillPptService = false;
Settings.Automation.IsAutoKillEasiNote = false; Settings.Automation.IsAutoKillEasiNote = false;
@ -1078,7 +1124,7 @@ namespace Ink_Canvas {
private void ToggleSwitchIsEnableEdgeGestureUtil_Toggled(object sender, RoutedEventArgs e) { private void ToggleSwitchIsEnableEdgeGestureUtil_Toggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return; if (!isLoaded) return;
Settings.Advanced.IsEnableEdgeGestureUtil = ToggleSwitchIsEnableEdgeGestureUtil.IsOn; Settings.Advanced.IsEnableEdgeGestureUtil = ToggleSwitchIsEnableEdgeGestureUtil.IsOn;
EdgeGestureUtil.DisableEdgeGestures(new WindowInteropHelper(this).Handle, ToggleSwitchIsEnableEdgeGestureUtil.IsOn); if (OSVersion.GetOperatingSystem() >= OSVersionExtension.OperatingSystem.Windows10) EdgeGestureUtil.DisableEdgeGestures(new WindowInteropHelper(this).Handle, ToggleSwitchIsEnableEdgeGestureUtil.IsOn);
SaveSettingsToFile(); SaveSettingsToFile();
} }
@ -1088,6 +1134,20 @@ namespace Ink_Canvas {
SaveSettingsToFile(); SaveSettingsToFile();
} }
private void ToggleSwitchIsEnableDPIChangeDetection_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Advanced.IsEnableDPIChangeDetection = ToggleSwitchIsEnableDPIChangeDetection.IsOn;
SaveSettingsToFile();
}
private void ToggleSwitchIsEnableResolutionChangeDetection_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Advanced.IsEnableResolutionChangeDetection = ToggleSwitchIsEnableResolutionChangeDetection.IsOn;
SaveSettingsToFile();
}
private void ToggleSwitchEraserBindTouchMultiplier_Toggled(object sender, RoutedEventArgs e) { private void ToggleSwitchEraserBindTouchMultiplier_Toggled(object sender, RoutedEventArgs e) {
if (!isLoaded) return; if (!isLoaded) return;
Settings.Advanced.EraserBindTouchMultiplier = ToggleSwitchEraserBindTouchMultiplier.IsOn; Settings.Advanced.EraserBindTouchMultiplier = ToggleSwitchEraserBindTouchMultiplier.IsOn;

View File

@ -1,5 +1,6 @@
using Ink_Canvas.Helpers; using Ink_Canvas.Helpers;
using Newtonsoft.Json; using Newtonsoft.Json;
using OSVersionExtension;
using System; using System;
using System.Reflection; using System.Reflection;
using System.Windows; using System.Windows;
@ -9,6 +10,7 @@ using System.Windows.Interop;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using File = System.IO.File; using File = System.IO.File;
using OperatingSystem = OSVersionExtension.OperatingSystem;
namespace Ink_Canvas { namespace Ink_Canvas {
public partial class MainWindow : Window { public partial class MainWindow : Window {
@ -470,10 +472,14 @@ namespace Ink_Canvas {
ToggleSwitchIsEnableEdgeGestureUtil.IsOn = Settings.Advanced.IsEnableEdgeGestureUtil; ToggleSwitchIsEnableEdgeGestureUtil.IsOn = Settings.Advanced.IsEnableEdgeGestureUtil;
if (Settings.Advanced.IsEnableEdgeGestureUtil) { if (Settings.Advanced.IsEnableEdgeGestureUtil) {
EdgeGestureUtil.DisableEdgeGestures(new WindowInteropHelper(this).Handle, true); if (OSVersion.GetOperatingSystem()>=OperatingSystem.Windows10) EdgeGestureUtil.DisableEdgeGestures(new WindowInteropHelper(this).Handle, true);
} }
ToggleSwitchIsEnableForceFullScreen.IsOn = Settings.Advanced.IsEnableForceFullScreen; ToggleSwitchIsEnableForceFullScreen.IsOn = Settings.Advanced.IsEnableForceFullScreen;
ToggleSwitchIsEnableDPIChangeDetection.IsOn = Settings.Advanced.IsEnableDPIChangeDetection;
ToggleSwitchIsEnableResolutionChangeDetection.IsOn = Settings.Advanced.IsEnableResolutionChangeDetection;
} else { } else {
Settings.Advanced = new Advanced(); Settings.Advanced = new Advanced();
} }
@ -529,6 +535,16 @@ namespace Ink_Canvas {
ToggleSwitchAutoFoldInMSWhiteboard.IsOn = Settings.Automation.IsAutoFoldInMSWhiteboard; ToggleSwitchAutoFoldInMSWhiteboard.IsOn = Settings.Automation.IsAutoFoldInMSWhiteboard;
ToggleSwitchAutoFoldInAdmoxWhiteboard.IsOn = Settings.Automation.IsAutoFoldInAdmoxWhiteboard;
ToggleSwitchAutoFoldInAdmoxBooth.IsOn = Settings.Automation.IsAutoFoldInAdmoxBooth;
ToggleSwitchAutoFoldInQPoint.IsOn = Settings.Automation.IsAutoFoldInQPoint;
ToggleSwitchAutoFoldInYiYunVisualPresenter.IsOn = Settings.Automation.IsAutoFoldInYiYunVisualPresenter;
ToggleSwitchAutoFoldInMaxHubWhiteboard.IsOn = Settings.Automation.IsAutoFoldInMaxHubWhiteboard;
SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Collapsed; SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Collapsed;
if (Settings.Automation.IsAutoFoldInPPTSlideShow) { if (Settings.Automation.IsAutoFoldInPPTSlideShow) {
SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Visible; SettingsPPTInkingAndAutoFoldExplictBorder.Visibility = Visibility.Visible;

View File

@ -1590,9 +1590,6 @@ namespace Ink_Canvas {
} }
} }
ViewboxFloatingBar.IsHitTestVisible = true;
BlackboardUIGridForInkReplay.IsHitTestVisible = true;
if (Settings.Canvas.FitToCurve == true) drawingAttributes.FitToCurve = true; if (Settings.Canvas.FitToCurve == true) drawingAttributes.FitToCurve = true;
} }
@ -1602,5 +1599,13 @@ namespace Ink_Canvas {
return false; return false;
return true; return true;
} }
private void MainWindow_OnMouseMove(object sender, MouseEventArgs e) {
if (e.StylusDevice == null) {
System.Windows.Forms.Cursor.Show();
} else {
System.Windows.Forms.Cursor.Hide();
}
}
} }
} }

View File

@ -182,7 +182,8 @@ namespace Ink_Canvas {
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) { ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null); if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// MSWhiteboard // MSWhiteboard
} else if (Settings.Automation.IsAutoFoldInMSWhiteboard && (windowProcessName == "MicrosoftWhiteboard" || windowProcessName == "msedgewebview2")) { } else if (Settings.Automation.IsAutoFoldInMSWhiteboard && (windowProcessName == "MicrosoftWhiteboard" ||
windowProcessName == "msedgewebview2")) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null); if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// OldZyBoard // OldZyBoard
} else if (Settings.Automation.IsAutoFoldInOldZyBoard && // 中原旧白板 } else if (Settings.Automation.IsAutoFoldInOldZyBoard && // 中原旧白板
@ -194,6 +195,36 @@ namespace Ink_Canvas {
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 && ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) { ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null); if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// AdmoxWhiteboard
} else if (Settings.Automation.IsAutoFoldInAdmoxWhiteboard && windowProcessName == "Amdox.WhiteBoard" &&
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// AdmoxBooth
} else if (Settings.Automation.IsAutoFoldInAdmoxBooth && windowProcessName == "Amdox.Booth" &&
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// QPoint
} else if (Settings.Automation.IsAutoFoldInQPoint && windowProcessName == "QPoint" &&
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// YiYunVisualPresenter
} else if (Settings.Automation.IsAutoFoldInYiYunVisualPresenter && windowProcessName == "YiYunVisualPresenter" &&
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
// MaxHubWhiteboard
} else if (Settings.Automation.IsAutoFoldInMaxHubWhiteboard && windowProcessName == "WhiteBoard" &&
WinTabWindowsChecker.IsWindowExisted("白板书写") &&
ForegroundWindowInfo.WindowRect().Height >= SystemParameters.WorkArea.Height - 16 &&
ForegroundWindowInfo.WindowRect().Width >= SystemParameters.WorkArea.Width - 16) {
if (ForegroundWindowInfo.ProcessPath() != "Unknown") {
var versionInfo = FileVersionInfo.GetVersionInfo(ForegroundWindowInfo.ProcessPath());
var version = versionInfo.FileVersion; var prodName = versionInfo.ProductName;
if (version.StartsWith("6.") && prodName=="WhiteBoard") if (!unfoldFloatingBarByUser && !isFloatingBarFolded) FoldFloatingBar_MouseUp(null, null);
}
} else if (WinTabWindowsChecker.IsWindowExisted("幻灯片放映", false)) { } else if (WinTabWindowsChecker.IsWindowExisted("幻灯片放映", false)) {
// 处于幻灯片放映状态 // 处于幻灯片放映状态
if (!Settings.Automation.IsAutoFoldInPPTSlideShow && isFloatingBarFolded && !foldFloatingBarByUser) if (!Settings.Automation.IsAutoFoldInPPTSlideShow && isFloatingBarFolded && !foldFloatingBarByUser)

View File

@ -86,7 +86,6 @@ namespace Ink_Canvas {
private void MainWindow_StylusDown(object sender, StylusDownEventArgs e) { private void MainWindow_StylusDown(object sender, StylusDownEventArgs e) {
inkCanvas.CaptureStylus(); inkCanvas.CaptureStylus();
inkCanvas.CaptureMouse();
ViewboxFloatingBar.IsHitTestVisible = false; ViewboxFloatingBar.IsHitTestVisible = false;
BlackboardUIGridForInkReplay.IsHitTestVisible = false; BlackboardUIGridForInkReplay.IsHitTestVisible = false;
@ -124,7 +123,6 @@ namespace Ink_Canvas {
catch { } catch { }
inkCanvas.ReleaseStylusCapture(); inkCanvas.ReleaseStylusCapture();
inkCanvas.ReleaseMouseCapture();
ViewboxFloatingBar.IsHitTestVisible = true; ViewboxFloatingBar.IsHitTestVisible = true;
BlackboardUIGridForInkReplay.IsHitTestVisible = true; BlackboardUIGridForInkReplay.IsHitTestVisible = true;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -197,7 +197,12 @@ namespace Ink_Canvas
|| IsAutoFoldInWxBoardMain || IsAutoFoldInWxBoardMain
|| IsAutoFoldInOldZyBoard || IsAutoFoldInOldZyBoard
|| IsAutoFoldInPPTSlideShow || IsAutoFoldInPPTSlideShow
|| IsAutoFoldInMSWhiteboard; || IsAutoFoldInMSWhiteboard
|| IsAutoFoldInAdmoxWhiteboard
|| IsAutoFoldInAdmoxBooth
|| IsAutoFoldInQPoint
|| IsAutoFoldInYiYunVisualPresenter
|| IsAutoFoldInMaxHubWhiteboard;
[JsonProperty("isAutoFoldInEasiNote")] [JsonProperty("isAutoFoldInEasiNote")]
public bool IsAutoFoldInEasiNote { get; set; } = false; public bool IsAutoFoldInEasiNote { get; set; } = false;
@ -239,6 +244,21 @@ namespace Ink_Canvas
[JsonProperty("isAutoFoldInMSWhiteboard")] [JsonProperty("isAutoFoldInMSWhiteboard")]
public bool IsAutoFoldInMSWhiteboard { get; set; } = false; public bool IsAutoFoldInMSWhiteboard { get; set; } = false;
[JsonProperty("isAutoFoldInAdmoxWhiteboard")]
public bool IsAutoFoldInAdmoxWhiteboard { get; set; } = false;
[JsonProperty("isAutoFoldInAdmoxBooth")]
public bool IsAutoFoldInAdmoxBooth { get; set; } = false;
[JsonProperty("isAutoFoldInQPoint")]
public bool IsAutoFoldInQPoint { get; set; } = false;
[JsonProperty("isAutoFoldInYiYunVisualPresenter")]
public bool IsAutoFoldInYiYunVisualPresenter { get; set; } = false;
[JsonProperty("isAutoFoldInMaxHubWhiteboard")]
public bool IsAutoFoldInMaxHubWhiteboard { get; set; } = false;
[JsonProperty("isAutoFoldInPPTSlideShow")] [JsonProperty("isAutoFoldInPPTSlideShow")]
public bool IsAutoFoldInPPTSlideShow { get; set; } = false; public bool IsAutoFoldInPPTSlideShow { get; set; } = false;
@ -307,6 +327,12 @@ namespace Ink_Canvas
[JsonProperty("isEnableForceFullScreen")] [JsonProperty("isEnableForceFullScreen")]
public bool IsEnableForceFullScreen { get; set; } = false; public bool IsEnableForceFullScreen { get; set; } = false;
[JsonProperty("isEnableResolutionChangeDetection")]
public bool IsEnableResolutionChangeDetection { get; set; } = false;
[JsonProperty("isEnableDPIChangeDetection")]
public bool IsEnableDPIChangeDetection { get; set; } = false;
[JsonProperty("isSecondConfirmWhenShutdownApp")] [JsonProperty("isSecondConfirmWhenShutdownApp")]
public bool IsSecondConfirmWhenShutdownApp { get; set; } = false; public bool IsSecondConfirmWhenShutdownApp { get; set; } = false;
} }

View File

@ -11,11 +11,13 @@ namespace Ink_Canvas
{ {
private readonly Action _yesAction; private readonly Action _yesAction;
private readonly Action _noAction; private readonly Action _noAction;
private readonly Action _windowClose;
public YesOrNoNotificationWindow(string text, Action yesAction = null, Action noAction = null) public YesOrNoNotificationWindow(string text, Action yesAction = null, Action noAction = null, Action windowClose = null)
{ {
_yesAction = yesAction; _yesAction = yesAction;
_noAction = noAction; _noAction = noAction;
_windowClose = windowClose;
InitializeComponent(); InitializeComponent();
Label.Text = text; Label.Text = text;
} }
@ -45,9 +47,8 @@ namespace Ink_Canvas
Close(); Close();
} }
private void Window_Closed(object sender, EventArgs e) private void Window_Closed(object sender, EventArgs e) {
{ _windowClose.Invoke();
MainWindow.IsShowingRestoreHiddenSlidesWindow = false;
} }
} }
} }