Brand new UI and more

This commit is contained in:
XY Wang 2021-11-07 18:01:31 +08:00
parent dc2e0fbe8b
commit 39088195bd
8 changed files with 1141 additions and 20 deletions

View File

@ -9,6 +9,7 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ui:ThemeResources RequestedTheme="Light" /> <ui:ThemeResources RequestedTheme="Light" />
<ui:XamlControlsResources /> <ui:XamlControlsResources />
<ResourceDictionary Source="Resources/SeewoImageDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

View File

@ -6,21 +6,35 @@
xmlns:local="clr-namespace:Ink_Canvas" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False" xmlns:local="clr-namespace:Ink_Canvas" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False"
xmlns:ui="http://schemas.modernwpf.com/2019" FontFamily="Microsoft YaHei UI" Topmost="True" xmlns:ui="http://schemas.modernwpf.com/2019" FontFamily="Microsoft YaHei UI" Topmost="True"
mc:Ignorable="d" ui:WindowHelper.UseModernWindowStyle="True" Loaded="Window_Loaded" Closed="Window_Closed" mc:Ignorable="d" ui:WindowHelper.UseModernWindowStyle="True" Loaded="Window_Loaded" Closed="Window_Closed"
Title="" Height="250" Width="500"> Title="" Height="300" Width="600">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="50"/> <RowDefinition Height="50"/>
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="60"/> <RowDefinition Height="60"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Content="紧急修复更新!" FontFamily="Microsoft YaHei UI" FontSize="26" Margin="20,0"/> <Label Content="Ink Canvas 画板焕然一新!" FontFamily="Microsoft YaHei UI" FontSize="26" Margin="20,0"/>
<StackPanel Grid.Row="1"> <StackPanel Grid.Row="1" Visibility="Collapsed">
<TextBlock Name="TextBlockChangeLogTitle" Text="更新日志" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/> <TextBlock Name="TextBlockChangeLogTitle" Text="更新日志" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/>
<TextBlock Name="TextBlockChangeLog" Text="修复无法使用墨迹识别功能的问题。" TextWrapping="Wrap" FontSize="14" Margin="55,5"/> <TextBlock Name="TextBlockChangeLog" Text="修复无法使用墨迹识别功能的问题。" TextWrapping="Wrap" FontSize="14" Margin="55,5"/>
<TextBlock Name="TextBlockChangeLog1" Text="修复墨迹识别功能中部分误识别问题。" TextWrapping="Wrap" FontSize="14" Margin="55,5"/> <TextBlock Name="TextBlockChangeLog1" Text="修复墨迹识别功能中部分误识别问题。" TextWrapping="Wrap" FontSize="14" Margin="55,5"/>
<TextBlock Name="TextBlockSuggestionTitle" Text="建议" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/> <TextBlock Name="TextBlockSuggestionTitle" Text="建议" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/>
<TextBlock Name="TextBlockSuggestion" Text="" TextWrapping="Wrap" FontSize="14" Margin="55,5"/> <TextBlock Name="TextBlockSuggestion" Text="" TextWrapping="Wrap" FontSize="14" Margin="55,5"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="1" Margin="50,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="Resources/InkCanvas.ico"/>
<Viewbox Grid.Column="1" Margin="30">
<ui:SymbolIcon Symbol="Emoji2" Foreground="#0865B5"/>
</Viewbox>
<Viewbox Grid.Column="2" Margin="30">
<ui:SymbolIcon Symbol="Emoji" Foreground="#169141"/>
</Viewbox>
</Grid>
<Label Name="LabelVersion" Grid.Row="2" VerticalContentAlignment="Center" FontSize="12" Margin="20,0"/> <Label Name="LabelVersion" Grid.Row="2" VerticalContentAlignment="Center" FontSize="12" Margin="20,0"/>
<Button Content="确定" Grid.Row="2" HorizontalAlignment="Right" Margin="10" Width="100" FontFamily="Microsoft YaHei UI" Click="Button_Click"/> <Button Content="确定" Grid.Row="2" HorizontalAlignment="Right" Margin="10" Width="100" FontFamily="Microsoft YaHei UI" Click="Button_Click"/>
</Grid> </Grid>

View File

@ -173,6 +173,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Resources\SeewoImageDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="RestoreHiddenSlidesWindow.xaml"> <Page Include="RestoreHiddenSlidesWindow.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>

