Add files via upload

外观及优化
This commit is contained in:
Netherite_Bowl 2022-07-15 17:37:45 +08:00 committed by GitHub
parent b180440ba4
commit 62a3b4d67b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7284 additions and 7301 deletions

View File

@ -290,9 +290,9 @@
<Border Name="BorderSettings" Background="White" BorderBrush="Black"
BorderThickness="1" CornerRadius="10" ui:ThemeManager.RequestedTheme="Light"
Width="400" HorizontalAlignment="Center"
Margin="0,80,0,120" Visibility="Visible">
<Grid>
Width="481" HorizontalAlignment="Center"
Margin="240,80,279,120" Visibility="Visible">
<Grid Margin="9,0">
<ScrollViewer Margin="0,60,0,50" VerticalScrollBarVisibility="Auto"
PanningMode="VerticalOnly" ui:ThemeManager.RequestedTheme="Light"
ManipulationBoundaryFeedback="SCManipulationBoundaryFeedback">
@ -300,15 +300,15 @@
<TextBlock FontSize="14" Margin="0,0,0,0"
Text="*设置将自动保存,再次点击“设置”按钮即可关闭此页面。"/>
<TextBlock FontSize="14" Margin="0,0,0,12"
Text="*部分设置可能需要重新打开后生效。"/>
Text="*部分设置可能需要重启画板后才能生效。"/>
<GroupBox Header="行为">
<ui:SimpleStackPanel Spacing="12">
<ui:SimpleStackPanel Spacing="12" Orientation="Horizontal">
<Button Content="立即重画板" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnRestart_Click" Margin="0,0,0,10"/>
<Button Content="立即退出" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="0,0,0,10"/>
<Button Content="立即重启画板" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnRestart_Click" Margin="33,0,-65,10"/>
<Button Content="立即退出画板" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="87,0,-87,10"/>
</ui:SimpleStackPanel>
<ui:ToggleSwitch Name="ToggleSwitchRunAtStartup" Header="开机时运行" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchRunAtStartup_Toggled"/>
<TextBlock Text="我们并不推荐使用 WPS Office因为其对于触摸设备的较差支持。" Foreground="#666666"/>
<TextBlock Text="我们并不推荐使用 WPS Office因为其对于触摸设备的支持较差" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchSupportPowerPoint" Header="Microsoft PowerPoint 支持" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchSupportPowerPoint_Toggled"/>
<TextBlock Text="对 WPS Office 支持时会导致 WPS Office 关闭时卡顿,仅测试用。" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchSupportWPS" Header="WPS Office 支持" IsOn="False" IsEnabled="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchSupportWPS_Toggled"/>
@ -327,8 +327,8 @@
<Slider x:Name="InkWidthSlider"
HorizontalAlignment="Left"
Minimum="1" Maximum="20"
Width="330" FontFamily="Microsoft YaHei UI"
ui:ControlHelper.Header="笔粗细"
Width="393" FontFamily="Microsoft YaHei UI"
ui:ControlHelper.Header="笔粗细"
IsSnapToTickEnabled="True" Value="5"
TickFrequency="1" TickPlacement="Both"
ValueChanged="InkWidthSlider_ValueChanged"/>
@ -336,7 +336,7 @@
VerticalAlignment="Bottom" Margin="10,0,0,8"
FontSize="14"/>
</StackPanel>
<ui:ToggleSwitch Name="ToggleSwitchShowCursor" Header="显示画笔光标" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowCursor_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowCursor" Header="画笔光标可视化" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowCursor_Toggled"/>
<TextBlock Text="画笔样式" FontFamily="Microsoft YaHei UI" FontSize="14"/>
<ComboBox Name="ComboBoxPenStyle" FontFamily="Microsoft YaHei UI" SelectedIndex="0" SelectionChanged="ComboBoxPenStyle_SelectionChanged">
<ComboBoxItem Content="模拟笔锋(根据墨迹尾部计算)" FontFamily="Microsoft YaHei UI"/>
@ -349,7 +349,7 @@
<ComboBox Name="ComboBoxEraserSize" FontFamily="Microsoft YaHei UI" SelectedIndex="2" SelectionChanged="ComboBoxEraserSize_SelectionChanged">
<ComboBoxItem Content="小" FontFamily="Microsoft YaHei UI"/>
<ComboBoxItem Content="较小" FontFamily="Microsoft YaHei UI"/>
<ComboBoxItem Content="中(默认)" FontFamily="Microsoft YaHei UI"/>
<ComboBoxItem Content="中(默认)" FontFamily="Microsoft YaHei UI"/>
<ComboBoxItem Content="较大" FontFamily="Microsoft YaHei UI"/>
<ComboBoxItem Content="大" FontFamily="Microsoft YaHei UI"/>
</ComboBox>
@ -357,7 +357,6 @@
</GroupBox>
<GroupBox Header="手势">
<ui:SimpleStackPanel Spacing="12">
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerZoom" Header="允许双指缩放" FontFamily="Microsoft YaHei UI" IsOn="True" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerZoom_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotation" Header="允许双指旋转" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
<TextBlock Text="允许选中墨迹后对墨迹进行双指或多指缩放操作(此设置不受“允许双指旋转”设置的影响)" TextWrapping="Wrap" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotationOnSelection" Header="允许双指旋转选中的墨迹" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
@ -378,9 +377,9 @@
<ui:ToggleSwitch Name="ToggleSwitchShowButtonExit" Header="显示“退出”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonExit_Toggled"/>
<Button Content="立即退出" Width="120" Visibility="Collapsed" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="0,0,0,10"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonEraser" Header="显示“橡皮”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonEraser_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonHideControl" Header="显示“⇅ (显示或隐藏控制按钮)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonHideControl_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonLRSwitch" Header="显示“⇆ (左右切换)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonLRSwitch_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonModeFinger" Header="显示“手指模式”切换按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonModeFinger_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonHideControl" Header="显示”⇅ (显示或隐藏控制按钮)“按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonHideControl_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonLRSwitch" Header="显示”⇆ (左右切换)“按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonLRSwitch_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonModeFinger" Header="显示”手指模式“切换按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonModeFinger_Toggled"/>
<StackPanel Visibility="Collapsed" Orientation="Horizontal">
<Slider x:Name="SideControlOpacitySlider"
HorizontalAlignment="Left"
@ -434,7 +433,7 @@
<ui:ToggleSwitch Name="ToggleSwitchAutoKillEasiNote" Header="自动查杀“希沃白板 5”" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoKillEasiNote_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchAutoSaveStrokesAtScreenshot" Header="截图时自动保存墨迹" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoSaveStrokesAtScreenshot_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchAutoSaveStrokesAtClear" Header="清屏时自动截图" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoSaveStrokesAtClear_Toggled"/>
<TextBlock Text="开启后将在结束幻灯片放映时自动将已有墨迹保存至此电脑,并在下次打开时自动加载(文件名和幻灯片页数都相同)" TextWrapping="Wrap" Foreground="#666666"/>
<TextBlock Text="开启后将在结束幻灯片放映时自动将已有墨迹保存至此电脑,并在下次打开时自动加载(文件名和幻灯片页数都相同" TextWrapping="Wrap" Foreground="#666666"/>
<ui:ToggleSwitch Name="ToggleSwitchAutoSaveStrokesInPowerPoint" Header="自动保存幻灯片墨迹" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoSaveStrokesInPowerPoint_Toggled"/>
</ui:SimpleStackPanel>
</GroupBox>
@ -497,7 +496,7 @@
<Button FontFamily="Microsoft YaHei UI"
Width="120" Margin="10"
HorizontalAlignment="Right"
Content="关闭"
Content="关闭设置"
Click="BtnSettings_Click"/>
</Grid>
</Grid>
@ -847,7 +846,7 @@
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorWhite" Background="White" CornerRadius="100" MouseUp="BorderPenColorWhite_MouseUp"
<Border Name="BorderPenColorWhite" Background="#FFE0DED5" CornerRadius="100" MouseUp="BorderPenColorWhite_MouseUp"
Width="{Binding ElementName=BorderPenColorYellow, Path=ActualHeight}">
<Viewbox Name="ViewboxBtnColorWhiteContent" Visibility="Collapsed" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="Black"/>
@ -855,12 +854,12 @@
</Border>
</ui:SimpleStackPanel>
<Grid Width="20" Height="24" Margin="0,0,-2,0" MouseDown="Border_MouseDown" MouseUp="ImageEraser_MouseUp" Visibility="{Binding ElementName=BtnErase, Path=Visibility}">
<Image Margin="-2" Source="{DynamicResource ImageSource.RubberNormal}" RenderTransformOrigin="0.5,0.5">
<Image Margin="-1,-4,-1,-2" Source="{DynamicResource ImageSource.RubberNormal}" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-45"/>
<RotateTransform Angle="-0.172"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
@ -1050,7 +1049,7 @@
<Grid MouseUp="SymbolIconRandOne_MouseUp" MouseDown="Border_MouseDown">
<ui:SymbolIcon Symbol="Shuffle" Foreground="#666666"/>
<Border CornerRadius="50" BorderBrush="#666666" BorderThickness="1"
HorizontalAlignment="Center" Margin="-2,0,0,-2" VerticalAlignment="Bottom" Height="9" Width="9">
HorizontalAlignment="Center" Margin="3,0,3,-2" VerticalAlignment="Bottom" Height="9" Width="9">
<TextBlock Text="1" FontSize="7" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,-0.8,0,0" Foreground="#666666" />
</Border>
</Grid>

