[update] 幽默新设置窗口UI

This commit is contained in:
Dubi906w 2024-08-22 21:59:27 +08:00
parent 301deea0f9
commit 4667b7fd89
10 changed files with 672 additions and 152 deletions

View File

@ -15,6 +15,8 @@ using Window = System.Windows.Window;
using System.Windows.Shell; using System.Windows.Shell;
using Ookii.Dialogs.Wpf; using Ookii.Dialogs.Wpf;
using System.Diagnostics; using System.Diagnostics;
using Ink_Canvas.Popups;
using Ink_Canvas.Windows;
using Lierda.WPFHelper; using Lierda.WPFHelper;
namespace Ink_Canvas namespace Ink_Canvas
@ -115,6 +117,9 @@ namespace Ink_Canvas
} }
mainWin.Show(); mainWin.Show();
var setW = new SettingsWindow();
setW.Show();
_taskbar = (TaskbarIcon)FindResource("TaskbarTrayIcon"); _taskbar = (TaskbarIcon)FindResource("TaskbarTrayIcon");
LierdaCracker cracker = new LierdaCracker(); LierdaCracker cracker = new LierdaCracker();

View File

@ -25,6 +25,7 @@
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<Configurations>Debug;Release;x86 Debug</Configurations> <Configurations>Debug;Release;x86 Debug</Configurations>
<Deterministic>false</Deterministic>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>embedded</DebugType> <DebugType>embedded</DebugType>
@ -597,6 +598,9 @@
<None Update="custom-copyright-banner.png"> <None Update="custom-copyright-banner.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="icc-about-illustrations.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="v6\" /> <Folder Include="v6\" />

View File

@ -17,9 +17,6 @@
<Compile Update="Popups\ColorPalette.xaml.cs"> <Compile Update="Popups\ColorPalette.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="Popups\FloatingBarWindowV2.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Popups\ScreenshotWindow.xaml.cs"> <Compile Update="Popups\ScreenshotWindow.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -29,6 +26,9 @@
<Compile Update="Popups\ShapeDrawingPopup.xaml.cs"> <Compile Update="Popups\ShapeDrawingPopup.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="Windows\SettingsWindow.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Update="MainWindow_cs\MW_ContextMenus.xaml"> <Page Update="MainWindow_cs\MW_ContextMenus.xaml">
@ -46,12 +46,6 @@
<Page Update="Popups\ColorPalette.xaml"> <Page Update="Popups\ColorPalette.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="Popups\FloatingBarV2Resources.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Popups\FloatingBarWindowV2.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Popups\ScreenshotWindow.xaml"> <Page Update="Popups\ScreenshotWindow.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
@ -64,7 +58,7 @@
<Page Update="Resources\GeometryIcons.xaml"> <Page Update="Resources\GeometryIcons.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="Resources\Themes\DarkFloatingBarTheme.xaml"> <Page Update="Windows\SettingsWindow.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
</ItemGroup> </ItemGroup>

View File

@ -1,13 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DrawingImage x:Key="ICCHeadButtonIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V65 H123 V0 H0 Z">
<GeometryDrawing Brush="{DynamicResource IccHeadButtonIconColor}" Geometry="F1 M123,65z M0,0z M6.79114,28.5246L1.11918,28.5246C0.949869,27.7909 0.808775,27.029 0.6959,26.2389 0.639463,25.3923 0.611244,24.6022 0.611244,23.8685 0.611244,22.3447 0.780556,20.8491 1.11918,19.3817L18.5583,19.3817 18.5583,63.1489C16.5266,63.4875 14.5513,63.6569 12.6324,63.6569 10.77,63.6569 8.82288,63.4875 6.79114,63.1489L6.79114,28.5246z M5.01336,12.0166C4.67474,10.0978 4.50542,8.20712 4.50542,6.34469 4.50542,4.53869 4.67474,2.64804 5.01336,0.67273 5.9728,0.503417 6.98867,0.390542 8.06098,0.334105 9.18973,0.221232 10.2056,0.164795 11.1086,0.164795 12.068,0.164795 13.1121,0.221232 14.2409,0.334105 15.3696,0.390542 16.4137,0.503417 17.3732,0.67273 17.5425,1.63217 17.6553,2.5916 17.7118,3.55104 17.7682,4.45404 17.7964,5.38525 17.7964,6.34469 17.7964,7.24769 17.7682,8.1789 17.7118,9.13834 17.6553,10.0978 17.5425,11.0572 17.3732,12.0166 16.4137,12.186 15.3696,12.2988 14.2409,12.3553 13.1686,12.4117 12.1527,12.4399 11.1933,12.4399 10.2903,12.4399 9.27438,12.4117 8.14564,12.3553 7.01689,12.2988 5.9728,12.186 5.01336,12.0166z" />
<GeometryDrawing Brush="{DynamicResource IccHeadButtonIconColor}" Geometry="F1 M123,65z M0,0z M59.7554,52.8209C60.4327,53.9496 60.9971,55.2759 61.4485,56.7997 61.9,58.2671 62.1258,60.0166 62.1258,62.0484 59.8683,62.9514 57.7519,63.5158 55.7766,63.7415 53.8013,64.0237 51.7413,64.1648 49.5967,64.1648 45.9283,64.1648 42.7396,63.6004 40.0306,62.4717 37.3216,61.2865 35.0641,59.678 33.2581,57.6463 31.5085,55.6145 30.1822,53.2159 29.2792,50.4505 28.3762,47.6286 27.9247,44.581 27.9247,41.3077 27.9247,38.0907 28.348,35.0995 29.1946,32.3341 30.0976,29.5687 31.4239,27.1419 33.1734,25.0537 34.9794,22.9655 37.2087,21.3288 39.8612,20.1436 42.5138,18.9584 45.5896,18.3659 49.0888,18.3659 50.3304,18.3659 51.4591,18.3941 52.475,18.4505 53.5473,18.5069 54.5632,18.6198 55.5226,18.7891 56.4821,18.9584 57.4415,19.1842 58.4009,19.4664 59.3604,19.7486 60.4327,20.1154 61.6179,20.5669 61.6179,21.865 61.4485,23.3323 61.1099,24.969 60.7713,26.5493 60.2351,28.0731 59.5015,29.5405 57.8083,28.9761 56.3127,28.6092 55.0147,28.4399 53.7731,28.2142 52.3339,28.1013 50.6972,28.1013 47.1981,28.1013 44.5455,29.2583 42.7396,31.5722 40.99,33.8297 40.1152,37.0748 40.1152,41.3077 40.1152,45.8791 41.0747,49.2089 42.9935,51.2971 44.9124,53.3853 47.5085,54.4293 50.7819,54.4293 51.6284,54.4293 52.3903,54.4293 53.0676,54.4293 53.8013,54.3729 54.5067,54.2883 55.184,54.1754 55.8612,54.0625 56.5385,53.8932 57.2157,53.6674 57.9494,53.4417 58.796,53.1595 59.7554,52.8209z" />
<GeometryDrawing Brush="{DynamicResource IccHeadButtonIconColor}" Geometry="F1 M123,65z M0,0z M98.6939,52.8209C99.3712,53.9496 99.9355,55.2759 100.387,56.7997 100.839,58.2671 101.064,60.0166 101.064,62.0484 98.8068,62.9514 96.6904,63.5158 94.7151,63.7415 92.7398,64.0237 90.6798,64.1648 88.5352,64.1648 84.8668,64.1648 81.678,63.6004 78.969,62.4717 76.2601,61.2865 74.0026,59.678 72.1966,57.6463 70.447,55.6145 69.1207,53.2159 68.2177,50.4505 67.3147,47.6286 66.8632,44.581 66.8632,41.3077 66.8632,38.0907 67.2865,35.0995 68.1331,32.3341 69.0361,29.5687 70.3624,27.1419 72.1119,25.0537 73.9179,22.9655 76.1472,21.3288 78.7997,20.1436 81.4523,18.9584 84.5281,18.3659 88.0273,18.3659 89.2689,18.3659 90.3976,18.3941 91.4135,18.4505 92.4858,18.5069 93.5017,18.6198 94.4611,18.7891 95.4205,18.9584 96.38,19.1842 97.3394,19.4664 98.2989,19.7486 99.3712,20.1154 100.556,20.5669 100.556,21.865 100.387,23.3323 100.048,24.969 99.7098,26.5493 99.1736,28.0731 98.44,29.5405 96.7468,28.9761 95.2512,28.6092 93.9532,28.4399 92.7116,28.2142 91.2724,28.1013 89.6357,28.1013 86.1366,28.1013 83.484,29.2583 81.678,31.5722 79.9285,33.8297 79.0537,37.0748 79.0537,41.3077 79.0537,45.8791 80.0131,49.2089 81.932,51.2971 83.8509,53.3853 86.447,54.4293 89.7204,54.4293 90.5669,54.4293 91.3288,54.4293 92.0061,54.4293 92.7398,54.3729 93.4452,54.2883 94.1225,54.1754 94.7997,54.0625 95.477,53.8932 96.1542,53.6674 96.8879,53.4417 97.7345,53.1595 98.6939,52.8209z" />
<GeometryDrawing Brush="{DynamicResource IccHeadButtonIconColor}" Geometry="F1 M123,65z M0,0z M109.666,2.2812C111.867,1.94257 114.04,1.77326 116.185,1.77326 118.386,1.77326 120.587,1.94257 122.788,2.2812L121.941,43.678C119.966,44.0166 118.075,44.186 116.269,44.186 114.35,44.186 112.432,44.0166 110.513,43.678L109.666,2.2812z M110.005,63.1489C109.666,61.0607 109.497,59.0008 109.497,56.969 109.497,54.9373 109.666,52.8491 110.005,50.7045 112.093,50.3659 114.153,50.1965 116.185,50.1965 118.216,50.1965 120.305,50.3659 122.449,50.7045 122.788,52.8491 122.957,54.9091 122.957,56.8844 122.957,58.9726 122.788,61.0607 122.449,63.1489 120.305,63.4875 118.245,63.6569 116.269,63.6569 114.181,63.6569 112.093,63.4875 110.005,63.1489z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>