View File

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.modernwpf.com/2019"
AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize"
mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False" mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False"
Title="Ink Canvas 画板" Height="1000" Width="800" FontFamily="Microsoft YaHei UI" Title="Ink Canvas 画板" Height="1000" Width="1000" FontFamily="Microsoft YaHei UI"
Foreground="Black" Stylus.IsPressAndHoldEnabled="False"> Foreground="Black" Stylus.IsPressAndHoldEnabled="False">
<!--资源中添加命令--> <!--资源中添加命令-->
<Window.Resources> <Window.Resources>
@ -29,7 +29,7 @@
</Window.CommandBindings> </Window.CommandBindings>
<Grid x:Name="Main_Grid" Background="#01FFFFFF" PreviewKeyDown="Main_Grid_PreviewKeyDown"> <Grid x:Name="Main_Grid" Background="#01FFFFFF" PreviewKeyDown="Main_Grid_PreviewKeyDown">
<Grid Name="GridBackgroundCoverHolder"> <Grid Name="GridBackgroundCoverHolder">
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#FFF2F2F2"/> <Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#1F1F1F"/>
</Grid> </Grid>
<Canvas Name="Canvas"/> <Canvas Name="Canvas"/>
<Label Name="Label" Visibility="Collapsed" Content="0"/> <Label Name="Label" Visibility="Collapsed" Content="0"/>
@ -67,10 +67,28 @@
TouchUp="GridInkCanvasSelectionCover_TouchUp" TouchUp="GridInkCanvasSelectionCover_TouchUp"
Background="#01FFFFFF" Opacity="0.01" Visibility="Collapsed"/> Background="#01FFFFFF" Opacity="0.01" Visibility="Collapsed"/>
<Grid Visibility="Collapsed">
<Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}">
<Viewbox Margin="10" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="5">
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlPrevious_MouseUp">
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}"/>
</Grid>
</Border>
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlNext_MouseUp">
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}"/>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Viewbox>
</Grid>
</Grid>
<Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}"> <Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}">
<ui:SimpleStackPanel Spacing="10" Orientation="Horizontal" <ui:SimpleStackPanel Spacing="10" Orientation="Horizontal"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
HorizontalAlignment="Center" HorizontalAlignment="Right"
Height="50" Margin="10" Height="50" Margin="10"
Visibility="{Binding ElementName=GridBackgroundCover, Path=Visibility}"> Visibility="{Binding ElementName=GridBackgroundCover, Path=Visibility}">
<Button Name="BtnWhiteBoardAdd" FontFamily="Microsoft YaHei UI" <Button Name="BtnWhiteBoardAdd" FontFamily="Microsoft YaHei UI"
@ -154,7 +172,7 @@
<Border Name="BorderSettings" Background="White" BorderBrush="Black" <Border Name="BorderSettings" Background="White" BorderBrush="Black"
BorderThickness="1" CornerRadius="10" ui:ThemeManager.RequestedTheme="Light" BorderThickness="1" CornerRadius="10" ui:ThemeManager.RequestedTheme="Light"
Width="400" HorizontalAlignment="Center" Width="400" HorizontalAlignment="Center"
Margin="100" Visibility="Visible"> Margin="0,80,0,120" Visibility="Visible">
<Grid> <Grid>
<ScrollViewer Margin="0,60,0,50" VerticalScrollBarVisibility="Auto" <ScrollViewer Margin="0,60,0,50" VerticalScrollBarVisibility="Auto"
PanningMode="VerticalOnly" ui:ThemeManager.RequestedTheme="Light" PanningMode="VerticalOnly" ui:ThemeManager.RequestedTheme="Light"
@ -220,7 +238,7 @@
<ui:ToggleSwitch Name="ToggleSwitchEnableInkToShape" Header="启用墨迹识别" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableInkToShape_Toggled" IsOn="True"/> <ui:ToggleSwitch Name="ToggleSwitchEnableInkToShape" Header="启用墨迹识别" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableInkToShape_Toggled" IsOn="True"/>
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</GroupBox> </GroupBox>
<GroupBox Header="外观"> <GroupBox Name="GroupBoxAppearance" Header="外观">
<ui:SimpleStackPanel Spacing="12"> <ui:SimpleStackPanel Spacing="12">
<ui:ToggleSwitch Name="ToggleSwitchTransparentButtonBackground" Header="按钮背景半透明" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchTransparentButtonBackground_Toggled"/> <ui:ToggleSwitch Name="ToggleSwitchTransparentButtonBackground" Header="按钮背景半透明" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchTransparentButtonBackground_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonExit" Header="显示“退出”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonExit_Toggled"/> <ui:ToggleSwitch Name="ToggleSwitchShowButtonExit" Header="显示“退出”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonExit_Toggled"/>
@ -341,13 +359,13 @@
</Grid> </Grid>
</Border> </Border>
<Grid Name="GridNotifications" Margin="0,60" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Bottom"> <Grid Name="GridNotifications" Margin="0,110" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<Border CornerRadius="25" Height="50" Background="LightGray" Opacity="0.85"> <Border CornerRadius="25" Height="50" Background="LightGray" Opacity="0.85">
<TextBlock Name="TextBlockNotice" Text="测试文本" Margin="20,10" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"/> <TextBlock Name="TextBlockNotice" Text="测试文本" Margin="20,10" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16"/>
</Border> </Border>
</Grid> </Grid>
<Viewbox Name="ViewBoxStackPanelMain" Margin="10,10,10,55" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="46"> <Viewbox Name="ViewBoxStackPanelMain" Visibility="Visible" Margin="10,10,10,55" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="46">
<StackPanel Name="StackPanelMain" Width="46"> <StackPanel Name="StackPanelMain" Width="46">
<StackPanel Name="StackPanelControl"> <StackPanel Name="StackPanelControl">
<Button Name="BtnExit" Content="退出" FontFamily="Microsoft YaHei UI" <Button Name="BtnExit" Content="退出" FontFamily="Microsoft YaHei UI"
@ -486,7 +504,7 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Viewbox> </Viewbox>
<Viewbox Name="ViewBoxStackPanelShapes" Margin="{Binding ElementName=ViewBoxStackPanelMain, Path=Margin}" Width="46" HorizontalAlignment="Left" VerticalAlignment="Bottom" Visibility="{Binding ElementName=inkCanvas, Path=Visibility}"> <Viewbox Name="ViewBoxStackPanelShapes" Margin="{Binding ElementName=ViewBoxStackPanelMain, Path=Margin}" Width="46" HorizontalAlignment="Left" VerticalAlignment="Bottom" Visibility="Visible">
<StackPanel Name="StackPanelShapes" Width="46"> <StackPanel Name="StackPanelShapes" Width="46">
<Slider HorizontalAlignment="Center" Visibility="Collapsed" <Slider HorizontalAlignment="Center" Visibility="Collapsed"
Minimum="1" Maximum="20" Orientation="Vertical" Minimum="1" Maximum="20" Orientation="Vertical"
@ -592,5 +610,174 @@
<Grid Name="GridForLeftSideReservedSpace" Height="{Binding ElementName=StackPanelInfo, Path=ActualHeight}"/> <Grid Name="GridForLeftSideReservedSpace" Height="{Binding ElementName=StackPanelInfo, Path=ActualHeight}"/>
</StackPanel> </StackPanel>
</Viewbox> </Viewbox>
<Grid Name="GridForRecoverOldUI">
<Grid Visibility="{Binding ElementName=StackPanelPPTControls, Path=Visibility}">
<Viewbox Name="ViewboxPPTSidesControl" Visibility="{Binding ElementName=StackPanelPPTButtons, Path=Visibility}" Opacity="0.7" Margin="10" Height="50" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="5">
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlPrevious_MouseUp">
<Image Name="ImagePPTControlPreviousPressed" Visibility="Collapsed" Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideSelected}"/>
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}"/>
</Grid>
</Border>
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlNext_MouseUp">
<Image Name="ImagePPTControlNextPressed" Visibility="Collapsed" Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideSelected}"/>
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}"/>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Viewbox>
<Viewbox Visibility="{Binding ElementName=StackPanelPPTButtons, Path=Visibility}" Opacity="{Binding ElementName=ViewboxPPTSidesControl, Path=Opacity}" Margin="10" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="5">
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlPrevious_MouseUp">
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}"/>
</Grid>
</Border>
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<Grid Margin="6" MouseUp="GridPPTControlNext_MouseUp">
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}"/>
</Grid>
</Border>
</ui:SimpleStackPanel>
</Viewbox>
</Grid>
</Grid>
<Viewbox Name="ViewboxFloatingBar" Margin="100,10,-2000,-200"
HorizontalAlignment="Left" Height="50" VerticalAlignment="Top">
<ui:SimpleStackPanel Orientation="Horizontal">
<Border Width="36" Height="36" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666" MouseDown="SymbolIconEmoji_MouseDown" MouseUp="SymbolIconEmoji_MouseUp">
<ui:SimpleStackPanel Margin="0,5,0,5" Spacing="10" Orientation="Horizontal"
HorizontalAlignment="Center">
<ui:SymbolIcon Name="SymbolIconEmoji" Symbol="Emoji2" Foreground="#666666"/>
</ui:SimpleStackPanel>
</Border>
<Border Margin="5,0,0,0" Visibility="Visible" Height="36" Name="BorderFloatingBarMainControls" Background="#9FFFFFFF" CornerRadius="5" BorderThickness="1" BorderBrush="#BF666666">
<ui:SimpleStackPanel Name="StackPanelFloatingBar" Spacing="10" Orientation="Horizontal">
<ui:SimpleStackPanel Name="StackPanelCanvacMain" Margin="10,5,0,5" Spacing="10" Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
<Grid Height="24" Width="0">
</Grid>
<ui:SymbolIcon Symbol="Edit" Margin="-10,0,0,0" Foreground="#666666" MouseUp="SymbolIconCursor_MouseUp"/>
<ui:SymbolIcon Symbol="Setting" Foreground="#666666" MouseUp="SymbolIconSettings_MouseUp"/>
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Name="StackPanelCanvasControls" Visibility="Visible" Margin="10,5,0,5" Spacing="10" Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
<ui:SymbolIcon Symbol="TouchPointer" MouseUp="SymbolIconCursor_MouseUp" Foreground="#666666"/>
<ui:SimpleStackPanel Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}" Spacing="8" Margin="0,1">
<Border Name="BorderPenColorBlack" Background="{Binding ElementName=BtnColorBlack, Path=Background}" MouseUp="BorderPenColorBlack_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorBlack, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorBlackContent, Path=Visibility}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorRed" Background="{Binding ElementName=BtnColorRed, Path=Background}" MouseUp="BorderPenColorRed_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorRed, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorRedContent, Path=Visibility}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorGreen" Background="{Binding ElementName=BtnColorGreen, Path=Background}" MouseUp="BorderPenColorGreen_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorGreen, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorGreenContent, Path=Visibility}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorBlue" Background="{Binding ElementName=BtnColorBlue, Path=Background}" MouseUp="BorderPenColorBlue_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorBlue, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorBlueContent, Path=Visibility}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorYellow" Background="{Binding ElementName=BtnColorYellow, Path=Background}" MouseUp="BorderPenColorYellow_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorYellow, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorYellowContent, Path=Visibility}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorWhite" Background="White" CornerRadius="100" MouseUp="BorderPenColorWhite_MouseUp"
Width="{Binding ElementName=BorderPenColorYellow, Path=ActualHeight}">
<Viewbox Name="ViewboxBtnColorWhiteContent" Visibility="Collapsed" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="Black"/>
</Viewbox>
</Border>
</ui:SimpleStackPanel>
<Grid Margin="0,0,0,0" Width="20">
<ui:SymbolIcon Symbol="Delete" Foreground="#666666" MouseUp="SymbolIconDelete_MouseUp"/>
<Border x:Name="BorderClearInDelete" Visibility="Collapsed" Background="White" BorderBrush="#BF666666" BorderThickness="1"
CornerRadius="5" Margin="-40,-60,-40,35">
<Button Content="点击清屏" ui:ThemeManager.RequestedTheme="Light"
FontFamily="Microsoft YaHei UI"
Width="80" HorizontalAlignment="Center"
Click="BtnClear_Click"/>
</Border>
</Grid>
<ui:SymbolIcon Symbol="SelectAll" Foreground="#666666" MouseUp="SymbolIconSelect_MouseUp"/>
<Viewbox Margin="0,2">
<Grid>
<ui:SymbolIcon Symbol="Undo" Foreground="#666666"
Visibility="{Binding ElementName=BtnUndo, Path=Visibility}"
IsEnabled="{Binding ElementName=BtnUndo, Path=IsEnabled}"
MouseUp="SymbolIconUndo_MouseUp"/>
<ui:SymbolIcon Symbol="Redo" Foreground="#666666"
Visibility="{Binding ElementName=BtnRedo, Path=Visibility}"
IsEnabled="{Binding ElementName=BtnRedo, Path=IsEnabled}"
MouseUp="SymbolIconRedo_MouseUp"/>
</Grid>
</Viewbox>
</ui:SimpleStackPanel>
<ui:SimpleStackPanel Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
<Grid Width="20" Height="24" Margin="2,0,12,2">
<Image Margin="-8" MouseUp="ImageBlackboard_MouseUp">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V64 H64 V0 H0 Z">
<DrawingGroup Opacity="1">
<GeometryDrawing Brush="#666666" Geometry="F1 M64,64z M0,0z M15.125,48.875L15.125,17.375 21.875,17.375 21.875,15.125 24.125,15.125 24.125,17.375 39.875,17.375 39.875,15.125 42.125,15.125 42.125,17.375 48.875,17.375 48.875,48.875 M46.625,46.625L46.625,26.375 17.375,26.375 17.375,46.625 M17.375,24.125L46.625,24.125 46.625,19.625 42.125,19.625 42.125,21.875 39.875,21.875 39.875,19.625 24.125,19.625 24.125,21.875 21.875,21.875 21.875,19.625 17.375,19.625 17.375,24.125z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
<Grid Margin="0,5,0,5" Visibility="{Binding ElementName=StackPanelPPTButtons, Path=Visibility}">
<Image Source="{DynamicResource ResourceKey=SeewoImageSource.PPTExitNormal}" Visibility="{Binding ElementName=BtnPPTSlideShowEnd, Path=Visibility}" MouseUp="ImagePPTControlEnd_MouseUp" Margin="-2,1,10,2"/>
</Grid>
<ui:SimpleStackPanel Margin="0,5,10,5" Spacing="10" Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
<ui:SymbolIcon Margin="0,0,0,0" Symbol="Camera" Foreground="#666666" MouseUp="SymbolIconScreenshot_MouseUp"/>
<Grid Height="24" Width="20">
<ui:SymbolIcon Symbol="Repair" Foreground="#666666" MouseUp="SymbolIconTools_MouseUp"/>
<Border Name="BorderTools" Margin="37,-6,-90,-6" CornerRadius="5" Background="#9FFFFFFF" BorderThickness="1" BorderBrush="#BF666666">
<ui:SimpleStackPanel Margin="10,5,0,5" Spacing="10" Orientation="Horizontal">
<Grid Width="20" Height="24" Margin="0,-2,0,2">
<Image Margin="-7" MouseUp="ImageCountdownTimer_MouseUp">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V64 H64 V0 H0 Z">
<DrawingGroup Opacity="1">
<GeometryDrawing Brush="#666666" Geometry="F1 M64,64z M0,0z M42.811,22.789C44.393,24.383 45.612,26.126 46.467,28.018 47.322,29.91 47.75,31.988 47.75,34.249 47.75,35.702 47.562,37.1 47.188,38.441 46.814,39.782 46.283,41.037 45.597,42.203 44.911,43.369 44.091,44.43 43.136,45.385 42.181,46.34 41.12,47.16 39.954,47.846 38.788,48.532 37.534,49.062 36.192,49.437 34.85,49.812 33.453,50 32,50 30.547,50 29.149,49.812 27.808,49.438 26.467,49.064 25.212,48.533 24.046,47.847 22.88,47.161 21.819,46.341 20.864,45.386 19.909,44.431 19.089,43.37 18.403,42.204 17.717,41.038 17.187,39.784 16.812,38.442 16.437,37.1 16.25,35.703 16.25,34.25 16.25,32.949 16.405,31.684 16.716,30.453 17.027,29.222 17.466,28.062 18.034,26.973 18.602,25.884 19.291,24.872 20.099,23.941 20.907,23.01 21.81,22.183 22.806,21.462 23.802,20.741 24.886,20.141 26.058,19.66 27.23,19.179 28.46,18.846 29.749,18.658L29.749,16.25 25.249,16.25 25.249,14 36.5,14 36.5,16.25 32,16.25 32,18.5C33.629,18.5 35.214,18.74 36.755,19.221 38.296,19.702 39.729,20.416 41.053,21.366L44.709,17.71 46.291,19.292 42.811,22.789z M32,47.75C33.863,47.75 35.612,47.396 37.247,46.687 38.882,45.978 40.311,45.011 41.536,43.787 42.761,42.563 43.727,41.133 44.436,39.498 45.145,37.863 45.5,36.113 45.5,34.25 45.5,32.387 45.146,30.638 44.437,29.003 43.728,27.368 42.761,25.939 41.537,24.714 40.313,23.489 38.883,22.523 37.248,21.814 35.613,21.105 33.863,20.75 32,20.75 30.137,20.75 28.388,21.104 26.753,21.813 25.118,22.522 23.689,23.489 22.464,24.713 21.239,25.937 20.273,27.367 19.564,29.002 18.855,30.637 18.5,32.387 18.5,34.25 18.5,36.113 18.854,37.862 19.563,39.497 20.272,41.132 21.239,42.561 22.463,43.786 23.687,45.011 25.117,45.977 26.752,46.686 28.387,47.395 30.137,47.75 32,47.75z M38.75,34.25L38.75,36.5 29.75,36.5 29.75,25.25 32,25.25 32,34.25 38.75,34.25z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Grid>
<ui:SymbolIcon Symbol="Shuffle" Foreground="#666666" MouseUp="SymbolIconRand_MouseUp"/>
</ui:SimpleStackPanel>
</Border>
</Grid>
</ui:SimpleStackPanel>
</ui:SimpleStackPanel>
</ui:SimpleStackPanel>
</Border>
</ui:SimpleStackPanel>
</Viewbox>
<Grid Name="GridForFloatingBarDraging" Background="#01000000" Visibility="Collapsed"
MouseMove="SymbolIconEmoji_MouseMove" MouseUp="SymbolIconEmoji_MouseUp"/>
</Grid> </Grid>
</Window> </Window>