View File

@ -122,6 +122,7 @@ namespace Ink_Canvas
if (processes.Length > 0)
{
arg += " /IM EasiNote.exe";
}
}
if (arg != "/F")
@ -133,7 +134,9 @@ namespace Ink_Canvas
if (arg.Contains("EasiNote"))
{
MessageBox.Show("检测到“希沃白板 5”已自动关闭。");
BtnSwitch_Click(BtnSwitch, null);
MessageBox.Show("“希沃白板 5”已自动关闭");
}
}
}
@ -546,14 +549,6 @@ namespace Ink_Canvas
{
Settings.Gesture = new Gesture();
}
if (Settings.Gesture.IsEnableTwoFingerZoom)
{
ToggleSwitchEnableTwoFingerZoom.IsOn = true;
}
else
{
ToggleSwitchEnableTwoFingerZoom.IsOn = false;
}
if (Settings.Gesture.IsEnableTwoFingerRotation)
{
ToggleSwitchEnableTwoFingerRotation.IsOn = true;
@ -1548,8 +1543,6 @@ namespace Ink_Canvas
InkCanvasEditingMode lastInkCanvasEditingMode = InkCanvasEditingMode.Ink;
bool isSingleFingerDragMode = false;
//防止衣服误触造成的墨迹消失
private void inkCanvas_PreviewTouchDown(object sender, TouchEventArgs e)
{
dec.Add(e.TouchDevice.Id);
@ -1563,9 +1556,9 @@ namespace Ink_Canvas
lastTouchDownStrokeCollection = inkCanvas.Strokes.Clone();
}
//设备两个及两个以上,将画笔功能关闭
if (dec.Count > 1 || isSingleFingerDragMode || !Settings.Gesture.IsEnableTwoFingerZoom)
if (dec.Count > 1 || isSingleFingerDragMode)
{
if (isInMultiTouchMode || !Settings.Gesture.IsEnableTwoFingerZoom) return;
if (isInMultiTouchMode) return;
if (inkCanvas.EditingMode != InkCanvasEditingMode.None && inkCanvas.EditingMode != InkCanvasEditingMode.Select)
{
lastInkCanvasEditingMode = inkCanvas.EditingMode;
@ -1628,7 +1621,7 @@ namespace Ink_Canvas
private void Main_Grid_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
{
if (isInMultiTouchMode || !Settings.Gesture.IsEnableTwoFingerZoom) return;
if (isInMultiTouchMode) return;
if ((dec.Count >= 2 && (Settings.Gesture.IsEnableTwoFingerGestureInPresentationMode || StackPanelPPTControls.Visibility != Visibility.Visible || StackPanelPPTButtons.Visibility == Visibility.Collapsed)) || isSingleFingerDragMode)
{
ManipulationDelta md = e.DeltaManipulation;
@ -2566,15 +2559,6 @@ namespace Ink_Canvas
SaveSettingsToFile();
}
private void ToggleSwitchEnableTwoFingerZoom_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;
Settings.Gesture.IsEnableTwoFingerZoom = ToggleSwitchEnableTwoFingerZoom.IsOn;
SaveSettingsToFile();
}
private void ToggleSwitchEnableTwoFingerRotation_Toggled(object sender, RoutedEventArgs e)
{
if (!isLoaded) return;