View File

@ -1,90 +0,0 @@
<Window x:Class="Ink_Canvas.Popups.FloatingBarWindowV2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Ink_Canvas.Popups"
xmlns:modern="http://schemas.inkore.net/lib/ui/wpf/modern"
mc:Ignorable="d" WindowStyle="None" ResizeMode="NoResize"
Background="Transparent" AllowsTransparency="True" Topmost="True"
Title="FloatingBarWindowV2">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Themes/DarkFloatingBarTheme.xaml"/>
<ResourceDictionary Source="FloatingBarV2Resources.xaml"/>
<ResourceDictionary Source="../Resources/GeometryIcons.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<modern:SimpleStackPanel Orientation="Horizontal" Spacing="6" Margin="6">
<Border Style="{DynamicResource ICCHeadButtonStyleBorder}" Height="42" Width="42">
<Image Width="28" Height="28" Source="{DynamicResource ICCHeadButtonIcon}"></Image>
</Border>
<Border Height="42" Padding="4,0" Style="{DynamicResource FloatingBarBorder}">
<StackPanel Orientation="Horizontal">
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource CursorIconV2}"></Image>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource PenIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource TrashBinIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource EraserIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource LassoSelectIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource ShapesIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource UndoIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource RedoIconV2}"/>
</modern:SimpleStackPanel>
</Grid>
</StackPanel>
</Border>
<Border Height="42" Padding="4,0" Style="{DynamicResource FloatingBarBorder}">
<StackPanel Orientation="Horizontal">
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource MoreToolsIconV2}"></Image>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource GestureIconV2}"></Image>
</modern:SimpleStackPanel>
</Grid>
<Grid Width="42" Height="42">
<modern:SimpleStackPanel Orientation="Vertical" Spacing="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Width="22" Height="22" Source="{DynamicResource EyeOffIconV2}"></Image>
</modern:SimpleStackPanel>
</Grid>
</StackPanel>
</Border>
</modern:SimpleStackPanel>
</Grid>
</Window>

View File

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace Ink_Canvas.Popups
{
/// <summary>
/// FloatingBarWindowV2.xaml 的交互逻辑
/// </summary>
public partial class FloatingBarWindowV2 : Window
{
public FloatingBarWindowV2()
{
InitializeComponent();
}
}
}

View File

@ -1,12 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="ICCHeadButtonStyleBorder" TargetType="Border">
<Setter Property="Background" Value="#CC09090b"/>
<Setter Property="CornerRadius" Value="4"/>
</Style>
<Style x:Key="FloatingBarBorder" TargetType="Border">
<Setter Property="Background" Value="#CC09090b"/>
<Setter Property="CornerRadius" Value="4"/>
</Style>
<SolidColorBrush x:Key="IccHeadButtonIconColor" Color="#fafafa"/>
</ResourceDictionary>

View File