View File

@ -61,6 +61,21 @@ namespace Ink_Canvas
Topmost = false; Topmost = false;
} }
if (!App.StartArgs.Contains("-o")) //-old ui
{
GroupBoxAppearance.Visibility = Visibility.Collapsed;
ViewBoxStackPanelMain.Visibility = Visibility.Collapsed;
ViewBoxStackPanelShapes.Visibility = Visibility.Collapsed;
HideSubPanels();
ViewboxFloatingBar.Margin = new Thickness((SystemParameters.WorkArea.Width - 284) / 2, SystemParameters.WorkArea.Height - 80, -2000, -200);
}
else
{
ViewboxFloatingBar.Visibility = Visibility.Collapsed;
GridForRecoverOldUI.Visibility = Visibility.Collapsed;
}
InitTimers(); InitTimers();
} }
@ -649,6 +664,7 @@ namespace Ink_Canvas
private void BtnClear_Click(object sender, RoutedEventArgs e) private void BtnClear_Click(object sender, RoutedEventArgs e)
{ {
forceEraser = false; forceEraser = false;
BorderClearInDelete.Visibility = Visibility.Collapsed;
if (inkCanvas.Strokes.Count != 0) if (inkCanvas.Strokes.Count != 0)
{ {
@ -982,6 +998,17 @@ namespace Ink_Canvas
StackPanelPPTButtons.Visibility = Visibility.Visible; StackPanelPPTButtons.Visibility = Visibility.Visible;
BtnHideInkCanvas.Content = "显示\n画板"; BtnHideInkCanvas.Content = "显示\n画板";
} }
if (Main_Grid.Background == Brushes.Transparent)
{
StackPanelCanvasControls.Visibility = Visibility.Collapsed;
StackPanelCanvacMain.Visibility = Visibility.Visible;
}
else
{
StackPanelCanvasControls.Visibility = Visibility.Visible;
StackPanelCanvacMain.Visibility = Visibility.Collapsed;
}
} }
private void BtnSwitchSide_Click(object sender, RoutedEventArgs e) private void BtnSwitchSide_Click(object sender, RoutedEventArgs e)
@ -1039,6 +1066,7 @@ namespace Ink_Canvas
ViewboxBtnColorGreenContent.Visibility = Visibility.Collapsed; ViewboxBtnColorGreenContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorRedContent.Visibility = Visibility.Collapsed; ViewboxBtnColorRedContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorYellowContent.Visibility = Visibility.Collapsed; ViewboxBtnColorYellowContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorWhiteContent.Visibility = Visibility.Collapsed;
switch (inkColor) switch (inkColor)
{ {
case 0: case 0:
@ -1056,6 +1084,9 @@ namespace Ink_Canvas
case 4: case 4:
ViewboxBtnColorYellowContent.Visibility = Visibility.Visible; ViewboxBtnColorYellowContent.Visibility = Visibility.Visible;
break; break;
case 5:
ViewboxBtnColorWhiteContent.Visibility = Visibility.Visible;
break;
} }
} }
@ -1169,6 +1200,8 @@ namespace Ink_Canvas
bool isLastTouchEraser = false; bool isLastTouchEraser = false;
private void Main_Grid_TouchDown(object sender, TouchEventArgs e) private void Main_Grid_TouchDown(object sender, TouchEventArgs e)
{ {
BorderClearInDelete.Visibility = Visibility.Collapsed;
iniP = e.GetTouchPoint(inkCanvas).Position; iniP = e.GetTouchPoint(inkCanvas).Position;
double boundsWidth = GetTouchBoundWidth(e); double boundsWidth = GetTouchBoundWidth(e);
@ -1525,7 +1558,7 @@ namespace Ink_Canvas
{ {
//调整颜色 //调整颜色
double screenRatio = SystemParameters.PrimaryScreenWidth / SystemParameters.PrimaryScreenHeight; double screenRatio = SystemParameters.PrimaryScreenWidth / SystemParameters.PrimaryScreenHeight;
if (Math.Abs(screenRatio - 16.0 / 9) <= 0.01) if (Math.Abs(screenRatio - 16.0 / 9) <= -0.01)
{ {
if (Wn.Presentation.PageSetup.SlideWidth / Wn.Presentation.PageSetup.SlideHeight < 1.65) if (Wn.Presentation.PageSetup.SlideWidth / Wn.Presentation.PageSetup.SlideHeight < 1.65)
{ {
@ -1547,7 +1580,7 @@ namespace Ink_Canvas
} }
} }
} }
else if(screenRatio == 256 / 135) else if(screenRatio == -256 / 135)
{ {
} }
@ -1555,6 +1588,9 @@ namespace Ink_Canvas
slidescount = Wn.Presentation.Slides.Count; slidescount = Wn.Presentation.Slides.Count;
memoryStreams = new MemoryStream[slidescount + 2]; memoryStreams = new MemoryStream[slidescount + 2];
pointDesktop = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
pointPPT = new Point(-1, -1);
StackPanelPPTControls.Visibility = Visibility.Visible; StackPanelPPTControls.Visibility = Visibility.Visible;
BtnPPTSlideShow.Visibility = Visibility.Collapsed; BtnPPTSlideShow.Visibility = Visibility.Collapsed;
BtnPPTSlideShowEnd.Visibility = Visibility.Visible; BtnPPTSlideShowEnd.Visibility = Visibility.Visible;
@ -1596,6 +1632,15 @@ namespace Ink_Canvas
BtnUndo.Visibility = Visibility.Visible; BtnUndo.Visibility = Visibility.Visible;
inkCanvas.Strokes.Clear(); inkCanvas.Strokes.Clear();
new Thread(new ThreadStart(() =>
{
Thread.Sleep(100);
Application.Current.Dispatcher.Invoke(() =>
{
ViewboxFloatingBar.Margin = new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200);
});
})).Start();
}); });
previousSlideID = Wn.View.CurrentShowPosition; previousSlideID = Wn.View.CurrentShowPosition;
} }
@ -1672,6 +1717,11 @@ namespace Ink_Canvas
{ {
BtnHideInkCanvas_Click(BtnHideInkCanvas, null); BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
} }
if (pointDesktop != new Point(-1, -1))
{
ViewboxFloatingBar.Margin = new Thickness(pointDesktop.X, pointDesktop.Y, -2000, -200);
}
}); });
} }
@ -3019,8 +3069,8 @@ namespace Ink_Canvas
{ {
var shape = result.InkDrawingNode.GetShape(); var shape = result.InkDrawingNode.GetShape();
var p = result.InkDrawingNode.HotPoints; var p = result.InkDrawingNode.HotPoints;
if ((Math.Max(Math.Max(p[0].X, p[1].X), p[2].X) - Math.Min(Math.Min(p[0].X, p[1].X), p[2].X) >= 75 || if ((Math.Max(Math.Max(p[0].X, p[1].X), p[2].X) - Math.Min(Math.Min(p[0].X, p[1].X), p[2].X) >= 100 ||
Math.Max(Math.Max(p[0].Y, p[1].Y), p[2].Y) - Math.Min(Math.Min(p[0].Y, p[1].Y), p[2].Y) >= 75) && result.InkDrawingNode.HotPoints.Count == 3) Math.Max(Math.Max(p[0].Y, p[1].Y), p[2].Y) - Math.Min(Math.Min(p[0].Y, p[1].Y), p[2].Y) >= 100) && result.InkDrawingNode.HotPoints.Count == 3)
{ {
//纠正垂直与水平关系 //纠正垂直与水平关系
var newPoints = FixPointsDirection(p[0], p[1]); var newPoints = FixPointsDirection(p[0], p[1]);
@ -3053,8 +3103,8 @@ namespace Ink_Canvas
{ {
var shape = result.InkDrawingNode.GetShape(); var shape = result.InkDrawingNode.GetShape();
var p = result.InkDrawingNode.HotPoints; var p = result.InkDrawingNode.HotPoints;
if ((Math.Max(Math.Max(Math.Max(p[0].X, p[1].X), p[2].X), p[3].X) - Math.Min(Math.Min(Math.Min(p[0].X, p[1].X), p[2].X), p[3].X) >= 75 || if ((Math.Max(Math.Max(Math.Max(p[0].X, p[1].X), p[2].X), p[3].X) - Math.Min(Math.Min(Math.Min(p[0].X, p[1].X), p[2].X), p[3].X) >= 100 ||
Math.Max(Math.Max(Math.Max(p[0].Y, p[1].Y), p[2].Y), p[3].Y) - Math.Min(Math.Min(Math.Min(p[0].Y, p[1].Y), p[2].Y), p[3].Y) >= 75) && result.InkDrawingNode.HotPoints.Count == 4) Math.Max(Math.Max(Math.Max(p[0].Y, p[1].Y), p[2].Y), p[3].Y) - Math.Min(Math.Min(Math.Min(p[0].Y, p[1].Y), p[2].Y), p[3].Y) >= 100) && result.InkDrawingNode.HotPoints.Count == 4)
{ {
//纠正垂直与水平关系 //纠正垂直与水平关系
var newPoints = FixPointsDirection(p[0], p[1]); var newPoints = FixPointsDirection(p[0], p[1]);
@ -3142,7 +3192,8 @@ namespace Ink_Canvas
int n = e.Stroke.StylusPoints.Count - 1; int n = e.Stroke.StylusPoints.Count - 1;
double pressure = 0.1; double pressure = 0.1;
int x = 10; int x = 10;
if(n >= x) if (n == 1) return;
if (n >= x)
{ {
for (int i = 0; i < n - x; i++) for (int i = 0; i < n - x; i++)
{ {
@ -3511,6 +3562,293 @@ namespace Ink_Canvas
} }
#endregion Tools #endregion Tools
#region Float Bar
private void HideSubPanels()
{
BorderClearInDelete.Visibility = Visibility.Collapsed;
BorderTools.Visibility = Visibility.Collapsed;
}
private void BorderPenColorBlack_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnColorBlack_Click(BtnColorBlack, null);
HideSubPanels();
}
private void BorderPenColorRed_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnColorRed_Click(BtnColorRed, null);
HideSubPanels();
}
private void BorderPenColorGreen_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnColorGreen_Click(BtnColorGreen, null);
HideSubPanels();
}
private void BorderPenColorBlue_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnColorBlue_Click(BtnColorBlue, null);
HideSubPanels();
}
private void BorderPenColorYellow_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnColorYellow_Click(BtnColorYellow, null);
HideSubPanels();
}
private void BorderPenColorWhite_MouseUp(object sender, MouseButtonEventArgs e)
{
inkCanvas.DefaultDrawingAttributes.Color = Colors.White;
inkColor = 5;
ColorSwitchCheck();
HideSubPanels();
}
private void SymbolIconUndo_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnUndo_Click(BtnUndo, null);
HideSubPanels();
}
private void SymbolIconRedo_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnRedo_Click(BtnRedo, null);
HideSubPanels();
}
private void SymbolIconCursor_MouseUp(object sender, MouseButtonEventArgs e)
{
if (currentMode != 0)
{
ImageBlackboard_MouseUp(null, null);
}
else
{
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
}
}
private void SymbolIconDelete_MouseUp(object sender, MouseButtonEventArgs e)
{
if (inkCanvas.Strokes.Count > 0)
{
BtnClear_Click(BtnClear, null);
}
else
{
if (currentMode == 0 && BtnPPTSlideShowEnd.Visibility != Visibility.Visible)
{
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
}
}
}
private void SymbolIconSettings_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnSettings_Click(BtnSettings, null);
HideSubPanels();
}
private void SymbolIconSelect_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnSelect_Click(BtnSelect, null);
ViewboxBtnColorBlackContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorBlueContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorGreenContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorRedContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorYellowContent.Visibility = Visibility.Collapsed;
ViewboxBtnColorWhiteContent.Visibility = Visibility.Collapsed;
HideSubPanels();
}
private void SymbolIconScreenshot_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnScreenshot_Click(BtnScreenshot, null);
}
Point pointDesktop = new Point(-1, -1); //用于记录上次进入PPT或白板时的坐标
Point pointPPT = new Point(-1, -1); //用于记录上次在PPT中打开白板时的坐标
private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e)
{
if (currentMode == 0)
{
//进入黑板
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)
{
pointDesktop = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
}
else
{
pointPPT = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
}
ViewboxFloatingBar.Margin = new Thickness(10, SystemParameters.PrimaryScreenHeight - 60, -2000, -200);
}
else
{
//关闭黑板
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)
{
if (pointDesktop != new Point(-1, -1))
{
ViewboxFloatingBar.Margin = new Thickness(pointDesktop.X, pointDesktop.Y, -2000, -200);
pointDesktop = new Point(-1, -1);
}
}
else
{
new Thread(new ThreadStart(() =>
{
Thread.Sleep(100);
Application.Current.Dispatcher.Invoke(() =>
{
ViewboxFloatingBar.Margin = new Thickness((SystemParameters.PrimaryScreenWidth - ViewboxFloatingBar.ActualWidth) / 2, SystemParameters.PrimaryScreenHeight - 60, -2000, -200);
});
})).Start();
}
}
BtnSwitch_Click(BtnSwitch, null);
if (currentMode == 0 && inkCanvas.Strokes.Count == 0 && BtnPPTSlideShowEnd.Visibility != Visibility.Visible)
{
BtnHideInkCanvas_Click(BtnHideInkCanvas, null);
}
BtnExit.Foreground = Brushes.White;
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Dark;
}
private void ImageCountdownTimer_MouseUp(object sender, MouseButtonEventArgs e)
{
BorderTools.Visibility = Visibility.Collapsed;
BtnCountdownTimer_Click(BtnCountdownTimer, null);
}
private void SymbolIconRand_MouseUp(object sender, MouseButtonEventArgs e)
{
BorderTools.Visibility = Visibility.Collapsed;
BtnRand_Click(BtnRand, null);
}
private void SymbolIconTools_MouseUp(object sender, MouseButtonEventArgs e)
{
if (BorderTools.Visibility == Visibility.Visible)
{
BorderTools.Visibility = Visibility.Collapsed;
}
else
{
BorderTools.Visibility = Visibility.Visible;
}
}
#region Drag
bool isDragDropInEffect = false;
Point pos = new Point();
Point downPos = new Point();
void Element_MouseMove(object sender, MouseEventArgs e)
{
if (isDragDropInEffect)
{
FrameworkElement currEle = sender as FrameworkElement;
double xPos = e.GetPosition(null).X - pos.X + currEle.Margin.Left;
double yPos = e.GetPosition(null).Y - pos.Y + currEle.Margin.Top;
currEle.Margin = new Thickness(xPos, yPos, 0, 0);
pos = e.GetPosition(null);
}
}
void Element_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
FrameworkElement fEle = sender as FrameworkElement;
isDragDropInEffect = true;
pos = e.GetPosition(null);
fEle.CaptureMouse();
fEle.Cursor = Cursors.Hand;
}
void Element_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (isDragDropInEffect)
{
FrameworkElement ele = sender as FrameworkElement;
isDragDropInEffect = false;
ele.ReleaseMouseCapture();
}
}
void SymbolIconEmoji_MouseMove(object sender, MouseEventArgs e)
{
if (isDragDropInEffect)
{
double xPos = e.GetPosition(null).X - pos.X + ViewboxFloatingBar.Margin.Left;
double yPos = e.GetPosition(null).Y - pos.Y + ViewboxFloatingBar.Margin.Top;
ViewboxFloatingBar.Margin = new Thickness(xPos, yPos, -2000, -200);
pos = e.GetPosition(null);
}
}
void SymbolIconEmoji_MouseDown(object sender, MouseButtonEventArgs e)
{
isDragDropInEffect = true;
pos = e.GetPosition(null);
downPos = e.GetPosition(null);
GridForFloatingBarDraging.Visibility = Visibility.Visible;
SymbolIconEmoji.Symbol = ModernWpf.Controls.Symbol.Emoji;
}
void SymbolIconEmoji_MouseUp(object sender, MouseButtonEventArgs e)
{
isDragDropInEffect = false;
if (downPos.X == e.GetPosition(null).X && downPos.Y == e.GetPosition(null).Y)
{
if (BorderFloatingBarMainControls.Visibility == Visibility.Visible)
{
BorderFloatingBarMainControls.Visibility = Visibility.Collapsed;
}
else
{
BorderFloatingBarMainControls.Visibility = Visibility.Visible;
}
}
GridForFloatingBarDraging.Visibility = Visibility.Collapsed;
SymbolIconEmoji.Symbol = ModernWpf.Controls.Symbol.Emoji2;
}
#endregion
private void GridPPTControlPrevious_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnPPTSlidesUp_Click(BtnPPTSlidesUp, null);
}
private void GridPPTControlNext_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}
private void ImagePPTControlEnd_MouseUp(object sender, MouseButtonEventArgs e)
{
BtnPPTSlideShowEnd_Click(BtnPPTSlideShowEnd, null);
}
#endregion
} }
#region Test for pen #region Test for pen