@ -0,0 +1,330 @@
<Window x:Class="Ink_Canvas.Windows.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Ink_Canvas.Windows"
xmlns:modern="http://schemas.inkore.net/lib/ui/wpf/modern"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d" WindowStyle="None" ResizeMode="CanMinimize" Background="Transparent"
Title="InkCanvasForClass 设置" Height="691" Width="910">
<Window.Resources>
<DrawingImage x:Key="StartupIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V17 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,17z M0,0z M8.52827,1.49316C6.4788,1.49316 4.42993,2.27314 2.87202,3.83105 -0.243799,6.94687 -0.243799,12.0277 2.87202,15.1436 3.05955,15.331 3.31387,15.4364 3.57905,15.4364 3.84423,15.4364 4.09855,15.331 4.28608,15.1436 4.40985,15.0194 4.4988,14.865 4.54405,14.6956 4.5893,14.5263 4.58925,14.348 4.5439,14.1787L5.34663,13.376 4.6396,12.6689 3.95015,13.3584C3.11585,12.3755,2.64691,11.1947,2.54585,9.9873L3.52827,9.9873 3.52827,8.9873 2.54585,8.9873C2.64195,7.83886 3.06961,6.7138 3.82905,5.76074 3.8672,5.85753 3.92507,5.94533 3.99897,6.01855L6.68647,8.70605C6.58185,8.95322 6.52805,9.21891 6.52827,9.4873 6.52827,10.0177 6.73898,10.5264 7.11406,10.9015 7.48913,11.2766 7.99784,11.4873 8.52827,11.4873 9.0587,11.4873 9.56741,11.2766 9.94249,10.9015 10.3176,10.5264 10.5283,10.0177 10.5283,9.4873 10.5283,8.95687 10.3176,8.44819 9.94249,8.07312 9.56741,7.69805 9.0587,7.4873 8.52827,7.4873 8.26106,7.48823 7.99674,7.54268 7.75093,7.64746L5.05952,4.95605C4.98554,4.88262 4.89708,4.82542 4.79976,4.78809 5.75309,4.02803 6.87934,3.60104 8.02827,3.50488L8.02827,4.4873 9.02827,4.4873 9.02827,3.50488C10.2357,3.60594,11.4165,4.07488,12.3994,4.90918L11.7099,5.59863 12.4169,6.30566 13.1064,5.61621C13.9407,6.59908,14.4096,7.77986,14.5107,8.9873L13.5283,8.9873 13.5283,9.9873 14.5107,9.9873C14.4096,11.1947,13.9407,12.3755,13.1064,13.3584L12.4169,12.6689 11.7099,13.376 12.5126,14.1787C12.4673,14.348 12.4672,14.5263 12.5125,14.6956 12.5577,14.865 12.6467,15.0194 12.7705,15.1436 12.958,15.331 13.2123,15.4364 13.4775,15.4364 13.7427,15.4364 13.997,15.331 14.1845,15.1436 17.3003,12.0277 17.3003,6.94687 14.1845,3.83105 12.6266,2.27314 10.5777,1.49316 8.52827,1.49316z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="CanvasAndInkIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M16,16z M0,0z M1.03125,3C1.03125,1.33801,2.38486,1E-05,4.18269,0L11.7548,0C12.193,0,12.6249,0.10569,13.0056,0.25L11.6872,2 4.02644,2C3.42716,2.00001,3.0072,2.446,3.00721,3L3.00721,13C3.0072,13.554,3.42716,14,4.02644,14L11.9423,14C12.5416,14,13.024,13.554,13.024,13L13.024,9.2879 15,6.41068 15,13C15,14.662,13.5526,16,11.7548,16L4.18269,16C2.38485,16,1.03125,14.662,1.03125,13L1.03125,3z M9.99966,7.00021C11.5208,4.53767,14.04,1.03125,14.04,1.03125L15.7587,2.09415 11.5737,8.45877 10.9788,9.93973 9.3038,10.4023 8.56352,10.9857 7.86816,10.9867 8.63129,9.74142 8.59399,8.16751 9.99966,7.00021z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="GesturesIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,16z M0,0z M7.4284,3.01515C7.32846,3.01926 7.22971,3.03834 7.13543,3.07175 7.07215,3.09421 7.0113,3.123 6.95379,3.15766 6.92552,3.17515 6.89815,3.19403 6.87176,3.21425 6.79115,3.27422 6.72004,3.34599 6.66082,3.42714 6.58255,3.53542 6.52676,3.65828 6.49676,3.78847 6.48929,3.82072 6.48342,3.85333 6.47918,3.88617 6.47443,3.92378 6.47182,3.96162 6.47137,3.99953L6.47137,8.99953 6.47137,12.3823 3.91863,11.105C3.69517,10.9928 3.43777,10.9683 3.19719,11.0365 2.9566,11.1047 2.75028,11.2605 2.61889,11.4733 2.48751,11.686 2.4406,11.9403 2.48741,12.1859 2.53421,12.4316 2.67134,12.6508 2.87176,12.8003L6.85027,15.7827 6.87175,15.8003C6.88141,15.807 6.89117,15.8135 6.90105,15.8198 6.91638,15.8307 6.93201,15.8411 6.94792,15.851 6.95951,15.8578 6.97123,15.8643 6.98308,15.8705 6.99786,15.8787 7.01284,15.8865 7.028,15.8939 7.04597,15.9029 7.06421,15.9114 7.08269,15.9193 7.09496,15.9248 7.10733,15.93 7.1198,15.9349 7.14039,15.9428 7.16124,15.9499 7.1823,15.9564 7.19203,15.9592 7.2018,15.9619 7.2116,15.9644 7.22843,15.9688 7.24536,15.9727 7.26238,15.9761 7.28179,15.9806 7.30133,15.9845 7.32097,15.9878 7.32942,15.9893 7.33788,15.9906 7.34636,15.9918 7.37361,15.9949 7.40098,15.997 7.42839,15.9978 7.4427,15.9987 7.45703,15.9993 7.47137,15.9995L12.4714,15.9995C12.4714,15.9995 12.9301,16.0133 13.4186,15.7691 13.9071,15.5248 14.4714,14.8329 14.4714,13.9995L14.4714,9.99953C14.4715,9.77638 14.3969,9.5596 14.2596,9.3837 14.1223,9.2078 13.9301,9.08289 13.7136,9.02883L9.71355,8.02883C9.63432,8.00921,9.55299,7.99938,9.47137,7.99953L8.47137,7.99953 8.47137,3.99953C8.46996,3.89933 8.4535,3.79991 8.42254,3.70461 8.39131,3.60915 8.34587,3.51895 8.28777,3.43703 8.26889,3.41001 8.24868,3.38395 8.22722,3.35893 8.16192,3.28284 8.08554,3.21699 8.00066,3.16361 7.97216,3.14652 7.94283,3.13088 7.91277,3.11672 7.88288,3.10152 7.85224,3.08783 7.82097,3.07572 7.78958,3.06436 7.75764,3.05457 7.72527,3.0464 7.69309,3.03761 7.6605,3.03044 7.62761,3.0249 7.5617,3.01494 7.49497,3.01184 7.4284,3.01515z" />
<GeometryDrawing Geometry="F1 M17,16z M0,0z M7.4707,0C5.27341,0 3.4707,1.80271 3.4707,4 3.4707,5.46662 4.28317,6.74314 5.4707,7.43945L5.4707,4C5.4707,2.9093 6.38,2 7.4707,2 8.5614,2 9.4707,2.9093 9.4707,4L9.4707,7C9.55233,6.99985,9.63366,7.00968,9.71289,7.0293L9.96875,7.09381C10.8758,6.35839 11.4707,5.24958 11.4707,4 11.4707,1.80271 9.66799,0 7.4707,0z">
<GeometryDrawing.Brush>
<SolidColorBrush Color="#FF222222" Opacity="0.5" />
</GeometryDrawing.Brush>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AppearanceIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H17 V0 H0 Z">
<DrawingGroup.Transform>
<TranslateTransform X="0" Y="0.0078125" />
</DrawingGroup.Transform>
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,16z M0,0z M14.3604,-0.0078125L10.8916,3.44922C11.5752,3.80469,12.126,4.35937,12.4814,5.03906L12.6533,4.86719 12.6611,4.87518 16.9619,0.574219 16.9619,-0.0078125 14.3604,-0.0078125z M3.96191,0.992188C2.31738,0.992188,0.961914,2.34766,0.961914,3.99219L0.961914,9.99219C0.961914,11.6367,2.31738,12.9922,3.96191,12.9922L13.9619,12.9922C15.6064,12.9922,16.9619,11.6367,16.9619,9.99219L16.9619,3.99219C16.9619,3.42188,16.7939,2.89062,16.5127,2.43359L14.9619,3.98828 14.9619,9.99219C14.9619,10.5625,14.5322,10.9922,13.9619,10.9922L3.96191,10.9922C3.3916,10.9922,2.96191,10.5625,2.96191,9.99219L2.96191,3.99219C2.96191,3.42188,3.3916,2.99219,3.96191,2.99219L9.93066,2.99219 11.9385,0.992188 3.96191,0.992188z M8.96191,3.99219C7.30566,3.99219,5.96191,5.33203,5.96191,6.99219L5.96191,9.99219 8.96191,9.99219C10.6221,10.0002 11.9619,8.64844 11.9619,6.99219 11.9619,5.33203 10.6221,3.99219 8.96191,3.99219z M5.96191,13.9922C4.85644,13.9922,3.96191,14.8867,3.96191,15.9922L13.9619,15.9922C13.9619,14.8867,13.0674,13.9922,11.9619,13.9922L5.96191,13.9922z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="InkRecognitionIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,16z M0,0z M14,16C15.0986,16 16,15.0986 16,14 16,13.265 15.5961,12.6191 15,12.2715L15,8.72852C15.5961,8.38094 16,7.73502 16,7 16,5.90141 15.0986,5 14,5 13.265,5 12.6191,5.4039 12.2715,6L10,6 10,3.72852C10.5961,3.38094 11,2.73502 11,2 11,0.90141 10.0986,0 9,0 8.26498,0 7.61906,0.4039 7.27148,1L3.72852,1C3.38094,0.4039 2.73502,0 2,0 0.90141,0 0,0.90141 0,2 0,2.73502 0.4039,3.38094 1,3.72852L1,7.27148C0.4039,7.61906 0,8.26498 0,9 0,10.0986 0.90141,11 2,11 2.73502,11 3.38094,10.5961 3.72852,10L6,10 6,12.2715C5.4039,12.6191 5,13.265 5,14 5,15.0986 5.90141,16 7,16 7.73502,16 8.38094,15.5961 8.72852,15L12.2715,15C12.6191,15.5961,13.265,16,14,16z M14,15C13.4419,15 13,14.5581 13,14 13,13.4419 13.4419,13 14,13 14.5581,13 15,13.4419 15,14 15,14.5581 14.5581,15 14,15z M7,15C6.44185,15 6,14.5581 6,14 6,13.4419 6.44185,13 7,13 7.55815,13 8,13.4419 8,14 8,14.5581 7.55815,15 7,15z M12.2715,13L8.72852,13C8.55286,12.6988,8.30124,12.4471,8,12.2715L8,8.72852C8.30151,8.55279,8.55279,8.30151,8.72852,8L12.2715,8C12.4471,8.30124,12.6988,8.55286,13,8.72852L13,12.2715C12.6988,12.4471,12.4471,12.6988,12.2715,13z M2,10C1.44185,10 1,9.55815 1,9 1,8.44185 1.44185,8 2,8 2.55815,8 3,8.44185 3,9 3,9.55815 2.55815,10 2,10z M14,8C13.4419,8 13,7.55815 13,7 13,6.44185 13.4419,6 14,6 14.5581,6 15,6.44185 15,7 15,7.55815 14.5581,8 14,8z M9,3C8.44185,3 8,2.55815 8,2 8,1.44185 8.44185,1 9,1 9.55815,1 10,1.44185 10,2 10,2.55815 9.55815,3 9,3z M2,3C1.44185,3 1,2.55815 1,2 1,1.44185 1.44185,1 2,1 2.55815,1 3,1.44185 3,2 3,2.55815 2.55815,3 2,3z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ShapeDrawingIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M17,16z M0,0z M1.75885,3.2L1.75885,0 4.95885,0 4.95885,3.2 3.89219,3.2 3.89219,6.08542C4.26093,6.19412 4.58486,6.42056 4.81547,6.73079 5.04608,7.04103 5.17094,7.41834 5.17135,7.80625 5.17139,8.19452 5.04673,8.57236 4.81609,8.88301 4.58545,9.19366 4.26127,9.42037 3.89219,9.52917L3.89219,12.8 4.95885,12.8 4.95885,16 1.75885,16 1.75885,12.8 2.82552,12.8 2.82552,9.50417C2.47369,9.38413 2.16793,9.15584 1.9512,8.8513 1.73448,8.54676 1.61767,8.18128 1.61719,7.80625 1.61767,7.43122 1.73448,7.0658 1.9512,6.76126 2.16793,6.45672 2.47369,6.22837 2.82552,6.10833L2.82552,3.2 1.75885,3.2z M9.22552,0L9.22552,2.13333C9.22552,2.13333 7.09219,4.26667 7.09219,8.53333 8.15885,10.2895 8.15885,11.1616 8.15885,11.7333L8.15885,12.8 13.4922,12.8 13.4922,11.7333C13.4922,11.1852 13.4922,10.2188 14.5589,8.53333 14.5589,4.26667 12.4255,2.13333 12.4255,2.13333L12.4255,0 11.3589,0 11.3589,5.3C12.0185,5.51903 12.4922,6.13353 12.4922,6.86667 12.4922,7.78254 11.7414,8.53333 10.8255,8.53333 9.90965,8.53333 9.15885,7.78254 9.15885,6.86667 9.15885,6.1407 9.64262,5.52467 10.2922,5.3L10.2922,0 9.22552,0z M8.15885,16L8.15885,13.8667 13.4922,13.8667 13.4922,16 8.15885,16z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AutomationIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V17 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M17,17z M0,0z M0.0556641,3.20703C0.0556641,1.54503,1.39366,0.207031,3.05566,0.207031L13.0557,0.207031C14.7177,0.207031,16.0557,1.54503,16.0557,3.20703L16.0557,10.207C16.0557,11.869,14.7177,13.207,13.0557,13.207L3.05566,13.207C1.39366,13.207,0.0556641,11.869,0.0556641,10.207L0.0556641,3.20703z M13.0557,2.20703L3.05566,2.20703C2.50166,2.20703,2.05566,2.65303,2.05566,3.20703L2.05566,10.207C2.05566,10.761,2.50166,11.207,3.05566,11.207L13.0557,11.207C13.6097,11.207,14.0557,10.761,14.0557,10.207L14.0557,3.20703C14.0557,2.65303,13.6097,2.20703,13.0557,2.20703z M5.05566,5.20703C5.05566,4.65475 5.50338,4.20703 6.05566,4.20703 6.60794,4.20703 7.05566,4.65475 7.05566,5.20703 7.05566,5.75931 6.60794,6.20703 6.05566,6.20703 5.50338,6.20703 5.05566,5.75931 5.05566,5.20703z M9.05566,5.20703C9.05566,4.65475 9.50338,4.20703 10.0557,4.20703 10.6079,4.20703 11.0557,4.65475 11.0557,5.20703 11.0557,5.75931 10.6079,6.20703 10.0557,6.20703 9.50338,6.20703 9.05566,5.75931 9.05566,5.20703z M3.64145,14.7928C4.01652,14.4178,4.52523,14.207,5.05566,14.207L11.0557,14.207C11.5861,14.207 12.0948,14.4178 12.4699,14.7928 12.845,15.1679 13.0557,15.6766 13.0557,16.207L11.0557,16.207 5.05566,16.207 3.05566,16.207C3.05566,15.6766,3.26638,15.1679,3.64145,14.7928z M8.05643,9.95801C9.48469,9.95801 10.8071,9.19492 11.5213,7.95801 11.6596,7.71858 11.5774,7.4123 11.3377,7.27441 11.0983,7.13604 10.792,7.21832 10.6541,7.45801 10.1178,8.38691 9.12903,8.95801 8.05643,8.95801 6.98383,8.95801 5.99508,8.38691 5.45878,7.45801 5.32089,7.21832 5.01461,7.13604 4.77518,7.27441 4.53549,7.4123 4.45322,7.71858 4.59159,7.95801 5.30572,9.19492 6.62817,9.95801 8.05643,9.95801z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="PowerPointIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M16,16z M0,0z M4.79961,16C3.02692,16,1.59961,14.5727,1.59961,12.8L1.59961,3.2C1.59961,1.42731,3.02692,0,4.79961,0L7.99961,0C8.96563,0,9.89167,0.383595,10.5747,1.06667L13.3329,3.82485C14.016,4.50792,14.3996,5.43398,14.3996,6.4L14.3996,12.8C14.3996,14.5727,12.9723,16,11.1996,16L4.79961,16z M7.99961,2.13333L4.79961,2.13333C4.21589,2.13333,3.73294,2.61628,3.73294,3.2L3.73294,12.8C3.73294,13.3837,4.21589,13.8667,4.79961,13.8667L11.1996,13.8667C11.7833,13.8667,12.2663,13.3837,12.2663,12.8L12.2663,6.4 9.06628,6.4 9.06628,2.57515C8.78348,2.29236,8.39955,2.13333,7.99961,2.13333z M4.79961,4.8C4.79961,3.92267 5.52228,3.2 6.39961,3.2 7.27694,3.2 7.99961,3.92267 7.99961,4.8 7.99961,5.67733 7.27694,6.4 6.39961,6.4 5.52228,6.4 4.79961,5.67733 4.79961,4.8z M6.93294,4.8C6.93294,4.49914 6.70047,4.26667 6.39961,4.26667 6.09875,4.26667 5.86628,4.49914 5.86628,4.8 5.86628,5.10086 6.09875,5.33333 6.39961,5.33333 6.70047,5.33333 6.93294,5.10086 6.93294,4.8z M4.79961,8.53333L4.79961,7.46667 11.1996,7.46667 11.1996,8.53333 4.79961,8.53333z M4.79961,10.6667L4.79961,9.6 11.1996,9.6 11.1996,10.6667 4.79961,10.6667z M4.79961,12.8L4.79961,11.7333 11.1996,11.7333 11.1996,12.8 4.79961,12.8z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ExtensionsIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,16z M0,0z M6.28571,0C5.336,0,4.57143,0.764571,4.57143,1.71429L4.57143,3.42857 1.14286,3.42857C0.509714,3.42857,0,3.93829,0,4.57143L0,8 1.71429,8C2.664,8 3.42857,8.76457 3.42857,9.71429 3.42857,10.664 2.664,11.4286 1.71429,11.4286L0,11.4286 0,14.8571C0,15.4903,0.509714,16,1.14286,16L4.57143,16 4.57143,14.2857C4.57143,13.336 5.336,12.5714 6.28571,12.5714 7.23543,12.5714 8,13.336 8,14.2857L8,16 11.4286,16C12.0617,16,12.5714,15.4903,12.5714,14.8571L12.5714,11.4286 14.2857,11.4286C15.2354,11.4286 16,10.664 16,9.71429 16,8.76457 15.2354,8 14.2857,8L12.5714,8 12.5714,4.57143C12.5714,3.93829,12.0617,3.42857,11.4286,3.42857L8,3.42857 8,1.71429C8,0.764571,7.23543,0,6.28571,0z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="StorageIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V17 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,17z M0,0z M4.11328,0.236328C2.46858,0.236328,1.11328,1.59163,1.11328,3.23633L1.11328,13.2363C1.11328,14.881,2.46858,16.2363,4.11328,16.2363L12.1133,16.2363C13.758,16.2363,15.1133,14.881,15.1133,13.2363L15.1133,3.23633C15.1133,1.59163,13.758,0.236328,12.1133,0.236328L4.11328,0.236328z M4.11328,2.23633L12.1133,2.23633C12.6846,2.23633,13.1133,2.66503,13.1133,3.23633L13.1133,8.23633 13.1133,12.2363C13.1133,12.8076,12.6846,13.2363,12.1133,13.2363L4.11328,13.2363C3.55928,13.2363,3.11328,12.7903,3.11328,12.2363L3.11328,3.23633C3.11328,2.68233,3.55928,2.23633,4.11328,2.23633z M8.11328,3.23633C5.90414,3.23633,4.11327,5.02719,4.11328,7.23633L4.11328,11.2363 8.11328,11.2363C10.6133,11.2363 12.1133,9.44547 12.1133,7.23633 12.1133,5.02719 10.3224,3.23633 8.11328,3.23633z M8.11328,5.23633C9.21785,5.23633 10.1133,6.13176 10.1133,7.23633 10.1133,8.3409 9.21785,9.23633 8.11328,9.23633 7.00871,9.23633 6.11328,8.3409 6.11328,7.23633 6.11328,6.13176 7.00871,5.23633 8.11328,5.23633z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="SnapshotIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M16,16z M0,0z M7,1L7,2 8,2 8,1 7,1z M9,1L9,2 10,2 10,1 9,1z M11,1L11,2 12,2 12,1 11,1z M13,1L13,2 14,2 14,1 13,1z M15,1L15,2 16,2 16,1 15,1z M7,3L7,4 8,4 8,3 7,3z M7,5L7,6 8,6 8,5 7,5z M12,10C11.2211,10,10.5116,10.2968,9.97827,10.7835L9.23626,9.91891 13.0241,4.88107C13.5487,4.21716,13.2521,3.38331,12.3434,3L8.14135,8.53514 3.93925,3C3.03058,3.38331,2.73402,4.21716,3.25863,4.88107L7.04644,9.91891 6.14654,10.9042C5.60177,10.3463 4.84133,10 4,10 2.34315,10 1,11.3432 1,13 1,14.6568 2.34315,16 4,16 5.65685,16 7,14.6568 7,13 7,12.9054 6.99562,12.8117 6.98704,12.7193L8.14135,11.2811 9.05242,12.4387C9.01801,12.6205 9,12.8082 9,13 9,14.6568 10.3432,16 12,16 13.6568,16 15,14.6568 15,13 15,11.3432 13.6568,10 12,10z M12,12C12.5523,12 13,12.4477 13,13 13,13.5523 12.5523,14 12,14 11.4477,14 11,13.5523 11,13 11,12.4477 11.4477,12 12,12z M5,13C5,12.4477 4.55228,12 4,12 3.44772,12 3,12.4477 3,13 3,13.5523 3.44772,14 4,14 4.55228,14 5,13.5523 5,13z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="LuckyRandomIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V17 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,17z M0,0z M5.8252,1.52246C5.16215,1.52246 4.52627,1.78586 4.05743,2.2547 3.58859,2.72354 3.3252,3.35942 3.3252,4.02246 3.3252,4.6855 3.58859,5.32138 4.05743,5.79022 4.52627,6.25906 5.16215,6.52246 5.8252,6.52246 6.48824,6.52246 7.12412,6.25906 7.59296,5.79022 8.0618,5.32138 8.3252,4.6855 8.3252,4.02246 8.3252,3.35942 8.0618,2.72354 7.59296,2.2547 7.12412,1.78586 6.48824,1.52246 5.8252,1.52246z M11.8252,4.52246C11.1622,4.52246 10.5263,4.78586 10.0574,5.2547 9.58859,5.72354 9.3252,6.35942 9.3252,7.02246 9.3252,7.6855 9.58859,8.32138 10.0574,8.79022 10.5263,9.25906 11.1622,9.52246 11.8252,9.52246 12.1535,9.52246 12.4786,9.45779 12.7819,9.33215 13.0852,9.20652 13.3608,9.02237 13.593,8.79022 13.8251,8.55808 14.0093,8.28244 14.1349,7.97913 14.2605,7.67581 14.3252,7.35077 14.3252,7.02246 14.3252,6.69416 14.2605,6.36905 14.1349,6.06573 14.0093,5.76242 13.8251,5.48685 13.593,5.2547 13.3608,5.02255 13.0852,4.83841 12.7819,4.71277 12.4786,4.58713 12.1535,4.52246 11.8252,4.52246z M3.8252,7.52246C2.1632,7.52246,0.825195,8.86046,0.825195,10.5225L0.825195,12.5225C0.825195,13.0765,1.2712,13.5225,1.8252,13.5225L5.90137,13.5225C5.90137,11.4807 7.48312,9.78977 9.48145,9.61426 8.89007,9.08006 8.49871,8.36004 8.37208,7.57324 8.19489,7.54084 8.01203,7.5224 7.8252,7.5224L3.8252,7.52246z M9.8252,10.5225C8.1632,10.5225,6.8252,11.8605,6.8252,13.5225L6.8252,15.5225C6.8252,16.0765,7.2712,16.5225,7.8252,16.5225L15.8252,16.5225C16.3792,16.5225,16.8252,16.0765,16.8252,15.5225L16.8252,13.5225C16.8252,11.8605,15.4872,10.5225,13.8252,10.5225L9.8252,10.5225z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AdvancedIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H17 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M17,16z M0,0z M4.55176,1C2.61275,1 1.05176,2.561 1.05176,4.5 1.05176,6.439 2.61275,8 4.55176,8L11.5518,8C13.4908,8 15.0518,6.439 15.0518,4.5 15.0518,2.561 13.4908,1 11.5518,1L4.55176,1z M11.5518,2C12.9365,2 14.0518,3.11517 14.0518,4.5 14.0518,5.88467 12.9365,7 11.5518,7 10.167,7 9.05176,5.88467 9.05176,4.5 9.05176,3.11517 10.167,2 11.5518,2z" />
<GeometryDrawing Geometry="F1 M17,16z M0,0z M4.55176,9C2.61275,9 1.05176,10.561 1.05176,12.5 1.05176,14.439 2.61275,16 4.55176,16L11.5518,16C13.4908,16 15.0518,14.439 15.0518,12.5 15.0518,10.561 13.4908,9 11.5518,9L4.55176,9z M4.55176,10C5.93647,10 7.05176,11.1152 7.05176,12.5 7.05176,13.8847 5.93647,15 4.55176,15 3.16702,15 2.05176,13.8847 2.05176,12.5 2.05176,11.1152 3.16702,10 4.55176,10z">
<GeometryDrawing.Brush>
<SolidColorBrush Color="#FF222222" Opacity="0.35" />
</GeometryDrawing.Brush>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AboutIcon">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M16,16z M0,0z M2.35343,2.37395C5.46789,-0.74052 10.5333,-0.740541 13.6478,2.37392 16.7623,5.48839 16.7623,10.5539 13.6478,13.6683 10.5333,16.7828 5.46789,16.7828 2.35343,13.6683 -0.761038,10.5539 -0.761039,5.48841 2.35343,2.37395z M12.0389,12.0594C14.2904,9.80781 14.2904,6.23442 12.0389,3.98287 9.78731,1.73169 6.21255,1.72957 3.96099,3.98113 1.70944,6.23268 1.70944,9.80882 3.96099,12.0604 6.21254,14.3123 9.7873,14.3109 12.0389,12.0594z M10.1211,3.87906C9.58613,3.34403 8.88007,3.04362 8.15234,3.00601 7.71571,2.98341 7.27096,3.05492 6.85156,3.22867 5.73316,3.69199 5,4.78958 5,6.00015L7,6.00015C7,5.59265 7.24089,5.23221 7.61719,5.07632 7.99349,4.92043 8.41898,5.00502 8.70703,5.29312 8.99503,5.58121 9.07974,6.0065 8.92383,6.38296 8.76792,6.75942 8.40728,7.00015 8,7.00015 7.44771,7.00015 7,7.44786 7,8.00015L7,10.0002 9,10.0002 9,8.82046C9.7862,8.54081 10.4413,7.94595 10.7715,7.14859 11.2347,6.03014 10.977,4.73513 10.1211,3.87906z M9,12.0002C9,11.4479 8.55229,11.0002 8,11.0002 7.44771,11.0002 7,11.4479 7,12.0002 7,12.5524 7.44771,13.0002 8,13.0002 8.55229,13.0002 9,12.5524 9,12.0002z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Window.Resources>
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="-1" ResizeBorderThickness="0" CaptionHeight="0" CornerRadius="0" />
</WindowChrome.WindowChrome>
<Grid>
<Border Background="#fafafa" CornerRadius="7" BorderBrush="#d8d8d8" BorderThickness="2" Margin="8">
<Grid>
<!--Sidebar-->
<Border Width="250" Background="#ebebeb" BorderBrush="#e1e1e1" CornerRadius="7,0,0,7" BorderThickness="0,0,2,0" HorizontalAlignment="Left">
<Grid>
<Grid Height="48" VerticalAlignment="Top">
<Border CornerRadius="8" Background="#d9d9d9" Width="34" Height="34" Margin="8,0,0,0" HorizontalAlignment="Left">
<Image Width="16" Height="16">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V17 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,17z M0,0z M6.9333,0.111572C3.11689,0.111572 -5.16259E-07,3.22999 -5.16259E-07,7.04827 -5.16259E-07,10.8665 3.11689,13.9829 6.9333,13.9829 8.45757,13.9829 9.86954,13.4831 11.0166,12.6427L14.1583,15.7858C15.1805,16.7869,16.6805,15.2528,15.6583,14.2518L12.5333,11.1252C13.3704,9.97933 13.8666,8.57003 13.8666,7.04827 13.8666,3.22999 10.7497,0.111572 6.9333,0.111572z M6.9333,2.24594C9.59676,2.24594 11.7333,4.38351 11.7333,7.04827 11.7333,9.71302 9.59676,11.8485 6.9333,11.8485 4.26985,11.8485 2.13332,9.71302 2.13332,7.04827 2.13332,4.38351 4.26985,2.24594 6.9333,2.24594z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Border>
<TextBlock FontSize="15" Text="软件设置" Foreground="#2e3436" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border CornerRadius="8" Background="#d9d9d9" Width="34" Height="34" Margin="0,0,8,0" HorizontalAlignment="Right">
<Image Width="16" Height="16">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F0 M16,16z M0,0z M15,2L1,2 1,4 15,4 15,2z M15,7L1,7 1,9 15,9 15,7z M1,12L15,12 15,14 1,14 1,12z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Border>
</Grid>
<ItemsControl Name="SidebarItemsControl">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Margin="0,54,0,6"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Line Visibility="{Binding _spVisibility}" Margin="0,6" HorizontalAlignment="Center" X1="0" X2="234" Y1="0" Y2="0" Stroke="#d3d3d3" StrokeThickness="1" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<Border MouseDown="SidebarItem_MouseDown" MouseUp="SidebarItem_MouseUp" MouseLeave="SidebarItem_MouseLeave"
Tag="{Binding}" Visibility="{Binding _siVisibility}" Background="{Binding _siBackground}" Height="40" Margin="6,0,6,0" CornerRadius="7">
<Grid>
<Border Height="40" CornerRadius="7" Background="#09090b" IsHitTestVisible="false" Opacity="0" Name="MouseFeedbackBorder"/>
<StackPanel Orientation="Horizontal">
<Image Width="18" Height="18" Margin="14,0,9,0" VerticalAlignment="Center" Source="{Binding IconSource}"/>
<TextBlock FontSize="14" VerticalAlignment="Center" Text="{Binding Title}" Foreground="#FF222222"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Border>
<!--Topbar-->
<Grid Height="48" VerticalAlignment="Top" Margin="250,0,0,0">
<TextBlock FontSize="16" Text="设置标题" Name="SettingsWindowTitle" Foreground="#2e3436" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Border CornerRadius="8" Background="#33ef4444" Width="34" Height="34" Margin="0,0,8,0" HorizontalAlignment="Right">
<Image Width="12" Height="12">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V12 H12 V0 H0 Z">
<GeometryDrawing Brush="#991b1b" Geometry="F1 M12,12z M0,0z M0.999846,0C0.734646,4.07258E-05 0.480321,0.105424 0.292816,0.29297 0.105327,0.4805 0,0.734821 0,1 0,1.26518 0.105327,1.5195 0.292816,1.70703L4.58579,6 0.292816,10.293C0.105327,10.4805 0,10.7348 0,11 0,11.2652 0.105327,11.5195 0.292816,11.707 0.480347,11.8945 0.734668,11.9998 0.999846,11.9998 1.26503,11.9998 1.51935,11.8945 1.70688,11.707L5.99985,7.41406 10.2928,11.707C10.4803,11.8945 10.7347,11.9998 10.9998,11.9998 11.265,11.9998 11.5193,11.8945 11.7069,11.707 11.8944,11.5195 11.9997,11.2652 11.9997,11 11.9997,10.7348 11.8944,10.4805 11.7069,10.293L7.41391,6 11.7069,1.70703C11.8944,1.5195 11.9997,1.26518 11.9997,1 11.9997,0.734821 11.8944,0.4805 11.7069,0.29297 11.5194,0.105424 11.265,4.07258E-05 10.9998,0 10.7346,4.07258E-05 10.4803,0.105424 10.2928,0.29297L5.99985,4.58594 1.70688,0.29297C1.51937,0.105424,1.26505,4.07258E-05,0.999846,0z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</Border>
</Grid>
<!--AboutPanel-->
<Grid Margin="250,48,0,0">
<modern:ScrollViewerEx IsTabStop="False" TabIndex="-1" Margin="0,0,2,2">
<StackPanel Margin="60,12,60,24">
<Border BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
<Image Name="CopyrightBannerImage"/>
</Border>
<Border Margin="0,25,0,0" BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
<StackPanel Orientation="Vertical">
<Grid Height="54">
<StackPanel Orientation="Vertical" Margin="18,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Foreground="#9a9996" FontSize="12" Margin="0,0,0,3" Text="用户版权信息" HorizontalAlignment="Left"/>
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="2024 孙笑川一中 高2026级114班" HorizontalAlignment="Left"/>
</StackPanel>
</Grid>
</StackPanel>
</Border>
<Border Margin="0,25,0,0" BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
<StackPanel Orientation="Vertical">
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="软件版本" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,18,0">
<TextBlock Foreground="#878787" FontSize="14.5" Text="InkCanvasForClass v2024.8.30" VerticalAlignment="Center" />
<Image Margin="12,0,0,0" Width="18" Height="18" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<DrawingGroup.Transform>
<TranslateTransform X="6.1023980379104614E-05" Y="0" />
</DrawingGroup.Transform>
<GeometryDrawing Brush="#FFFF7800" Geometry="F1 M16,16z M0,0z M8.00493,0C7.74518,0,7.49541,0.0999063,7.2956,0.289728L5.5872,1.99813 2.99963,1.99813C2.45014,1.99813,2.00056,2.44771,2.00056,2.99719L2.00056,5.58476 0.292165,7.29316C-0.0974697,7.6828,-0.0974697,8.31221,0.292165,8.70184L2.00056,10.4102 2.00056,12.9978C2.00056,13.5473,2.45014,13.9969,2.99963,13.9969L5.5872,13.9969 7.2956,15.7053C7.68523,16.0949,8.31464,16.0949,8.70428,15.7053L10.4127,13.9969 13.0003,13.9969C13.5497,13.9969,13.9993,13.5473,13.9993,12.9978L13.9993,10.4102 15.7077,8.70184C16.0973,8.31221,16.0973,7.6828,15.7077,7.29316L13.9993,5.58476 13.9993,2.99719C13.9993,2.44771,13.5497,1.99813,13.0003,1.99813L10.4127,1.99813 8.70428,0.289728C8.50447,0.0899157,8.2547,0,7.99494,0L8.00493,0z M8.00493,4.99532C8.26469,4.99532,8.51446,5.09522,8.71427,5.28505L10.7124,7.28317C10.9022,7.47299,11.0021,7.72276,11.0021,7.99251L11.0021,8.99157 9.004,8.99157 9.004,10.9897 7.00587,10.9897 7.00587,8.99157 5.00774,8.99157 5.00774,7.99251C5.00774,7.73275,5.10765,7.47299,5.29747,7.28317L7.2956,5.28505C7.49541,5.08523,7.74518,4.99532,8.00493,4.99532z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</StackPanel>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="系统版本" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<TextBlock Name="AboutSystemVersion" Foreground="#878787" FontSize="14.5" Text="Windows 10 专业版 19045.3758" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,18,0"/>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="触摸设备" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<TextBlock Name="AboutTouchTabletText" Foreground="#878787" FontSize="14.5" Text="无触摸支持" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,18,0"/>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="包体构建版本" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<TextBlock Name="AboutBuildTime" Foreground="#878787" FontSize="14.5" Text="2024.8.22" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,18,0"/>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="版权信息" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<TextBlock Foreground="#878787" FontSize="14.5" Text="© Copyright 2024 Dubi906w 所有" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,18,0"/>
</Grid>
</StackPanel>
</Border>
<Border Margin="0,25,0,0" BorderBrush="#e6e6e6" BorderThickness="1.25,1.25,1.25,4" CornerRadius="8">
<StackPanel Orientation="Vertical">
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="ICC 官方网站" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,18,0">
<TextBlock Foreground="#1d4ed8" TextDecorations="Underline" FontSize="14.5" Text="icc.bliemhax.com" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<Image Margin="12,0,0,0" Width="16" Height="16" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,16z M0,0z M3,2C1.338,2,0,3.338,0,5L0,13C0,14.662,1.338,16,3,16L11,16C12.662,16,14,14.662,14,13L14,9C13.9998,8.4477 13.5522,8 13,8 12.4478,8 12.0002,8.4477 12,9L12,13C12,13.554,11.554,14,11,14L3,14C2.446,14,2,13.554,2,13L2,5C2,4.446,2.446,4,3,4L7,4C7.5523,4 8,3.5523 8,3 8,2.4477 7.5523,2 7,2L3,2z M10,0C9.4477,0 9,0.4477 9,1 9,1.5523 9.4477,2 10,2L12.584,2 7.29303,7.29102C6.90133,7.68172 6.90133,8.31627 7.29303,8.70697 7.68353,9.09737 8.31659,9.09737 8.70709,8.70697L14,3.41412 14,6C14,6.5523 14.4477,7 15,7 15.5523,7 16,6.5523 16,6L16,1C15.9996,0.913 15.988,0.826187 15.965,0.742188 15.942,0.657187 15.909,0.576 15.865,0.5 15.822,0.424 15.768,0.35483 15.7068,0.29303 15.6918,0.28103 15.6758,0.268996 15.6598,0.257996 15.6048,0.207996 15.5433,0.164989 15.4782,0.129089 15.4412,0.110089 15.4022,0.0940781 15.363,0.0800781 15.312,0.0590781 15.2601,0.0431279 15.2067,0.0311279 15.1667,0.0211279 15.1267,0.0171226 15.0856,0.0131226 15.0566,0.00312256 15.0286,0.00309863 14.9996,0.00109863L10,0z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</StackPanel>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="Github 仓库" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,18,0">
<TextBlock Foreground="#1d4ed8" TextDecorations="Underline" FontSize="14.5" Text="github.com/InkCanvas/InkCanvasForClass" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<Image Margin="12,0,0,0" Width="16" Height="16" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,16z M0,0z M3,2C1.338,2,0,3.338,0,5L0,13C0,14.662,1.338,16,3,16L11,16C12.662,16,14,14.662,14,13L14,9C13.9998,8.4477 13.5522,8 13,8 12.4478,8 12.0002,8.4477 12,9L12,13C12,13.554,11.554,14,11,14L3,14C2.446,14,2,13.554,2,13L2,5C2,4.446,2.446,4,3,4L7,4C7.5523,4 8,3.5523 8,3 8,2.4477 7.5523,2 7,2L3,2z M10,0C9.4477,0 9,0.4477 9,1 9,1.5523 9.4477,2 10,2L12.584,2 7.29303,7.29102C6.90133,7.68172 6.90133,8.31627 7.29303,8.70697 7.68353,9.09737 8.31659,9.09737 8.70709,8.70697L14,3.41412 14,6C14,6.5523 14.4477,7 15,7 15.5523,7 16,6.5523 16,6L16,1C15.9996,0.913 15.988,0.826187 15.965,0.742188 15.942,0.657187 15.909,0.576 15.865,0.5 15.822,0.424 15.768,0.35483 15.7068,0.29303 15.6918,0.28103 15.6758,0.268996 15.6598,0.257996 15.6048,0.207996 15.5433,0.164989 15.4782,0.129089 15.4412,0.110089 15.4022,0.0940781 15.363,0.0800781 15.312,0.0590781 15.2601,0.0431279 15.2067,0.0311279 15.1667,0.0211279 15.1267,0.0171226 15.0856,0.0131226 15.0566,0.00312256 15.0286,0.00309863 14.9996,0.00109863L10,0z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</StackPanel>
</Grid>
<Border Height="1" Background="#ebebeb"/>
<Grid Height="54">
<TextBlock Foreground="#2e3436" FontSize="14.5" Text="贡献者名单" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="18,0,0,0"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,18,0">
<TextBlock Foreground="#1d4ed8" TextDecorations="Underline" FontSize="14.5" Text="icc.bliemhax.com/contributors" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<Image Margin="12,0,0,0" Width="16" Height="16" VerticalAlignment="Center">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<GeometryDrawing Brush="#FF222222" Geometry="F1 M16,16z M0,0z M3,2C1.338,2,0,3.338,0,5L0,13C0,14.662,1.338,16,3,16L11,16C12.662,16,14,14.662,14,13L14,9C13.9998,8.4477 13.5522,8 13,8 12.4478,8 12.0002,8.4477 12,9L12,13C12,13.554,11.554,14,11,14L3,14C2.446,14,2,13.554,2,13L2,5C2,4.446,2.446,4,3,4L7,4C7.5523,4 8,3.5523 8,3 8,2.4477 7.5523,2 7,2L3,2z M10,0C9.4477,0 9,0.4477 9,1 9,1.5523 9.4477,2 10,2L12.584,2 7.29303,7.29102C6.90133,7.68172 6.90133,8.31627 7.29303,8.70697 7.68353,9.09737 8.31659,9.09737 8.70709,8.70697L14,3.41412 14,6C14,6.5523 14.4477,7 15,7 15.5523,7 16,6.5523 16,6L16,1C15.9996,0.913 15.988,0.826187 15.965,0.742188 15.942,0.657187 15.909,0.576 15.865,0.5 15.822,0.424 15.768,0.35483 15.7068,0.29303 15.6918,0.28103 15.6758,0.268996 15.6598,0.257996 15.6048,0.207996 15.5433,0.164989 15.4782,0.129089 15.4412,0.110089 15.4022,0.0940781 15.363,0.0800781 15.312,0.0590781 15.2601,0.0431279 15.2067,0.0311279 15.1667,0.0211279 15.1267,0.0171226 15.0856,0.0131226 15.0566,0.00312256 15.0286,0.00309863 14.9996,0.00109863L10,0z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
</StackPanel>
</Grid>
</StackPanel>
</Border>
</StackPanel>
</modern:ScrollViewerEx>
</Grid>
</Grid>
</Border>
</Grid>
</Window>