View File

@ -51,5 +51,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.1.1")] [assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("2.4.1.1")] [assembly: AssemblyFileVersion("3.0.0.0")]

View File

@ -0,0 +1,563 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingImage
x:Key="SeewoImageSource.PreviousSlideNormal">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="{x:Null}">
<GeometryDrawing.Pen>
<Pen
Brush="#FF666666"
Thickness="2"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,13C7.8615516,13.5677816,7.8615516,14.4322348,8,15L22,27C22.8092249,27.3762198,24,26.8227297,24,26L24,2C24,1.1772867,22.8092249,0.623796567,22,1L8,13z"
Transform="-6.12303176911189E-17,1,-1,-6.12303176911189E-17,30,-2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.PreviousSlideSelected">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FF666666"
Opacity="1"
Transform="-6.12303176911189E-17,1,-1,-6.12303176911189E-17,30,-2" />
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,13C7.8615516,13.5677816,7.8615516,14.4322348,8,15L22,27C22.8092249,27.3762198,24,26.8227297,24,26L24,2C24,1.1772867,22.8092249,0.623796567,22,1L8,13z"
Transform="-6.12303176911189E-17,1,-1,-6.12303176911189E-17,30,-2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.NextSlideNormal">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="{x:Null}">
<GeometryDrawing.Pen>
<Pen
Brush="#FF666666"
Thickness="2"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,17C7.8615516,17.5677816,7.8615516,18.4322348,8,19L22,31C22.8092249,31.3762198,24,30.8227297,24,30L24,6C24,5.1772867,22.8092249,4.62379657,22,5L8,17z"
Transform="-6.12303176911189E-17,-1,-1,6.12303176911189E-17,34,34" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.NextSlideSelected">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FF666666"
Opacity="1"
Transform="-6.12303176911189E-17,-1,-1,6.12303176911189E-17,34,34" />
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,17C7.8615516,17.5677816,7.8615516,18.4322348,8,19L22,31C22.8092249,31.3762198,24,30.8227297,24,30L24,6C24,5.1772867,22.8092249,4.62379657,22,5L8,17z"
Transform="-6.12303176911189E-17,-1,-1,6.12303176911189E-17,34,34" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.HorizontalPreviousSlideNormal">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<StreamGeometry>M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="{x:Null}">
<GeometryDrawing.Pen>
<Pen
Brush="#FF666666"
Thickness="2"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<StreamGeometry>M7,15C6.85289858,15.5677816,6.85289858,16.4322348,7,17L22,29C22.7348015,29.3762198,24,28.8227297,24,28L24,4C24,3.1772867,22.7348015,2.62379657,22,3L7,15z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.HorizontalPreviousSlideSelected">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<StreamGeometry>M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<StreamGeometry>M7,15C6.85289858,15.5677816,6.85289858,16.4322348,7,17L22,29C22.7348015,29.3762198,24,28.8227297,24,28L24,4C24,3.1772867,22.7348015,2.62379657,22,3L7,15z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.HorizontalNextSlideNormal">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<StreamGeometry>M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="{x:Null}">
<GeometryDrawing.Pen>
<Pen
Brush="#FF666666"
Thickness="2"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,15C7.85289858,15.5677816,7.85289858,16.4322348,8,17L23,29C23.7348015,29.3762198,25,28.8227297,25,28L25,4C25,3.1772867,23.7348015,2.62379657,23,3L8,15z"
Transform="-1,0,0,1,33,0" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.HorizontalNextSlideSelected">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<StreamGeometry>M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z</StreamGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FF666666"
Opacity="1"
Transform="-1,0,0,1,33,0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M8,15C7.85289858,15.5677816,7.85289858,16.4322348,8,17L23,29C23.7348015,29.3762198,25,28.8227297,25,28L25,4C25,3.1772867,23.7348015,2.62379657,23,3L8,15z"
Transform="-1,0,0,1,33,0" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.PPTExitNormal">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<DrawingGroup
Transform="1,0,0,1,1,2">
<DrawingGroup.Children>
<GeometryDrawing
Brush="{x:Null}">
<GeometryDrawing.Pen>
<Pen
Brush="#FF666666"
Thickness="2"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter" />
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="3,3,24,16" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M13.5355339,10.9497475L10,14.4852814 11.4142136,15.8994949 14.9497475,12.363961 18.4852814,15.8994949 19.8994949,14.4852814 16.363961,10.9497475 19.8994949,7.41421356 18.4852814,6 14.9497475,9.53553391 11.4142136,6 10,7.41421356 13.5355339,10.9497475z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="14,19,2,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="0,2,30,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="13,0,4,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="7,26,16,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage
x:Key="SeewoImageSource.PPTExitSelected">
<DrawingImage.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing>
<GeometryDrawing.Brush>
<SolidColorBrush
Color="#FFD8D8D8"
Opacity="0" />
</GeometryDrawing.Brush>
<GeometryDrawing.Pen>
<Pen
Thickness="1"
StartLineCap="Flat"
EndLineCap="Flat"
LineJoin="Miter">
<Pen.Brush>
<SolidColorBrush
Color="#FF979797"
Opacity="0" />
</Pen.Brush>
</Pen>
</GeometryDrawing.Pen>
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M31,31L32,31 32,32 31,32 31,31z M0,0L1,0 1,1 0,1 0,0z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<DrawingGroup
Transform="1,0,0,1,1,2">
<DrawingGroup.Children>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<PathGeometry
FillRule="EvenOdd"
Figures="M13.5857864,11L10.0502525,14.5355339 11.4644661,15.9497475 15,12.4142136 18.5355339,15.9497475 19.9497475,14.5355339 16.4142136,11 19.9497475,7.46446609 18.5355339,6.05025253 15,9.58578644 11.4644661,6.05025253 10.0502525,7.46446609 13.5857864,11z M2,2L28,2 28,20 2,20 2,2z" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="14,19,2,8" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="0,2,30,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="13,0,4,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing
Brush="#FF666666">
<GeometryDrawing.Geometry>
<RectangleGeometry
RadiusX="0"
RadiusY="0"
Rect="7,26,16,2" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>

View File

@ -58,7 +58,21 @@
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings> </windowsSettings>
</application> </application>
--> -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- dpiAwareness is recognized only on Win10 1607(aka RS1)+ -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
<!-- Prior to Win10 1607, WPF really doesn't support per-mon DPI. Do not specify true/pm - use just true -->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<!-- optional -->
<!--
<highResolutionScrollingAware>true</highResolutionScrollingAware>
<ultraHighResolutionScrollingAware>true</ultraHighResolutionScrollingAware>
-->
</windowsSettings>
</application>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) --> <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->