View File

@ -0,0 +1,329 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Management;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using iNKORE.UI.WPF.Helpers;
using OSVersionExtension;
namespace Ink_Canvas.Windows {
public partial class SettingsWindow : Window {
public SettingsWindow() {
InitializeComponent();
// 初始化侧边栏项目
SidebarItemsControl.ItemsSource = SidebarItems;
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "启动时行为",
Name = "StartupItem",
IconSource = FindResource("StartupIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "画板和墨迹",
Name = "CanvasAndInkItem",
IconSource = FindResource("CanvasAndInkIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "手势操作",
Name = "GesturesItem",
IconSource = FindResource("GesturesIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Separator
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "个性化和外观",
Name = "AppearanceItem",
IconSource = FindResource("AppearanceIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "墨迹转形状",
Name = "InkRecognitionItem",
IconSource = FindResource("InkRecognitionIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "几何与形状绘制",
Name = "ShapeDrawingItem",
IconSource = FindResource("ShapeDrawingIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "自动化行为",
Name = "AutomationItem",
IconSource = FindResource("AutomationIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Separator
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "PowerPoint 支持",
Name = "PowerPointItem",
IconSource = FindResource("PowerPointIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "插件和脚本",
Name = "ExtensionsItem",
IconSource = FindResource("ExtensionsIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Separator
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "存储空间",
Name = "StorageItem",
IconSource = FindResource("StorageIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "截图和屏幕捕捉",
Name = "SnapshotItem",
IconSource = FindResource("SnapshotIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "点名器设置",
Name = "LuckyRandomItem",
IconSource = FindResource("LuckyRandomIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "高级选项",
Name = "AdvancedItem",
IconSource = FindResource("AdvancedIcon") as DrawingImage,
Selected = false,
});
SidebarItems.Add(new SidebarItem() {
Type = SidebarItemType.Item,
Title = "关于 InkCanvasForClass",
Name = "AboutItem",
IconSource = FindResource("AboutIcon") as DrawingImage,
Selected = false,
});
_selectedSidebarItemName = "AboutItem";
UpdateSidebarItemsSelection();
// 关于页面图片横幅
if (File.Exists(App.RootPath + "icc-about-illustrations.png")) {
try {
CopyrightBannerImage.Visibility = Visibility.Visible;
CopyrightBannerImage.Source =
new BitmapImage(new Uri($"file://{App.RootPath + "icc-about-illustrations.png"}"));
}
catch { }
} else {
CopyrightBannerImage.Visibility = Visibility.Collapsed;
}
// 关于页面构建时间
var buildTime = FileBuildTimeHelper.GetBuildDateTime(System.Reflection.Assembly.GetExecutingAssembly());
if (buildTime != null) {
var bt = ((DateTimeOffset)buildTime).LocalDateTime;
var m = bt.Month.ToString().PadLeft(2, '0');
var d = bt.Day.ToString().PadLeft(2, '0');
var h = bt.Hour.ToString().PadLeft(2, '0');
var min = bt.Minute.ToString().PadLeft(2, '0');
var s = bt.Second.ToString().PadLeft(2, '0');
AboutBuildTime.Text =
$"build-{bt.Year}-{m}-{d}-{h}:{min}:{s}";
}
// 关于页面系统版本
AboutSystemVersion.Text = $"{OSVersion.GetOperatingSystem()} {OSVersion.GetOSVersion().Version}";
// 关于页面触摸设备
var _t_touch = new Thread(() => {
var touchcount = TouchTabletDetectHelper.GetTouchTabletDevices().Count;
var support = TouchTabletDetectHelper.IsTouchEnabled();
Dispatcher.BeginInvoke(() =>
AboutTouchTabletText.Text = $"{touchcount}个设备,{(support ? "" : "")}");
});
_t_touch.Start();
}
public enum SidebarItemType {
Item,
Separator
}
public class SidebarItem {
public SidebarItemType Type { get; set; }
public string Title { get; set; }
public string Name { get; set; }
public ImageSource IconSource { get; set; }
public bool Selected { get; set; }
public Visibility _spVisibility {
get => this.Type == SidebarItemType.Separator ? Visibility.Visible : Visibility.Collapsed;
}
public Visibility _siVisibility {
get => this.Type == SidebarItemType.Item ? Visibility.Visible : Visibility.Collapsed;
}
public SolidColorBrush _siBackground {
get => this.Selected
? new SolidColorBrush(Color.FromRgb(217, 217, 217))
: new SolidColorBrush(Colors.Transparent);
}
}
public string _selectedSidebarItemName = "";
public ObservableCollection<SidebarItem> SidebarItems = new ObservableCollection<SidebarItem>();
public void UpdateSidebarItemsSelection() {
foreach (var si in SidebarItems) {
si.Selected = si.Name == _selectedSidebarItemName;
if (si.Selected) SettingsWindowTitle.Text = si.Title;
}
CollectionViewSource.GetDefaultView(SidebarItems).Refresh();
}
public static class TouchTabletDetectHelper {
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int GetSystemMetrics(int nIndex);
public static bool IsTouchEnabled()
{
const int MAXTOUCHES_INDEX = 95;
int maxTouches = GetSystemMetrics(MAXTOUCHES_INDEX);
return maxTouches > 0;
}
public class USBDeviceInfo
{
public USBDeviceInfo(string deviceID, string pnpDeviceID, string description)
{
this.DeviceID = deviceID;
this.PnpDeviceID = pnpDeviceID;
this.Description = description;
}
public string DeviceID { get; private set; }
public string PnpDeviceID { get; private set; }
public string Description { get; private set; }
}
public static List<USBDeviceInfo> GetTouchTabletDevices()
{
List<USBDeviceInfo> devices = new List<USBDeviceInfo>();
ManagementObjectCollection collection;
using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_PnPEntity"))
collection = searcher.Get();
foreach (var device in collection) {
var name = new StringBuilder((string)device.GetPropertyValue("Name")).ToString();
if (!name.Contains("Pentablet")) continue;
devices.Add(new USBDeviceInfo(
(string)device.GetPropertyValue("DeviceID"),
(string)device.GetPropertyValue("PNPDeviceID"),
(string)device.GetPropertyValue("Description")
));
}
collection.Dispose();
return devices;
}
}
public static class FileBuildTimeHelper {
public struct _IMAGE_FILE_HEADER
{
public ushort Machine;
public ushort NumberOfSections;
public uint TimeDateStamp;
public uint PointerToSymbolTable;
public uint NumberOfSymbols;
public ushort SizeOfOptionalHeader;
public ushort Characteristics;
};
public static DateTimeOffset? GetBuildDateTime(Assembly assembly)
{
var path = assembly.Location;
if (File.Exists(path))
{
var buffer = new byte[Math.Max(Marshal.SizeOf(typeof(_IMAGE_FILE_HEADER)), 4)];
using (var fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
fileStream.Position = 0x3C;
fileStream.Read(buffer, 0, 4);
fileStream.Position = BitConverter.ToUInt32(buffer, 0); // COFF header offset
fileStream.Read(buffer, 0, 4); // "PE\0\0"
fileStream.Read(buffer, 0, buffer.Length);
}
var pinnedBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned);
try
{
var coffHeader = (_IMAGE_FILE_HEADER)Marshal.PtrToStructure(pinnedBuffer.AddrOfPinnedObject(), typeof(_IMAGE_FILE_HEADER));
return DateTimeOffset.FromUnixTimeSeconds(coffHeader.TimeDateStamp);
}
finally
{
pinnedBuffer.Free();
}
}
else
{
return null;
}
}
}
private Border _sidebarItemMouseDownBorder = null;
private void SidebarItem_MouseDown(object sender, MouseButtonEventArgs e) {
if (_sidebarItemMouseDownBorder != null || _sidebarItemMouseDownBorder == sender) return;
_sidebarItemMouseDownBorder = (Border)sender;
var bd = sender as Border;
if (bd.FindDescendantByName("MouseFeedbackBorder") is Border feedbackBd) feedbackBd.Opacity = 0.12;
}
private void SidebarItem_MouseUp(object sender, MouseButtonEventArgs e) {
if (_sidebarItemMouseDownBorder == null || _sidebarItemMouseDownBorder != sender) return;
if (_sidebarItemMouseDownBorder.Tag is SidebarItem data) _selectedSidebarItemName = data.Name;
SidebarItem_MouseLeave(sender, null);
UpdateSidebarItemsSelection();
}
private void SidebarItem_MouseLeave(object sender, MouseEventArgs e) {
if (_sidebarItemMouseDownBorder == null || _sidebarItemMouseDownBorder != sender) return;
if (_sidebarItemMouseDownBorder.FindDescendantByName("MouseFeedbackBorder") is Border feedbackBd) feedbackBd.Opacity = 0;
_sidebarItemMouseDownBorder = null;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB