diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..27d4f745 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,22 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +## Description + + +## Reproduction + + +## Expected behavior + + +## Screenshots + + +## Additional context diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..f909f8a7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,10 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +## Description diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 00000000..2b180086 --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -0,0 +1,35 @@ +name: .NET Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4.2.2 + + - name: Setup MSbuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2.0.1 + + - name: Restore NuGet Packages + run: nuget restore "Ink Canvas.sln" + + - name: Build the Solution + run: | + msbuild -t:restore /p:GitFlow="Github Action" + msbuild /p:platform="Any CPU" /p:configuration="Release" /p:GitFlow="Github Action" "Ink Canvas/InkCanvasForClass.csproj" + + - name: Upload to artifact + uses: actions/upload-artifact@v4.5.0 + with: + name: InkCanvasForClass + path: "Ink Canvas/bin/Any CPU/Release/net472/" diff --git a/.idea/.idea.Ink Canvas/.idea/.gitignore b/.idea/.idea.Ink Canvas/.idea/.gitignore new file mode 100644 index 00000000..b4ff7879 --- /dev/null +++ b/.idea/.idea.Ink Canvas/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/modules.xml +/contentModel.xml +/.idea.Ink Canvas.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.Ink Canvas/.idea/.name b/.idea/.idea.Ink Canvas/.idea/.name new file mode 100644 index 00000000..ecd6c92c --- /dev/null +++ b/.idea/.idea.Ink Canvas/.idea/.name @@ -0,0 +1 @@ +Ink Canvas \ No newline at end of file diff --git a/.idea/.idea.Ink Canvas/.idea/encodings.xml b/.idea/.idea.Ink Canvas/.idea/encodings.xml new file mode 100644 index 00000000..df87cf95 --- /dev/null +++ b/.idea/.idea.Ink Canvas/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.Ink Canvas/.idea/indexLayout.xml b/.idea/.idea.Ink Canvas/.idea/indexLayout.xml new file mode 100644 index 00000000..7b08163c --- /dev/null +++ b/.idea/.idea.Ink Canvas/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Ink Canvas/.idea/vcs.xml b/.idea/.idea.Ink Canvas/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/.idea.Ink Canvas/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/CodeChunks.db b/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/CodeChunks.db new file mode 100644 index 00000000..69e478f1 Binary files /dev/null and b/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/CodeChunks.db differ diff --git a/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/SemanticSymbols.db b/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/SemanticSymbols.db new file mode 100644 index 00000000..97f1c647 Binary files /dev/null and b/.vs/Ink Canvas/CopilotIndices/17.14.698.11175/SemanticSymbols.db differ diff --git a/.vs/Ink Canvas/DesignTimeBuild/.dtbcache.v2 b/.vs/Ink Canvas/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 00000000..6307a8a4 Binary files /dev/null and b/.vs/Ink Canvas/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/Ink Canvas/FileContentIndex/92cf1a99-e1a2-4b47-9d7c-1313c10009c7.vsidx b/.vs/Ink Canvas/FileContentIndex/92cf1a99-e1a2-4b47-9d7c-1313c10009c7.vsidx new file mode 100644 index 00000000..d507340b Binary files /dev/null and b/.vs/Ink Canvas/FileContentIndex/92cf1a99-e1a2-4b47-9d7c-1313c10009c7.vsidx differ diff --git a/.vs/Ink Canvas/FileContentIndex/bac8aa04-4cf8-4a92-bd23-531d2bcdccc9.vsidx b/.vs/Ink Canvas/FileContentIndex/bac8aa04-4cf8-4a92-bd23-531d2bcdccc9.vsidx new file mode 100644 index 00000000..f2098f47 Binary files /dev/null and b/.vs/Ink Canvas/FileContentIndex/bac8aa04-4cf8-4a92-bd23-531d2bcdccc9.vsidx differ diff --git a/.vs/Ink Canvas/FileContentIndex/dd2f2f2e-6cac-4256-b9af-f63d37652881.vsidx b/.vs/Ink Canvas/FileContentIndex/dd2f2f2e-6cac-4256-b9af-f63d37652881.vsidx new file mode 100644 index 00000000..70aef67a Binary files /dev/null and b/.vs/Ink Canvas/FileContentIndex/dd2f2f2e-6cac-4256-b9af-f63d37652881.vsidx differ diff --git a/.vs/Ink Canvas/v17/.futdcache.v2 b/.vs/Ink Canvas/v17/.futdcache.v2 new file mode 100644 index 00000000..aa9b49b2 Binary files /dev/null and b/.vs/Ink Canvas/v17/.futdcache.v2 differ diff --git a/.vs/Ink Canvas/v17/.suo b/.vs/Ink Canvas/v17/.suo new file mode 100644 index 00000000..68e42b28 Binary files /dev/null and b/.vs/Ink Canvas/v17/.suo differ diff --git a/.vs/Ink Canvas/v17/DocumentLayout.backup.json b/.vs/Ink Canvas/v17/DocumentLayout.backup.json new file mode 100644 index 00000000..6b64d5ef --- /dev/null +++ b/.vs/Ink Canvas/v17/DocumentLayout.backup.json @@ -0,0 +1,153 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|c:\\users\\administrator\\desktop\\icc ce\\icc-0610.2.3\\ink canvas\\mainwindow_cs\\mw_ppt.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|solutionrelative:ink canvas\\mainwindow_cs\\mw_ppt.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Ink Canvas.sln.DotSettings.user||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|c:\\users\\administrator\\desktop\\icc ce\\icc-0610.2.3\\ink canvas\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|solutionrelative:ink canvas\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:privacy.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Manual.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:LICENSE||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "MainWindow.xaml", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow.xaml", + "RelativeDocumentMoniker": "Ink Canvas\\MainWindow.xaml", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow.xaml", + "RelativeToolTip": "Ink Canvas\\MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2025-05-24T13:22:56.715Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "Microsoft.Common.CurrentVersion.targets", + "DocumentMoniker": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "RelativeDocumentMoniker": "..\\..\\..\\..\\..\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "ToolTip": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "RelativeToolTip": "..\\..\\..\\..\\..\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "ViewState": "AgIAAGsJAAAAAAAAAAAQwIEJAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003801|", + "WhenOpened": "2025-05-24T13:06:01.053Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MW_PPT.cs", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "RelativeDocumentMoniker": "Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "RelativeToolTip": "Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "ViewState": "AgIAAFgAAAAAAAAAAAAUwHQAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-24T13:04:47.205Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "README.md", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md", + "RelativeDocumentMoniker": "README.md", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md", + "RelativeToolTip": "README.md", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-05-24T13:04:01.407Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "privacy.txt", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt", + "RelativeDocumentMoniker": "privacy.txt", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt", + "RelativeToolTip": "privacy.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2025-05-24T13:04:01.337Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "Manual.md", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md", + "RelativeDocumentMoniker": "Manual.md", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md", + "RelativeToolTip": "Manual.md", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-05-24T13:04:00.986Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "LICENSE", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE", + "RelativeDocumentMoniker": "LICENSE", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE", + "RelativeToolTip": "LICENSE", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2025-05-24T13:04:00.902Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Ink Canvas.sln.DotSettings.user", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user", + "RelativeDocumentMoniker": "Ink Canvas.sln.DotSettings.user", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user", + "RelativeToolTip": "Ink Canvas.sln.DotSettings.user", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003464|", + "WhenOpened": "2025-05-24T13:04:00.792Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/Ink Canvas/v17/DocumentLayout.json b/.vs/Ink Canvas/v17/DocumentLayout.json new file mode 100644 index 00000000..6b64d5ef --- /dev/null +++ b/.vs/Ink Canvas/v17/DocumentLayout.json @@ -0,0 +1,153 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|c:\\users\\administrator\\desktop\\icc ce\\icc-0610.2.3\\ink canvas\\mainwindow_cs\\mw_ppt.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|solutionrelative:ink canvas\\mainwindow_cs\\mw_ppt.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Ink Canvas.sln.DotSettings.user||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|c:\\users\\administrator\\desktop\\icc ce\\icc-0610.2.3\\ink canvas\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}|Ink Canvas\\InkCanvasForClass.csproj|solutionrelative:ink canvas\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:privacy.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Manual.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:LICENSE||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "MainWindow.xaml", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow.xaml", + "RelativeDocumentMoniker": "Ink Canvas\\MainWindow.xaml", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow.xaml", + "RelativeToolTip": "Ink Canvas\\MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2025-05-24T13:22:56.715Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "Microsoft.Common.CurrentVersion.targets", + "DocumentMoniker": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "RelativeDocumentMoniker": "..\\..\\..\\..\\..\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "ToolTip": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "RelativeToolTip": "..\\..\\..\\..\\..\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\Microsoft.Common.CurrentVersion.targets", + "ViewState": "AgIAAGsJAAAAAAAAAAAQwIEJAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003801|", + "WhenOpened": "2025-05-24T13:06:01.053Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MW_PPT.cs", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "RelativeDocumentMoniker": "Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "RelativeToolTip": "Ink Canvas\\MainWindow_cs\\MW_PPT.cs", + "ViewState": "AgIAAFgAAAAAAAAAAAAUwHQAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-24T13:04:47.205Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "README.md", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md", + "RelativeDocumentMoniker": "README.md", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\README.md", + "RelativeToolTip": "README.md", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-05-24T13:04:01.407Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "privacy.txt", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt", + "RelativeDocumentMoniker": "privacy.txt", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\privacy.txt", + "RelativeToolTip": "privacy.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2025-05-24T13:04:01.337Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "Manual.md", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md", + "RelativeDocumentMoniker": "Manual.md", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Manual.md", + "RelativeToolTip": "Manual.md", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-05-24T13:04:00.986Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "LICENSE", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE", + "RelativeDocumentMoniker": "LICENSE", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\LICENSE", + "RelativeToolTip": "LICENSE", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2025-05-24T13:04:00.902Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Ink Canvas.sln.DotSettings.user", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user", + "RelativeDocumentMoniker": "Ink Canvas.sln.DotSettings.user", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\Ink Canvas.sln.DotSettings.user", + "RelativeToolTip": "Ink Canvas.sln.DotSettings.user", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003464|", + "WhenOpened": "2025-05-24T13:04:00.792Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/ProjectEvaluation/ink canvas.metadata.v9.bin b/.vs/ProjectEvaluation/ink canvas.metadata.v9.bin new file mode 100644 index 00000000..e8f31112 Binary files /dev/null and b/.vs/ProjectEvaluation/ink canvas.metadata.v9.bin differ diff --git a/.vs/ProjectEvaluation/ink canvas.projects.v9.bin b/.vs/ProjectEvaluation/ink canvas.projects.v9.bin new file mode 100644 index 00000000..f28260b8 Binary files /dev/null and b/.vs/ProjectEvaluation/ink canvas.projects.v9.bin differ diff --git a/.vs/ProjectEvaluation/ink canvas.strings.v9.bin b/.vs/ProjectEvaluation/ink canvas.strings.v9.bin new file mode 100644 index 00000000..d0f91645 Binary files /dev/null and b/.vs/ProjectEvaluation/ink canvas.strings.v9.bin differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..6b611411 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/icc-0610.2.2/FileContentIndex/777fbe68-06ce-4859-8b8d-d763f120f2c0.vsidx b/.vs/icc-0610.2.2/FileContentIndex/777fbe68-06ce-4859-8b8d-d763f120f2c0.vsidx new file mode 100644 index 00000000..69e6ba72 Binary files /dev/null and b/.vs/icc-0610.2.2/FileContentIndex/777fbe68-06ce-4859-8b8d-d763f120f2c0.vsidx differ diff --git a/.vs/icc-0610.2.2/FileContentIndex/95c8e0b1-8689-4e23-84a6-a09fc53d1455.vsidx b/.vs/icc-0610.2.2/FileContentIndex/95c8e0b1-8689-4e23-84a6-a09fc53d1455.vsidx new file mode 100644 index 00000000..072d526b Binary files /dev/null and b/.vs/icc-0610.2.2/FileContentIndex/95c8e0b1-8689-4e23-84a6-a09fc53d1455.vsidx differ diff --git a/.vs/icc-0610.2.2/v17/.wsuo b/.vs/icc-0610.2.2/v17/.wsuo new file mode 100644 index 00000000..187600a8 Binary files /dev/null and b/.vs/icc-0610.2.2/v17/.wsuo differ diff --git a/.vs/icc-0610.2.2/v17/DocumentLayout.backup.json b/.vs/icc-0610.2.2/v17/DocumentLayout.backup.json new file mode 100644 index 00000000..27e2d25f --- /dev/null +++ b/.vs/icc-0610.2.2/v17/DocumentLayout.backup.json @@ -0,0 +1,290 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "System.ValueTuple.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\System.ValueTuple.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\System.ValueTuple.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:48.138Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Settings.json", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Settings.json", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Settings.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-05-24T13:02:44.878Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "OSVersionExt.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\OSVersionExt.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\OSVersionExt.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.837Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "Office.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Office.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Office.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.774Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "NHotkey.Wpf.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\NHotkey.Wpf.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\NHotkey.Wpf.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.718Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "NHotkey.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\NHotkey.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\NHotkey.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.662Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "Newtonsoft.Json.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Newtonsoft.Json.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Newtonsoft.Json.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.589Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "Microsoft.Office.Interop.PowerPoint.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.932Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "MdXaml.Plugins.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\MdXaml.Plugins.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\MdXaml.Plugins.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.838Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "MdXaml.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\MdXaml.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\MdXaml.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.776Z" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "iNKORE.UI.WPF.Modern.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.573Z" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "iNKORE.UI.WPF.Modern.Controls.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.432Z" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "iNKORE.UI.WPF.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:42.807Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "InkCanvasForClass.exe.config", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2025-05-24T13:02:27.288Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "ICSharpCode.AvalonEdit.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.847Z" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "IAWinFX.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IAWinFX.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IAWinFX.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.816Z" + }, + { + "$type": "Document", + "DocumentIndex": 16, + "Title": "IALoader.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IALoader.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IALoader.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.784Z" + }, + { + "$type": "Document", + "DocumentIndex": 17, + "Title": "IACore.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IACore.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IACore.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.753Z" + }, + { + "$type": "Document", + "DocumentIndex": 18, + "Title": "Hardcodet.NotifyIcon.Wpf.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.113Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/icc-0610.2.2/v17/DocumentLayout.json b/.vs/icc-0610.2.2/v17/DocumentLayout.json new file mode 100644 index 00000000..10391208 --- /dev/null +++ b/.vs/icc-0610.2.2/v17/DocumentLayout.json @@ -0,0 +1,338 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll||{177559E0-D141-11D0-92DF-00A0C9138C45}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "icc.png - PNG [256x256, 32 \u4F4D, PNG]", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\icc.png", + "RelativeDocumentMoniker": "icc.png", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\icc.png - PNG [256x256, 32 \u4F4D, PNG]", + "RelativeToolTip": "icc.png - PNG [256x256, 32 \u4F4D, PNG]", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001533|", + "WhenOpened": "2025-05-24T13:03:45.63Z", + "EditorCaption": " - PNG [256x256, 32 \u4F4D, PNG]" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "AutomaticUpdateVersionControl.txt", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\AutomaticUpdateVersionControl.txt", + "RelativeDocumentMoniker": "AutomaticUpdateVersionControl.txt", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\AutomaticUpdateVersionControl.txt", + "RelativeToolTip": "AutomaticUpdateVersionControl.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2025-05-24T13:03:45.517Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": ".gitignore", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\.gitignore", + "RelativeDocumentMoniker": ".gitignore", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.2\\.gitignore", + "RelativeToolTip": ".gitignore", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2025-05-24T13:03:43.13Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "System.ValueTuple.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\System.ValueTuple.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\System.ValueTuple.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\System.ValueTuple.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:48.138Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "Settings.json", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Settings.json", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Settings.json", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Settings.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-05-24T13:02:44.878Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "OSVersionExt.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\OSVersionExt.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\OSVersionExt.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\OSVersionExt.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.837Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "Office.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Office.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Office.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Office.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.774Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "NHotkey.Wpf.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\NHotkey.Wpf.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.Wpf.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\NHotkey.Wpf.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.718Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "NHotkey.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\NHotkey.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\NHotkey.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\NHotkey.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.662Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Newtonsoft.Json.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Newtonsoft.Json.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Newtonsoft.Json.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Newtonsoft.Json.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:44.589Z" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "Microsoft.Office.Interop.PowerPoint.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Microsoft.Office.Interop.PowerPoint.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.932Z" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "MdXaml.Plugins.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\MdXaml.Plugins.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.Plugins.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\MdXaml.Plugins.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.838Z" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "MdXaml.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\MdXaml.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\MdXaml.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\MdXaml.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.776Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "iNKORE.UI.WPF.Modern.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.573Z" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "iNKORE.UI.WPF.Modern.Controls.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.Modern.Controls.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:43.432Z" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "iNKORE.UI.WPF.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\iNKORE.UI.WPF.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:42.807Z" + }, + { + "$type": "Document", + "DocumentIndex": 16, + "Title": "InkCanvasForClass.exe.config", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\InkCanvasForClass.exe.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2025-05-24T13:02:27.288Z" + }, + { + "$type": "Document", + "DocumentIndex": 17, + "Title": "ICSharpCode.AvalonEdit.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\ICSharpCode.AvalonEdit.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.847Z" + }, + { + "$type": "Document", + "DocumentIndex": 18, + "Title": "IAWinFX.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IAWinFX.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IAWinFX.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IAWinFX.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.816Z" + }, + { + "$type": "Document", + "DocumentIndex": 19, + "Title": "IALoader.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IALoader.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IALoader.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IALoader.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.784Z" + }, + { + "$type": "Document", + "DocumentIndex": 20, + "Title": "IACore.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\IACore.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\IACore.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\IACore.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.753Z" + }, + { + "$type": "Document", + "DocumentIndex": 21, + "Title": "Hardcodet.NotifyIcon.Wpf.dll", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "RelativeDocumentMoniker": "..\\..\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "RelativeToolTip": "..\\..\\InkCanvasForClass\\Hardcodet.NotifyIcon.Wpf.dll", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001697|", + "WhenOpened": "2025-05-24T13:02:22.113Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/icc-0610.2.2/v17/workspaceFileList.bin b/.vs/icc-0610.2.2/v17/workspaceFileList.bin new file mode 100644 index 00000000..8d13c3ee Binary files /dev/null and b/.vs/icc-0610.2.2/v17/workspaceFileList.bin differ diff --git a/.vs/icc-0610.2.3/FileContentIndex/29319a2c-7faa-4ee5-8d24-17c238ca803e.vsidx b/.vs/icc-0610.2.3/FileContentIndex/29319a2c-7faa-4ee5-8d24-17c238ca803e.vsidx new file mode 100644 index 00000000..b74c61fd Binary files /dev/null and b/.vs/icc-0610.2.3/FileContentIndex/29319a2c-7faa-4ee5-8d24-17c238ca803e.vsidx differ diff --git a/.vs/icc-0610.2.3/FileContentIndex/34c6dd5d-6075-49b2-ab2c-4e8d079d036e.vsidx b/.vs/icc-0610.2.3/FileContentIndex/34c6dd5d-6075-49b2-ab2c-4e8d079d036e.vsidx new file mode 100644 index 00000000..5a4c68f0 Binary files /dev/null and b/.vs/icc-0610.2.3/FileContentIndex/34c6dd5d-6075-49b2-ab2c-4e8d079d036e.vsidx differ diff --git a/.vs/icc-0610.2.3/FileContentIndex/7a5efc25-7ca5-4a7f-a0e0-0e8bf3996d0a.vsidx b/.vs/icc-0610.2.3/FileContentIndex/7a5efc25-7ca5-4a7f-a0e0-0e8bf3996d0a.vsidx new file mode 100644 index 00000000..b23372c0 Binary files /dev/null and b/.vs/icc-0610.2.3/FileContentIndex/7a5efc25-7ca5-4a7f-a0e0-0e8bf3996d0a.vsidx differ diff --git a/.vs/icc-0610.2.3/FileContentIndex/9947b71c-9e8d-4a20-80aa-4e44b1609bf2.vsidx b/.vs/icc-0610.2.3/FileContentIndex/9947b71c-9e8d-4a20-80aa-4e44b1609bf2.vsidx new file mode 100644 index 00000000..da5eb89f Binary files /dev/null and b/.vs/icc-0610.2.3/FileContentIndex/9947b71c-9e8d-4a20-80aa-4e44b1609bf2.vsidx differ diff --git a/.vs/icc-0610.2.3/FileContentIndex/e1d7dcd2-b73f-4c9a-b51c-9ba3cb8d4cbb.vsidx b/.vs/icc-0610.2.3/FileContentIndex/e1d7dcd2-b73f-4c9a-b51c-9ba3cb8d4cbb.vsidx new file mode 100644 index 00000000..8e02f030 Binary files /dev/null and b/.vs/icc-0610.2.3/FileContentIndex/e1d7dcd2-b73f-4c9a-b51c-9ba3cb8d4cbb.vsidx differ diff --git a/.vs/icc-0610.2.3/v17/.wsuo b/.vs/icc-0610.2.3/v17/.wsuo new file mode 100644 index 00000000..a7e1b305 Binary files /dev/null and b/.vs/icc-0610.2.3/v17/.wsuo differ diff --git a/.vs/icc-0610.2.3/v17/DocumentLayout.backup.json b/.vs/icc-0610.2.3/v17/DocumentLayout.backup.json new file mode 100644 index 00000000..48317cfd --- /dev/null +++ b/.vs/icc-0610.2.3/v17/DocumentLayout.backup.json @@ -0,0 +1,67 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "icc.png", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png", + "RelativeDocumentMoniker": "icc.png", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png", + "RelativeToolTip": "icc.png", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001533|", + "WhenOpened": "2025-05-24T13:12:49.619Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "AutomaticUpdateVersionControl.txt", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt", + "RelativeDocumentMoniker": "AutomaticUpdateVersionControl.txt", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt", + "RelativeToolTip": "AutomaticUpdateVersionControl.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2025-05-24T13:12:49.575Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": ".gitignore", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore", + "RelativeDocumentMoniker": ".gitignore", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore", + "RelativeToolTip": ".gitignore", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2025-05-24T13:12:49.025Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/icc-0610.2.3/v17/DocumentLayout.json b/.vs/icc-0610.2.3/v17/DocumentLayout.json new file mode 100644 index 00000000..b53370fc --- /dev/null +++ b/.vs/icc-0610.2.3/v17/DocumentLayout.json @@ -0,0 +1,72 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:icc.png||{177559E0-D141-11D0-92DF-00A0C9138C45}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:AutomaticUpdateVersionControl.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:.gitignore||{3B902123-F8A7-4915-9F01-361F908088D0}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "icc.png - PNG [1328x1328, 32 \u4F4D, PNG]", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png", + "RelativeDocumentMoniker": "icc.png", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\icc.png - PNG [1328x1328, 32 \u4F4D, PNG]", + "RelativeToolTip": "icc.png - PNG [1328x1328, 32 \u4F4D, PNG]", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001533|", + "WhenOpened": "2025-05-24T13:12:49.619Z", + "EditorCaption": " - PNG [1328x1328, 32 \u4F4D, PNG]" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "AutomaticUpdateVersionControl.txt", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt", + "RelativeDocumentMoniker": "AutomaticUpdateVersionControl.txt", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\AutomaticUpdateVersionControl.txt", + "RelativeToolTip": "AutomaticUpdateVersionControl.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2025-05-24T13:12:49.575Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": ".gitignore", + "DocumentMoniker": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore", + "RelativeDocumentMoniker": ".gitignore", + "ToolTip": "C:\\Users\\Administrator\\Desktop\\ICC CE\\icc-0610.2.3\\.gitignore", + "RelativeToolTip": ".gitignore", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2025-05-24T13:12:49.025Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/icc-0610.2.3/v17/workspaceFileList.bin b/.vs/icc-0610.2.3/v17/workspaceFileList.bin new file mode 100644 index 00000000..7eed11ec Binary files /dev/null and b/.vs/icc-0610.2.3/v17/workspaceFileList.bin differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 00000000..c3f8b831 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/AutomaticUpdateVersionControl.txt b/AutomaticUpdateVersionControl.txt new file mode 100644 index 00000000..32f3eaad --- /dev/null +++ b/AutomaticUpdateVersionControl.txt @@ -0,0 +1 @@ +5.0.1 \ No newline at end of file diff --git a/Images/icc1.png b/Images/icc1.png new file mode 100644 index 00000000..295d26a6 Binary files /dev/null and b/Images/icc1.png differ diff --git a/Images/icc2.png b/Images/icc2.png new file mode 100644 index 00000000..e47394fb Binary files /dev/null and b/Images/icc2.png differ diff --git a/Ink Canvas.sln b/Ink Canvas.sln new file mode 100644 index 00000000..f100002a --- /dev/null +++ b/Ink Canvas.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InkCanvasForClass", "Ink Canvas\InkCanvasForClass.csproj", "{8D0EDFC7-F974-4571-BC49-6F3A6653FE81}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|ARM.Build.0 = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|ARM64.Build.0 = Debug|ARM64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x64.ActiveCfg = Debug|x64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x64.Build.0 = Debug|x64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.ActiveCfg = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Debug|x86.Build.0 = Debug|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|Any CPU.Build.0 = Release|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|ARM.ActiveCfg = Release|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|ARM.Build.0 = Release|Any CPU + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|ARM64.ActiveCfg = Release|ARM64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|ARM64.Build.0 = Release|ARM64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|x64.ActiveCfg = Release|x64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|x64.Build.0 = Release|x64 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|x86.ActiveCfg = Release|x86 + {8D0EDFC7-F974-4571-BC49-6F3A6653FE81}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {89B9DD11-110D-428C-AB08-859B7F4B4E19} + EndGlobalSection +EndGlobal diff --git a/Ink Canvas.sln.DotSettings.user b/Ink Canvas.sln.DotSettings.user new file mode 100644 index 00000000..5ef2d603 --- /dev/null +++ b/Ink Canvas.sln.DotSettings.user @@ -0,0 +1,2 @@ + + WARNING \ No newline at end of file diff --git a/Ink Canvas/.vs/Ink Canvas.csproj.dtbcache.json b/Ink Canvas/.vs/Ink Canvas.csproj.dtbcache.json new file mode 100644 index 00000000..e9ad49bb --- /dev/null +++ b/Ink Canvas/.vs/Ink Canvas.csproj.dtbcache.json @@ -0,0 +1 @@ +{"RootPath":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas","ProjectFileName":"Ink Canvas.csproj","Configuration":"Release|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Helpers\\AutoUpdateHelper.cs"},{"SourceFile":"Helpers\\DelAutoSavedFiles.cs"},{"SourceFile":"Helpers\\ForegroundWindowInfo.cs"},{"SourceFile":"ChangeLogWindow.xaml.cs"},{"SourceFile":"OperatingGuideWindow.xaml.cs"},{"SourceFile":"CycleProcessBar.xaml.cs"},{"SourceFile":"Helpers\\AnimationsHelper.cs"},{"SourceFile":"Helpers\\InkRecognizeHelper.cs"},{"SourceFile":"Helpers\\LogHelper.cs"},{"SourceFile":"Helpers\\MultiTouchInput.cs"},{"SourceFile":"Helpers\\SoftwareLauncher.cs"},{"SourceFile":"Helpers\\TimeMachine.cs"},{"SourceFile":"Helpers\\Converters.cs"},{"SourceFile":"Helpers\\WinTabWindowsChecker.cs"},{"SourceFile":"NamesInputWindow.xaml.cs"},{"SourceFile":"RandWindow.xaml.cs"},{"SourceFile":"YesOrNoNotificationWindow.xaml.cs"},{"SourceFile":"Settings.cs"},{"SourceFile":"SettingsPage.xaml.cs"},{"SourceFile":"CountdownTimerWindow.xaml.cs"},{"SourceFile":"App.xaml.cs"},{"SourceFile":"Helpers\\Hotkey.cs"},{"SourceFile":"MainWindow.xaml.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Release\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\ChangeLogWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\OperatingGuideWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\CycleProcessBar.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\MainWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\NamesInputWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\RandWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\YesOrNoNotificationWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\SettingsPage.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\CountdownTimerWindow.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\App.g.cs"},{"SourceFile":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\obj\\Release\\GeneratedInternalTypeHelper.g.cs"}],"References":[{"Reference":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\IACore.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\IALoader.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\IAWinFX.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\inkore.ui.wpf.modern\\0.9.26.3\\lib\\net452\\iNKORE.UI.WPF.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\inkore.ui.wpf.modern\\0.9.26.3\\lib\\net452\\iNKORE.UI.WPF.Modern.Controls.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\inkore.ui.wpf.modern\\0.9.26.3\\lib\\net452\\iNKORE.UI.WPF.Modern.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\microsoft.office.interop.powerpoint\\15.0.4420.1018\\lib\\net20\\Microsoft.Office.Interop.PowerPoint.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.VisualBasic.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Facades\\netstandard.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\newtonsoft.json\\13.0.3\\lib\\net45\\Newtonsoft.Json.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\microsoftofficecore\\15.0.0\\lib\\net35\\Office.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationCore.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\PresentationFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\Administrator\\.nuget\\packages\\system.valuetuple\\4.5.0\\ref\\net47\\System.ValueTuple.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xaml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\UIAutomationClient.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\UIAutomationTypes.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\WindowsBase.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\WindowsFormsIntegration.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\bin\\Release\\Ink Canvas Annotation.exe","OutputItemRelativePath":"Ink Canvas Annotation.exe"},{"OutputItemFullPath":"E:\\projects\\VS source\\repos\\Ink-Canvas\\Ink Canvas\\bin\\Release\\Ink Canvas Annotation.pdb","OutputItemRelativePath":"Ink Canvas Annotation.pdb"}],"CopyToOutputEntries":[]} \ No newline at end of file diff --git a/Ink Canvas/App.config b/Ink Canvas/App.config new file mode 100644 index 00000000..e778ef70 --- /dev/null +++ b/Ink Canvas/App.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Ink Canvas/App.xaml b/Ink Canvas/App.xaml new file mode 100644 index 00000000..6575dacc --- /dev/null +++ b/Ink Canvas/App.xaml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/App.xaml.cs b/Ink Canvas/App.xaml.cs new file mode 100644 index 00000000..c1fd08cc --- /dev/null +++ b/Ink Canvas/App.xaml.cs @@ -0,0 +1,79 @@ +using Hardcodet.Wpf.TaskbarNotification; +using Ink_Canvas.Helpers; +using iNKORE.UI.WPF.Modern.Controls; +using System; +using System.Linq; +using System.Reflection; +using System.Windows; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; +using MessageBox = System.Windows.MessageBox; +using Window = System.Windows.Window; + +namespace Ink_Canvas +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + System.Threading.Mutex mutex; + + public static string[] StartArgs = null; + public static string RootPath = Environment.GetEnvironmentVariable("APPDATA") + "\\Ink Canvas\\"; + + public App() + { + this.Startup += new StartupEventHandler(App_Startup); + this.DispatcherUnhandledException += App_DispatcherUnhandledException; + } + + private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) + { + Ink_Canvas.MainWindow.ShowNewMessage("抱歉,出现未预期的异常,可能导致 InkCanvasForClass 运行不稳定。\n建议保存墨迹后重启应用。", true); + LogHelper.NewLog(e.Exception.ToString()); + e.Handled = true; + } + + private TaskbarIcon _taskbar; + + void App_Startup(object sender, StartupEventArgs e) + { + /*if (!StoreHelper.IsStoreApp) */RootPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; + + LogHelper.NewLog(string.Format("Ink Canvas Starting (Version: {0})", Assembly.GetExecutingAssembly().GetName().Version.ToString())); + + bool ret; + mutex = new System.Threading.Mutex(true, "InkCanvasForClass", out ret); + + if (!ret && !e.Args.Contains("-m")) //-m multiple + { + LogHelper.NewLog("Detected existing instance"); + MessageBox.Show("已有一个程序实例正在运行"); + LogHelper.NewLog("Ink Canvas automatically closed"); + Environment.Exit(0); + } + + _taskbar = (TaskbarIcon)FindResource("TaskbarTrayIcon"); + + StartArgs = e.Args; + } + + private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e) + { + try + { + if (System.Windows.Forms.SystemInformation.MouseWheelScrollLines == -1) + e.Handled = false; + else + try + { + ScrollViewerEx SenderScrollViewer = (ScrollViewerEx)sender; + SenderScrollViewer.ScrollToVerticalOffset(SenderScrollViewer.VerticalOffset - e.Delta * 10 * System.Windows.Forms.SystemInformation.MouseWheelScrollLines / (double)120); + e.Handled = true; + } + catch { } + } + catch { } + } + } +} diff --git a/Ink Canvas/AssemblyInfo.cs b/Ink Canvas/AssemblyInfo.cs new file mode 100644 index 00000000..0a156b5e --- /dev/null +++ b/Ink Canvas/AssemblyInfo.cs @@ -0,0 +1,53 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("InkCanvasForClass")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Dubi906w")] +[assembly: AssemblyProduct("InkCanvasForClass")] +[assembly: AssemblyCopyright("Copyright © HARKOTEK Studio 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("5.0.2.0")] +[assembly: AssemblyFileVersion("5.0.2.0")] diff --git a/Ink Canvas/Helpers/AnimationsHelper.cs b/Ink Canvas/Helpers/AnimationsHelper.cs new file mode 100644 index 00000000..b6fe0335 --- /dev/null +++ b/Ink Canvas/Helpers/AnimationsHelper.cs @@ -0,0 +1,281 @@ +using System; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Animation; + +namespace Ink_Canvas.Helpers +{ + internal class AnimationsHelper + { + public static void ShowWithFadeIn(UIElement element, double duration = 0.15) + { + if (element.Visibility == Visibility.Visible) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 渐变动画 + var fadeInAnimation = new DoubleAnimation + { + From = 0.5, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath(UIElement.OpacityProperty)); + + sb.Children.Add(fadeInAnimation); + + element.Visibility = Visibility.Visible; + + sb.Begin((FrameworkElement)element); + } + + public static void ShowWithSlideFromBottomAndFade(UIElement element, double duration = 0.15) + { + try + { + if (element.Visibility == Visibility.Visible) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 渐变动画 + var fadeInAnimation = new DoubleAnimation + { + From = 0.5, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + fadeInAnimation.EasingFunction = new CubicEase(); + + Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath(UIElement.OpacityProperty)); + + // 滑动动画 + var slideAnimation = new DoubleAnimation + { + From = element.RenderTransform.Value.OffsetY + 10, // 滑动距离 + To = 0, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.Y)")); + + slideAnimation.EasingFunction = new CubicEase(); + + sb.Children.Add(fadeInAnimation); + sb.Children.Add(slideAnimation); + + element.Visibility = Visibility.Visible; + element.RenderTransform = new TranslateTransform(); + + sb.Begin((FrameworkElement)element); + } + catch { } + } + + public static void ShowWithSlideFromLeftAndFade(UIElement element, double duration = 0.25) + { + try + { + if (element.Visibility == Visibility.Visible) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 渐变动画 + var fadeInAnimation = new DoubleAnimation + { + From = 0.5, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath(UIElement.OpacityProperty)); + + // 滑动动画 + var slideAnimation = new DoubleAnimation + { + From = element.RenderTransform.Value.OffsetX - 20, // 滑动距离 + To = 0, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)")); + + sb.Children.Add(fadeInAnimation); + sb.Children.Add(slideAnimation); + + element.Visibility = Visibility.Visible; + element.RenderTransform = new TranslateTransform(); + + sb.Begin((FrameworkElement)element); + } + catch { } + } + + public static void ShowWithScaleFromLeft(UIElement element, double duration = 0.2) + { + try + { + if (element.Visibility == Visibility.Visible) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 水平方向的缩放动画 + var scaleXAnimation = new DoubleAnimation + { + From = 0, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath("(UIElement.RenderTransform).(ScaleTransform.ScaleX)")); + + // 垂直方向的缩放动画 + var scaleYAnimation = new DoubleAnimation + { + From = 0, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + scaleYAnimation.EasingFunction = new CubicEase(); + scaleXAnimation.EasingFunction = new CubicEase(); + Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath("(UIElement.RenderTransform).(ScaleTransform.ScaleY)")); + + sb.Children.Add(scaleXAnimation); + sb.Children.Add(scaleYAnimation); + + element.Visibility = Visibility.Visible; + element.RenderTransformOrigin = new Point(0, 0.5); // 左侧中心点为基准 + element.RenderTransform = new ScaleTransform(0, 0); + + sb.Begin((FrameworkElement)element); + } + catch { } + } + + public static void ShowWithScaleFromRight(UIElement element, double duration = 0.2) + { + try + { + if (element.Visibility == Visibility.Visible) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 水平方向的缩放动画 + var scaleXAnimation = new DoubleAnimation + { + From = 0, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(scaleXAnimation, new PropertyPath("(UIElement.RenderTransform).(ScaleTransform.ScaleX)")); + + // 垂直方向的缩放动画 + var scaleYAnimation = new DoubleAnimation + { + From = 0, + To = 1, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(scaleYAnimation, new PropertyPath("(UIElement.RenderTransform).(ScaleTransform.ScaleY)")); + + scaleYAnimation.EasingFunction = new CubicEase(); + scaleXAnimation.EasingFunction = new CubicEase(); + + sb.Children.Add(scaleXAnimation); + sb.Children.Add(scaleYAnimation); + + element.Visibility = Visibility.Visible; + element.RenderTransformOrigin = new Point(1, 0.5); // 右侧中心点为基准 + element.RenderTransform = new ScaleTransform(0, 0); + + sb.Begin((FrameworkElement)element); + } + catch { } + } + + public static void HideWithSlideAndFade(UIElement element, double duration = 0.15) + { + try + { + if (element.Visibility == Visibility.Collapsed) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 渐变动画 + var fadeOutAnimation = new DoubleAnimation + { + From = 1, + To = 0, + Duration = TimeSpan.FromSeconds(duration) + }; + fadeOutAnimation.EasingFunction = new CubicEase(); + Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(UIElement.OpacityProperty)); + + // 滑动动画 + var slideAnimation = new DoubleAnimation + { + From = 0, + To = element.RenderTransform.Value.OffsetY + 10, // 滑动距离 + Duration = TimeSpan.FromSeconds(duration) + }; + slideAnimation.EasingFunction = new CubicEase(); + + Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.Y)")); + + sb.Children.Add(fadeOutAnimation); + sb.Children.Add(slideAnimation); + + sb.Completed += (s, e) => + { + element.Visibility = Visibility.Collapsed; + }; + + element.RenderTransform = new TranslateTransform(); + sb.Begin((FrameworkElement)element); + } + catch { } + } + + public static void HideWithFadeOut(UIElement element, double duration = 0.15) + { + if (element.Visibility == Visibility.Collapsed) return; + + if (element == null) + throw new ArgumentNullException(nameof(element)); + + var sb = new Storyboard(); + + // 渐变动画 + var fadeOutAnimation = new DoubleAnimation + { + From = 1, + To = 0, + Duration = TimeSpan.FromSeconds(duration) + }; + Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(UIElement.OpacityProperty)); + + sb.Children.Add(fadeOutAnimation); + + sb.Completed += (s, e) => + { + element.Visibility = Visibility.Collapsed; + }; + + sb.Begin((FrameworkElement)element); + } + + } +} diff --git a/Ink Canvas/Helpers/AutoUpdateHelper.cs b/Ink Canvas/Helpers/AutoUpdateHelper.cs new file mode 100644 index 00000000..7bdee88f --- /dev/null +++ b/Ink Canvas/Helpers/AutoUpdateHelper.cs @@ -0,0 +1,258 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Net.Http; +using System.Threading.Tasks; +using System.Reflection; +using System.Windows; +using System.Collections.ObjectModel; +using System.Linq; +using System.Windows.Controls; + +namespace Ink_Canvas.Helpers +{ + internal class AutoUpdateHelper + { + public static async Task CheckForUpdates(string proxy = null) + { + try + { + string localVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + string remoteAddress = proxy; + remoteAddress += "https://gitea.bliemhax.com/kriastans/InkCanvasForClass/raw/branch/master/AutomaticUpdateVersionControl.txt"; + string remoteVersion = await GetRemoteVersion(remoteAddress); + + if (remoteVersion != null) + { + Version local = new Version(localVersion); + Version remote = new Version(remoteVersion); + if (remote > local) + { + LogHelper.WriteLogToFile("AutoUpdate | New version Availble: " + remoteVersion); + return remoteVersion; + } + else return null; + } + else + { + LogHelper.WriteLogToFile("Failed to retrieve remote version.", LogHelper.LogType.Error); + return null; + } + } + catch (Exception ex) + { + Console.WriteLine($"AutoUpdate | Error: {ex.Message}"); + return null; + } + } + + public static async Task GetRemoteVersion(string fileUrl) + { + using (HttpClient client = new HttpClient()) + { + try + { + HttpResponseMessage response = await client.GetAsync(fileUrl); + response.EnsureSuccessStatusCode(); + + return await response.Content.ReadAsStringAsync(); + } + catch (HttpRequestException ex) + { + LogHelper.WriteLogToFile($"AutoUpdate | HTTP request error: {ex.Message}", LogHelper.LogType.Error); + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"AutoUpdate | Error: {ex.Message}", LogHelper.LogType.Error); + } + + return null; + } + } + + private static string updatesFolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ink Canvas Annotation", "AutoUpdate"); + private static string statusFilePath = null; + + public static async Task DownloadSetupFileAndSaveStatus(string version, string proxy = "") + { + try + { + statusFilePath = Path.Combine(updatesFolderPath, $"DownloadV{version}Status.txt"); + + if (File.Exists(statusFilePath) && File.ReadAllText(statusFilePath).Trim().ToLower() == "true") + { + LogHelper.WriteLogToFile("AutoUpdate | Setup file already downloaded."); + return true; + } + + string downloadUrl = $"{proxy}https://github.com/ChangSakura/Ink-Canvas/releases/download/v{version}/Ink.Canvas.Annotation.V{version}.Setup.exe"; + + SaveDownloadStatus(false); + await DownloadFile(downloadUrl, $"{updatesFolderPath}\\Ink.Canvas.Annotation.V{version}.Setup.exe"); + SaveDownloadStatus(true); + + LogHelper.WriteLogToFile("AutoUpdate | Setup file successfully downloaded."); + return true; + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"AutoUpdate | Error downloading and installing update: {ex.Message}", LogHelper.LogType.Error); + + SaveDownloadStatus(false); + return false; + } + } + + private static async Task DownloadFile(string fileUrl, string destinationPath) + { + using (HttpClient client = new HttpClient()) + { + try + { + HttpResponseMessage response = await client.GetAsync(fileUrl); + response.EnsureSuccessStatusCode(); + + using (FileStream fileStream = File.Create(destinationPath)) + { + await response.Content.CopyToAsync(fileStream); + fileStream.Close(); + } + } + catch (HttpRequestException ex) + { + Console.WriteLine($"AutoUpdate | HTTP request error: {ex.Message}"); + throw; + } + catch (Exception ex) + { + Console.WriteLine($"AutoUpdate | Error: {ex.Message}"); + throw; + } + } + } + + private static void SaveDownloadStatus(bool isSuccess) + { + try + { + if (statusFilePath == null) return; + + string directory = Path.GetDirectoryName(statusFilePath); + if (!Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + + File.WriteAllText(statusFilePath, isSuccess.ToString()); + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"AutoUpdate | Error saving download status: {ex.Message}", LogHelper.LogType.Error); + } + } + + public static void InstallNewVersionApp(string version, bool isInSilence) + { + try + { + string setupFilePath = Path.Combine(updatesFolderPath, $"Ink.Canvas.Annotation.V{version}.Setup.exe"); + + if (!File.Exists(setupFilePath)) + { + LogHelper.WriteLogToFile($"AutoUpdate | Setup file not found: {setupFilePath}", LogHelper.LogType.Error); + return; + } + + string InstallCommand = $"\"{setupFilePath}\" /SILENT"; + if (isInSilence) InstallCommand += " /VERYSILENT"; + ExecuteCommandLine(InstallCommand); + Application.Current.Dispatcher.Invoke(() => + { + Application.Current.Shutdown(); + }); + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"AutoUpdate | Error installing update: {ex.Message}", LogHelper.LogType.Error); + } + } + + + private static void ExecuteCommandLine(string command) + { + try + { + ProcessStartInfo processStartInfo = new ProcessStartInfo + { + FileName = "cmd.exe", + Arguments = $"/c {command}", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using (Process process = new Process { StartInfo = processStartInfo }) + { + process.Start(); + Application.Current.Shutdown(); + /*process.WaitForExit(); + int exitCode = process.ExitCode;*/ + } + } + catch { } + } + + public static void DeleteUpdatesFolder() + { + try + { + if (Directory.Exists(updatesFolderPath)) + { + Directory.Delete(updatesFolderPath, true); + } + } + catch (Exception ex) + { + LogHelper.WriteLogToFile($"AutoUpdate clearing| Error deleting updates folder: {ex.Message}", LogHelper.LogType.Error); + } + } + } + + internal class AutoUpdateWithSilenceTimeComboBox + { + public static ObservableCollection Hours { get; set; } = new ObservableCollection(); + public static ObservableCollection Minutes { get; set; } = new ObservableCollection(); + + public static void InitializeAutoUpdateWithSilenceTimeComboBoxOptions(ComboBox startTimeComboBox, ComboBox endTimeComboBox) + { + for (int hour = 0; hour <= 23; ++hour) + { + Hours.Add(hour.ToString("00")); + } + for (int minute = 0; minute <= 59; minute += 20) + { + Minutes.Add(minute.ToString("00")); + } + startTimeComboBox.ItemsSource = Hours.SelectMany(h => Minutes.Select(m => $"{h}:{m}")); + endTimeComboBox.ItemsSource = Hours.SelectMany(h => Minutes.Select(m => $"{h}:{m}")); + } + + public static bool CheckIsInSilencePeriod(string startTime, string endTime) + { + if (startTime == endTime) return true; + DateTime currentTime = DateTime.Now; + + DateTime StartTime = DateTime.ParseExact(startTime, "HH:mm", null); + DateTime EndTime = DateTime.ParseExact(endTime, "HH:mm", null); + if (StartTime <= EndTime) + { // 单日时间段 + return currentTime >= StartTime && currentTime <= EndTime; + } + else + { // 跨越两天的时间段 + return currentTime >= StartTime || currentTime <= EndTime; + } + } + } +} diff --git a/Ink Canvas/Helpers/Converters.cs b/Ink Canvas/Helpers/Converters.cs new file mode 100644 index 00000000..1d219958 --- /dev/null +++ b/Ink Canvas/Helpers/Converters.cs @@ -0,0 +1,133 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Ink_Canvas.Converter +{ + public class BooleanToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value == true) + { + return Visibility.Visible; + } + else + { + return Visibility.Collapsed; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if ((bool)value == true) + { + return Visibility.Visible; + } + else + { + return Visibility.Collapsed; + } + } + } + public class VisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + Visibility visibility = (Visibility)value; + if (visibility == Visibility.Visible) + { + return Visibility.Collapsed; + } + else + { + return Visibility.Visible; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + Visibility visibility = (Visibility)value; + if (visibility == Visibility.Visible) + { + return Visibility.Collapsed; + } + else + { + return Visibility.Visible; + } + } + } + + public class IntNumberToString : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((double)value == 0) + { + return "无限制"; + } + else + { + return ((double)value).ToString() + "人"; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((double)value == 0) + { + return "无限制"; + } + else + { + return ((double)value).ToString() + "人"; + } + } + } + + public class IntNumberToString2 : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((double)value == 0) + { + return "自动截图"; + } + else + { + return ((double)value).ToString() + "条"; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((double)value == 0) + { + return "自动截图"; + } + else + { + return ((double)value).ToString() + "条"; + } + } + } + + public class IsEnabledToOpacityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + bool isChecked = (bool)value; + if (isChecked == true) + { + return 1d; + } + else + { + return 0.35; + } + } + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } + } +} diff --git a/Ink Canvas/Helpers/DelAutoSavedFiles.cs b/Ink Canvas/Helpers/DelAutoSavedFiles.cs new file mode 100644 index 00000000..2071ed89 --- /dev/null +++ b/Ink Canvas/Helpers/DelAutoSavedFiles.cs @@ -0,0 +1,51 @@ +using System; +using System.IO; +using System.Windows; + +namespace Ink_Canvas.Helpers { + internal class DelAutoSavedFiles { + public static void DeleteFilesOlder(string directoryPath, int daysThreshold) { + string[] extensionsToDel = { ".icstk", ".png" }; + if (Directory.Exists(directoryPath)) { + // 获取目录中的所有子目录 + string[] subDirectories = Directory.GetDirectories(directoryPath, "*", SearchOption.AllDirectories); + foreach (string subDirectory in subDirectories) { + try { + // 获取子目录下的所有文件 + string[] files = Directory.GetFiles(subDirectory); + foreach (string filePath in files) { + // 获取文件的创建日期 + DateTime creationDate = File.GetCreationTime(filePath); + // 获取文件的扩展名 + string fileExtension = Path.GetExtension(filePath); + // 如果文件的创建日期早于指定天数且是要删除的扩展名,则删除文件 + if (creationDate < DateTime.Now.AddDays(-daysThreshold)) { + if (Array.Exists(extensionsToDel, ext => ext.Equals(fileExtension, StringComparison.OrdinalIgnoreCase)) + || Path.GetFileName(filePath).Equals("Position", StringComparison.OrdinalIgnoreCase)) { + File.Delete(filePath); + } + } + } + } catch (Exception ex) { + LogHelper.WriteLogToFile("DelAutoSavedFiles | 处理文件时出错: " + ex.ToString(), LogHelper.LogType.Error); + } + } + + try { // 递归删除空文件夹 + DeleteEmptyFolders(directoryPath); + } catch (Exception ex) { + LogHelper.WriteLogToFile("DelAutoSavedFiles | 处理文件时出错: " + ex.ToString(), LogHelper.LogType.Error); + } + } + } + + private static void DeleteEmptyFolders(string directoryPath) { + foreach (string dir in Directory.GetDirectories(directoryPath)) { + DeleteEmptyFolders(dir); + if (Directory.GetFiles(dir).Length == 0 && Directory.GetDirectories(dir).Length == 0) { + Directory.Delete(dir, false); + } + } + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/DelayActionHelper.cs b/Ink Canvas/Helpers/DelayActionHelper.cs new file mode 100644 index 00000000..bcf1fd51 --- /dev/null +++ b/Ink Canvas/Helpers/DelayActionHelper.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Timers; + +namespace Ink_Canvas.Helpers +{ + public class DelayAction + { + Timer _timerDebounce; + + /// + /// 防抖函式 + /// + /// 同步的對象,一般傳入控件,不需要可null + public void DebounceAction(int timeMs, ISynchronizeInvoke inv, Action action) + { + lock (this) { + if (_timerDebounce == null) { + _timerDebounce = new Timer(timeMs) { AutoReset = false }; + _timerDebounce.Elapsed += (o, e) => { + _timerDebounce.Stop(); _timerDebounce.Close(); _timerDebounce = null; + InvokeAction(action, inv); + }; + } + _timerDebounce.Stop(); + _timerDebounce.Start(); + } + } + + private static void InvokeAction(Action action, ISynchronizeInvoke inv) + { + if (inv == null) + { + action(); + } + else + { + if (inv.InvokeRequired) + { + inv.Invoke(action, null); + } + else + { + action(); + } + } + } + } +} diff --git a/Ink Canvas/Helpers/EdgeGestureUtil.cs b/Ink Canvas/Helpers/EdgeGestureUtil.cs new file mode 100644 index 00000000..26a6ffe6 --- /dev/null +++ b/Ink Canvas/Helpers/EdgeGestureUtil.cs @@ -0,0 +1,205 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.VisualBasic; +using System.Collections; +using System.Data; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; + +namespace Ink_Canvas.Helpers +{ + + public static class EdgeGestureUtil + { + + private static Guid DISABLE_TOUCH_SCREEN = new Guid("32CE38B2-2C9A-41B1-9BC5-B3784394AA44"); + private static Guid IID_PROPERTY_STORE = new Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99"); + + private static short VT_BOOL = 11; + #region "Structures" + + [StructLayout(LayoutKind.Sequential, Pack = 4)] + public struct PropertyKey + { + public PropertyKey(Guid guid, UInt32 pid) + { + fmtid = guid; + this.pid = pid; + } + + [MarshalAs(UnmanagedType.Struct)] + public Guid fmtid; + public uint pid; + } + + [StructLayout(LayoutKind.Explicit)] + public struct PropVariant + { + [FieldOffset(0)] + public short vt; + [FieldOffset(2)] + private short wReserved1; + [FieldOffset(4)] + private short wReserved2; + [FieldOffset(6)] + private short wReserved3; + [FieldOffset(8)] + private sbyte cVal; + [FieldOffset(8)] + private byte bVal; + [FieldOffset(8)] + private short iVal; + [FieldOffset(8)] + public ushort uiVal; + [FieldOffset(8)] + private int lVal; + [FieldOffset(8)] + private uint ulVal; + [FieldOffset(8)] + private int intVal; + [FieldOffset(8)] + private uint uintVal; + [FieldOffset(8)] + private long hVal; + [FieldOffset(8)] + private long uhVal; + [FieldOffset(8)] + private float fltVal; + [FieldOffset(8)] + private double dblVal; + [FieldOffset(8)] + public bool boolVal; + [FieldOffset(8)] + private int scode; + [FieldOffset(8)] + private DateTime date; + [FieldOffset(8)] + private System.Runtime.InteropServices.ComTypes.FILETIME filetime; + + [FieldOffset(8)] + private Blob blobVal; + [FieldOffset(8)] + private IntPtr pwszVal; + + + /// + /// Helper method to gets blob data + /// + private byte[] GetBlob() + { + byte[] Result = new byte[blobVal.Length]; + Marshal.Copy(blobVal.Data, Result, 0, Result.Length); + return Result; + } + + /// + /// Property value + /// + public object Value + { + get + { + VarEnum ve = (VarEnum)vt; + switch (ve) + { + case VarEnum.VT_I1: + return bVal; + case VarEnum.VT_I2: + return iVal; + case VarEnum.VT_I4: + return lVal; + case VarEnum.VT_I8: + return hVal; + case VarEnum.VT_INT: + return iVal; + case VarEnum.VT_UI4: + return ulVal; + case VarEnum.VT_LPWSTR: + return Marshal.PtrToStringUni(pwszVal); + case VarEnum.VT_BLOB: + return GetBlob(); + } + throw new NotImplementedException("PropVariant " + ve.ToString()); + } + } + } + + internal struct Blob + { + public int Length; + + public IntPtr Data; + //Code Should Compile at warning level4 without any warnings, + //However this struct will give us Warning CS0649: Field [Fieldname] + //is never assigned to, and will always have its default value + //You can disable CS0649 in the project options but that will disable + //the warning for the whole project, it's a nice warning and we do want + //it in other places so we make a nice dummy function to keep the compiler + //happy. + // 代码应该在警告级别 4 下编译而不会出现任何警告,但是此结构将给出警告 CS0649:字段 [Fieldname] 从未分配,并且始终具有其默认值。您可以在项目选项中禁用 CS0649,但这将禁用整个项目的警告,这是一个很好的警告,我们确实希望它在其他地方,所以我们制作了一个不错的虚拟函数来让编译器满意。 + private void FixCS0649() + { + Length = 0; + Data = IntPtr.Zero; + } + } + + #endregion + + #region "Interfaces" + + [ComImport(), Guid("886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IPropertyStore + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void GetCount([Out(), In()] ref uint cProps); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void GetAt([In()] uint iProp, ref PropertyKey pkey); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void GetValue([In()] ref PropertyKey key, ref PropVariant pv); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void SetValue([In()] ref PropertyKey key, [In()] ref PropVariant pv); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void Commit(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] + void Release(); + } + + #endregion + + #region "Methods" + + [DllImport("shell32.dll", SetLastError = true)] + private static extern int SHGetPropertyStoreForWindow(IntPtr handle, ref Guid riid, ref IPropertyStore propertyStore); + + public static void DisableEdgeGestures(IntPtr hwnd, bool enable) + { + IPropertyStore pPropStore = null; + int hr = 0; + hr = SHGetPropertyStoreForWindow(hwnd, ref IID_PROPERTY_STORE, ref pPropStore); + if (hr == 0) + { + PropertyKey propKey = new PropertyKey(); + propKey.fmtid = DISABLE_TOUCH_SCREEN; + propKey.pid = 2; + PropVariant var = new PropVariant(); + var.vt = VT_BOOL; + var.boolVal = enable; + pPropStore.SetValue(ref propKey, ref var); + Marshal.FinalReleaseComObject(pPropStore); + } + } + + #endregion + + } +} diff --git a/Ink Canvas/Helpers/ForegroundWindowInfo.cs b/Ink Canvas/Helpers/ForegroundWindowInfo.cs new file mode 100644 index 00000000..7968fc49 --- /dev/null +++ b/Ink Canvas/Helpers/ForegroundWindowInfo.cs @@ -0,0 +1,97 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Text; + +namespace Ink_Canvas.Helpers +{ + internal class ForegroundWindowInfo + { + [DllImport("user32.dll")] + private static extern IntPtr GetForegroundWindow(); + + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + private static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount); + + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect); + + [DllImport("user32.dll")] + private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId); + + [StructLayout(LayoutKind.Sequential)] + public struct RECT { + public int Left; + public int Top; + public int Right; + public int Bottom; + + public int Width => Right - Left; + public int Height => Bottom - Top; + } + + public static string WindowTitle() { + IntPtr foregroundWindowHandle = GetForegroundWindow(); + + const int nChars = 256; + StringBuilder windowTitle = new StringBuilder(nChars); + GetWindowText(foregroundWindowHandle, windowTitle, nChars); + + return windowTitle.ToString(); + } + + public static string WindowClassName() { + IntPtr foregroundWindowHandle = GetForegroundWindow(); + + const int nChars = 256; + StringBuilder className = new StringBuilder(nChars); + GetClassName(foregroundWindowHandle, className, nChars); + + return className.ToString(); + } + + public static RECT WindowRect() { + IntPtr foregroundWindowHandle = GetForegroundWindow(); + + RECT windowRect; + GetWindowRect(foregroundWindowHandle, out windowRect); + + return windowRect; + } + + public static string ProcessName() { + IntPtr foregroundWindowHandle = GetForegroundWindow(); + uint processId; + GetWindowThreadProcessId(foregroundWindowHandle, out processId); + + try { + Process process = Process.GetProcessById((int)processId); + return process.ProcessName; + } catch (ArgumentException) { + // Process with the given ID not found + return "Unknown"; + } + } + + public static string ProcessPath() + { + IntPtr foregroundWindowHandle = GetForegroundWindow(); + uint processId; + GetWindowThreadProcessId(foregroundWindowHandle, out processId); + + try + { + Process process = Process.GetProcessById((int)processId); + return process.MainModule.FileName; + } + catch { + // Process with the given ID not found + return "Unknown"; + } + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/FullScreenHelper.Win32.cs b/Ink Canvas/Helpers/FullScreenHelper.Win32.cs new file mode 100644 index 00000000..fae1dd0d --- /dev/null +++ b/Ink Canvas/Helpers/FullScreenHelper.Win32.cs @@ -0,0 +1,376 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +// 由衷感謝 lindexi 提供的 《WPF 稳定的全屏化窗口方法》 +// 文章鏈接:https://blog.lindexi.com/post/WPF-%E7%A8%B3%E5%AE%9A%E7%9A%84%E5%85%A8%E5%B1%8F%E5%8C%96%E7%AA%97%E5%8F%A3%E6%96%B9%E6%B3%95.html +// lindexi 的部落格:https://blog.lindexi.com/ + +namespace Ink_Canvas.Helpers +{ + public static partial class FullScreenHelper + { + static class Win32 + { + [Flags] + public enum ShowWindowCommands + { + /// + /// Maximizes the specified window. + /// + SW_MAXIMIZE = 3, + + /// + /// Activates and displays the window. If the window is minimized or maximized, the system restores it to its original + /// size and position. An application should specify this flag when restoring a minimized window. + /// + SW_RESTORE = 9, + } + + + internal static class Properties + { +#if !ANSI + public const CharSet BuildCharSet = CharSet.Unicode; +#else + public const CharSet BuildCharSet = CharSet.Ansi; +#endif + } + + public static class Dwmapi + { + public const string LibraryName = "Dwmapi.dll"; + + [DllImport(LibraryName, ExactSpelling = true, PreserveSig = false)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool DwmIsCompositionEnabled(); + + [DllImport("Dwmapi.dll", ExactSpelling = true, SetLastError = true)] + public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE dwAttribute, + in int pvAttribute, uint cbAttribute); + } + + public static class User32 + { + public const string LibraryName = "user32"; + + [DllImport(LibraryName, CharSet = Properties.BuildCharSet)] + public static extern bool GetMonitorInfo(IntPtr hMonitor, ref MonitorInfo lpmi); + + [DllImport(LibraryName, ExactSpelling = true)] + public static extern IntPtr MonitorFromRect(in Rectangle lprc, MonitorFlag dwFlags); + + [DllImport(LibraryName, ExactSpelling = true)] + public static extern bool IsIconic(IntPtr hwnd); + + [DllImport(LibraryName, ExactSpelling = true)] + public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow); + + [DllImport(LibraryName, ExactSpelling = true)] + public static extern bool SetWindowPlacement(IntPtr hWnd, + [In] ref WINDOWPLACEMENT lpwndpl); + + [return: MarshalAs(UnmanagedType.Bool)] + [DllImport(LibraryName, ExactSpelling = true)] + public static extern bool GetWindowRect(IntPtr hWnd, out Rectangle lpRect); + + [DllImport(LibraryName, ExactSpelling = true, SetLastError = true)] + public static extern Int32 SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, Int32 x, Int32 y, Int32 cx, + Int32 cy, Int32 wFlagslong); + + [DllImport(LibraryName, ExactSpelling = true)] + public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); + + public static IntPtr GetWindowLongPtr(IntPtr hWnd, GetWindowLongFields nIndex) => + GetWindowLongPtr(hWnd, (int) nIndex); + + public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex) + { + return IntPtr.Size > 4 +#pragma warning disable CS0618 // 类型或成员已过时 + ? GetWindowLongPtr_x64(hWnd, nIndex) + : new IntPtr(GetWindowLong(hWnd, nIndex)); +#pragma warning restore CS0618 // 类型或成员已过时 + } + + [DllImport(LibraryName, CharSet = Properties.BuildCharSet)] + public static extern int GetWindowLong(IntPtr hWnd, int nIndex); + + [DllImport(LibraryName, CharSet = Properties.BuildCharSet, EntryPoint = "GetWindowLongPtr")] + public static extern IntPtr GetWindowLongPtr_x64(IntPtr hWnd, int nIndex); + + public static IntPtr SetWindowLongPtr(IntPtr hWnd, GetWindowLongFields nIndex, IntPtr dwNewLong) => + SetWindowLongPtr(hWnd, (int) nIndex, dwNewLong); + + public static IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong) + { + return IntPtr.Size > 4 +#pragma warning disable CS0618 // 类型或成员已过时 + ? SetWindowLongPtr_x64(hWnd, nIndex, dwNewLong) + : new IntPtr(SetWindowLong(hWnd, nIndex, dwNewLong.ToInt32())); +#pragma warning restore CS0618 // 类型或成员已过时 + } + + [DllImport(LibraryName, CharSet = Properties.BuildCharSet, EntryPoint = "SetWindowLongPtr")] + public static extern IntPtr SetWindowLongPtr_x64(IntPtr hWnd, int nIndex, IntPtr dwNewLong); + + [DllImport(LibraryName, CharSet = Properties.BuildCharSet)] + public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); + } + } + + [StructLayout(LayoutKind.Sequential)] + struct MonitorInfo + { + /// + /// The size of the structure, in bytes. + /// + public uint Size; + + /// + /// A RECT structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates. Note that + /// if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values. + /// + public Rectangle MonitorRect; + + /// + /// A RECT structure that specifies the work area rectangle of the display monitor, expressed in virtual-screen + /// coordinates. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may + /// be negative values. + /// + public Rectangle WorkRect; + + /// + /// A set of flags that represent attributes of the display monitor. + /// + public MonitorInfoFlag Flags; + } + + enum MonitorInfoFlag + { + } + + enum MonitorFlag + { + /// + /// Returns a handle to the primary display monitor. + /// + MONITOR_DEFAULTTOPRIMARY = 1, + } + + [StructLayout(LayoutKind.Sequential)] + struct WindowPosition + { + public IntPtr Hwnd; + public IntPtr HwndZOrderInsertAfter; + public int X; + public int Y; + public int Width; + public int Height; + public WindowPositionFlags Flags; + } + + enum HwndZOrder + { + /// + /// Places the window at the top of the Z order. + /// + HWND_TOP = 0, + HWND_TOPMOST = -1, + } + + enum DWMWINDOWATTRIBUTE : uint + { + DWMWA_TRANSITIONS_FORCEDISABLED = 3, + } + + enum GetWindowLongFields + { + /// + /// 设定一个新的窗口风格 + /// Retrieves the window styles + /// + GWL_STYLE = -16, + } + + [StructLayout(LayoutKind.Sequential)] + struct WINDOWPLACEMENT // WindowPlacement + { + public uint Size; + public WindowPlacementFlags Flags; + public Win32.ShowWindowCommands ShowCmd; + public Point MinPosition; + public Point MaxPosition; + public Rectangle NormalPosition; + } + + [Flags] + public enum WindowPositionFlags + { + /// + /// + /// 清除客户区的所有内容。如果未设置该标志,客户区的有效内容被保存并且在窗口尺寸更新和重定位后拷贝回客户区 + /// + /// Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client + /// area are saved and copied back into the client area after the window is sized or repositioned. + /// + SWP_NOCOPYBITS = 0x0100, + + /// + /// + /// 维持当前位置(忽略X和Y参数) + /// + /// Retains the current position (ignores X and Y parameters). + /// + SWP_NOMOVE = 0x0002, + + /// + /// + /// 不重画改变的内容。如果设置了这个标志,则不发生任何重画动作。适用于客户区和非客户区(包括标题栏和滚动条)和任何由于窗回移动而露出的父窗口的所有部分。如果设置了这个标志,应用程序必须明确地使窗口无效并区重画窗口的任何部分和父窗口需要重画的部分 + /// + /// Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, + /// the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a + /// result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any + /// parts of the window and parent window that need redrawing. + /// + SWP_NOREDRAW = 0x0008, + + /// + /// + /// 维持当前尺寸(忽略 cx 和 cy 参数) + /// + /// Retains the current size (ignores the cx and cy parameters). + /// + SWP_NOSIZE = 0x0001, + + /// + /// + /// 维持当前 Z 序(忽略 hWndlnsertAfter 参数) + /// + /// Retains the current Z order (ignores the hWndInsertAfter parameter). + /// + SWP_NOZORDER = 0x0004, + } + + [StructLayout(LayoutKind.Sequential)] + struct Rectangle + { + public int Left; + public int Top; + public int Right; + public int Bottom; + + /// + /// 矩形的宽度 + /// + public int Width + { + get { return unchecked((int) (Right - Left)); } + set { Right = unchecked((int) (Left + value)); } + } + + /// + /// 矩形的高度 + /// + public int Height + { + get { return unchecked((int) (Bottom - Top)); } + set { Bottom = unchecked((int) (Top + value)); } + } + + public bool Equals(Rectangle other) + { + return (Left == other.Left) && (Right == other.Right) && (Top == other.Top) && (Bottom == other.Bottom); + } + + public override bool Equals(object obj) + { + return obj is Rectangle rectangle && Equals(rectangle); + } + + public static bool operator ==(Rectangle left, Rectangle right) + { + return left.Equals(right); + } + + public override int GetHashCode() + { + unchecked + { + var hashCode = (int) Left; + hashCode = (hashCode * 397) ^ (int) Top; + hashCode = (hashCode * 397) ^ (int) Right; + hashCode = (hashCode * 397) ^ (int) Bottom; + return hashCode; + } + } + + public static bool operator !=(Rectangle left, Rectangle right) + { + return !(left == right); + } + } + + [StructLayout(LayoutKind.Sequential)] + struct Point + { + public int X; + public int Y; + } + + [Flags] + enum WindowPlacementFlags + { + } + + [Flags] + enum WindowStyles + { + /// + /// The window is initially maximized. + /// + WS_MAXIMIZE = 0x01000000, + + /// + /// The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must + /// also be specified. + /// + WS_MAXIMIZEBOX = 0x00010000, + + /// + /// The window is initially minimized. Same as the WS_ICONIC style. + /// + WS_MINIMIZE = 0x20000000, + + /// + /// The window has a sizing border. Same as the WS_SIZEBOX style. + /// + WS_THICKFRAME = 0x00040000, + } + + [ComImport] + [Guid("602D4995-B13A-429b-A66E-1935E44F4317")] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + private interface ITaskbarList2 + { + [PreserveSig] + int HrInit(); + + [PreserveSig] + int AddTab(IntPtr hwnd); + + [PreserveSig] + int DeleteTab(IntPtr hwnd); + + [PreserveSig] + int ActivateTab(IntPtr hwnd); + + [PreserveSig] + int SetActiveAlt(IntPtr hwnd); + + [PreserveSig] + int MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/FullScreenHelper.cs b/Ink Canvas/Helpers/FullScreenHelper.cs new file mode 100644 index 00000000..b80a4a33 --- /dev/null +++ b/Ink Canvas/Helpers/FullScreenHelper.cs @@ -0,0 +1,301 @@ +using System; +using System.Runtime.ExceptionServices; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Interop; + +// 由衷感謝 lindexi 提供的 《WPF 稳定的全屏化窗口方法》 +// 文章鏈接:https://blog.lindexi.com/post/WPF-%E7%A8%B3%E5%AE%9A%E7%9A%84%E5%85%A8%E5%B1%8F%E5%8C%96%E7%AA%97%E5%8F%A3%E6%96%B9%E6%B3%95.html +// lindexi 的部落格:https://blog.lindexi.com/ + +namespace Ink_Canvas.Helpers +{ + /// + /// 用来使窗口变得全屏的辅助类 + /// 采用设置窗口位置和尺寸,确保盖住整个屏幕的方式来实现全屏 + /// 目前已知需要满足的条件是:窗口盖住整个屏幕、窗口没有WS_THICKFRAME样式、窗口不能有标题栏且最大化 + /// + public static partial class FullScreenHelper + { + public static void MarkFullscreenWindowTaskbarList(IntPtr hwnd, bool isFullscreen) + { + try + { + var CLSID_TaskbarList = new Guid("56FDF344-FD6D-11D0-958A-006097C9A090"); + var obj = Activator.CreateInstance(Type.GetTypeFromCLSID(CLSID_TaskbarList)); + (obj as ITaskbarList2)?.MarkFullscreenWindow(hwnd, isFullscreen); + } + catch + { + //应该不会挂 + } + } + + /// + /// 用于记录窗口全屏前位置的附加属性 + /// + private static readonly DependencyProperty BeforeFullScreenWindowPlacementProperty = + DependencyProperty.RegisterAttached("BeforeFullScreenWindowPlacement", typeof(WINDOWPLACEMENT?), + typeof(Window)); + + /// + /// 用于记录窗口全屏前样式的附加属性 + /// + private static readonly DependencyProperty BeforeFullScreenWindowStyleProperty = + DependencyProperty.RegisterAttached("BeforeFullScreenWindowStyle", typeof(WindowStyles?), typeof(Window)); + + /// + /// 开始进入全屏模式 + /// 进入全屏模式后,窗口可通过 API 方式(也可以用 Win + Shift + Left/Right)移动,调整大小,但会根据目标矩形寻找显示器重新调整到全屏状态。 + /// 进入全屏后,不要修改样式等窗口属性,在退出时,会恢复到进入前的状态 + /// 进入全屏模式后会禁用 DWM 过渡动画 + /// + /// + public static void StartFullScreen(Window window) + { + if (window == null) + { + throw new ArgumentNullException(nameof(window), $"{nameof(window)} 不能为 null"); + } + + //确保不在全屏模式 + if (window.GetValue(BeforeFullScreenWindowPlacementProperty) == null && + window.GetValue(BeforeFullScreenWindowStyleProperty) == null) + { + var hwnd = new WindowInteropHelper(window).EnsureHandle(); + var hwndSource = HwndSource.FromHwnd(hwnd); + + //获取当前窗口的位置大小状态并保存 + var placement = new WINDOWPLACEMENT(); + placement.Size = (uint) Marshal.SizeOf(placement); + Win32.User32.GetWindowPlacement(hwnd, ref placement); + window.SetValue(BeforeFullScreenWindowPlacementProperty, placement); + + //修改窗口样式 + var style = (WindowStyles) Win32.User32.GetWindowLongPtr(hwnd, GetWindowLongFields.GWL_STYLE); + window.SetValue(BeforeFullScreenWindowStyleProperty, style); + //将窗口恢复到还原模式,在有标题栏的情况下最大化模式下无法全屏, + //这里采用还原,不修改标题栏的方式 + //在退出全屏时,窗口原有的状态会恢复 + //去掉WS_THICKFRAME,在有该样式的情况下不能全屏 + //去掉WS_MAXIMIZEBOX,禁用最大化,如果最大化会退出全屏 + //去掉WS_MAXIMIZE,使窗口变成还原状态,不使用ShowWindow(hwnd, ShowWindowCommands.SW_RESTORE),避免看到窗口变成还原状态这一过程(也避免影响窗口的Visible状态) + style &= (~(WindowStyles.WS_THICKFRAME | WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_MAXIMIZE)); + Win32.User32.SetWindowLongPtr(hwnd, GetWindowLongFields.GWL_STYLE, (IntPtr) style); + + //禁用 DWM 过渡动画 忽略返回值,若DWM关闭不做处理 + Win32.Dwmapi.DwmSetWindowAttribute(hwnd, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, 1, + sizeof(int)); + + //添加Hook,在窗口尺寸位置等要发生变化时,确保全屏 + hwndSource.AddHook(KeepFullScreenHook); + + if (Win32.User32.GetWindowRect(hwnd, out var rect)) + { + //不能用 placement 的坐标,placement是工作区坐标,不是屏幕坐标。 + + //使用窗口当前的矩形调用下设置窗口位置和尺寸的方法,让Hook来进行调整窗口位置和尺寸到全屏模式 + Win32.User32.SetWindowPos(hwnd, (IntPtr) HwndZOrder.HWND_TOPMOST, rect.Left, rect.Top, rect.Width, + rect.Height, (int) WindowPositionFlags.SWP_NOZORDER); + } + } + } + + /// + /// 退出全屏模式 + /// 窗口会回到进入全屏模式时保存的状态 + /// 退出全屏模式后会重新启用 DWM 过渡动画 + /// + /// + public static void EndFullScreen(Window window) + { + if (window == null) + { + throw new ArgumentNullException(nameof(window), $"{nameof(window)} 不能为 null"); + } + + //确保在全屏模式并获取之前保存的状态 + if (window.GetValue(BeforeFullScreenWindowPlacementProperty) is WINDOWPLACEMENT placement + && window.GetValue(BeforeFullScreenWindowStyleProperty) is WindowStyles style) + { + var hwnd = new WindowInteropHelper(window).Handle; + + if (hwnd == IntPtr.Zero) + { + // 句柄为 0 只有两种情况: + // 1. 虽然窗口已进入全屏,但窗口已被关闭; + // 2. 窗口初始化前,在还没有调用 StartFullScreen 的前提下就调用了此方法。 + // 所以,直接 return 就好。 + return; + } + + + var hwndSource = HwndSource.FromHwnd(hwnd); + + //去除hook + hwndSource.RemoveHook(KeepFullScreenHook); + + //恢复保存的状态 + //不要改变Style里的WS_MAXIMIZE,否则会使窗口变成最大化状态,但是尺寸不对 + //也不要设置回Style里的WS_MINIMIZE,否则会导致窗口最小化按钮显示成还原按钮 + Win32.User32.SetWindowLongPtr(hwnd, GetWindowLongFields.GWL_STYLE, + (IntPtr) (style & (~(WindowStyles.WS_MAXIMIZE | WindowStyles.WS_MINIMIZE)))); + + if ((style & WindowStyles.WS_MINIMIZE) != 0) + { + //如果窗口进入全屏前是最小化的,这里不让窗口恢复到之前的最小化状态,而是到还原的状态。 + //大多数情况下,都不期望在退出全屏的时候,恢复到最小化。 + placement.ShowCmd = Win32.ShowWindowCommands.SW_RESTORE; + } + + if ((style & WindowStyles.WS_MAXIMIZE) != 0) + { + //提前调用 ShowWindow 使窗口恢复最大化,若通过 SetWindowPlacement 最大化会导致闪烁,只靠其恢复 RestoreBounds. + Win32.User32.ShowWindow(hwnd, Win32.ShowWindowCommands.SW_MAXIMIZE); + } + + Win32.User32.SetWindowPlacement(hwnd, ref placement); + + if ((style & WindowStyles.WS_MAXIMIZE) == + 0) //如果窗口是最大化就不要修改WPF属性,否则会破坏RestoreBounds,且WPF窗口自身在最大化时,不会修改 Left Top Width Height 属性 + { + if (Win32.User32.GetWindowRect(hwnd, out var rect)) + { + //不能用 placement 的坐标,placement是工作区坐标,不是屏幕坐标。 + + //确保窗口的 WPF 属性与 Win32 位置一致 + var logicalPos = + hwndSource.CompositionTarget.TransformFromDevice.Transform( + new System.Windows.Point(rect.Left, rect.Top)); + var logicalSize = + hwndSource.CompositionTarget.TransformFromDevice.Transform( + new System.Windows.Point(rect.Width, rect.Height)); + window.Left = logicalPos.X; + window.Top = logicalPos.Y; + window.Width = logicalSize.X; + window.Height = logicalSize.Y; + } + } + + //重新启用 DWM 过渡动画 忽略返回值,若DWM关闭不做处理 + Win32.Dwmapi.DwmSetWindowAttribute(hwnd, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, 0, + sizeof(int)); + + //删除保存的状态 + window.ClearValue(BeforeFullScreenWindowPlacementProperty); + window.ClearValue(BeforeFullScreenWindowStyleProperty); + } + } + + /// + /// 确保窗口全屏的Hook + /// 使用HandleProcessCorruptedStateExceptions,防止访问内存过程中因为一些致命异常导致程序崩溃 + /// + [HandleProcessCorruptedStateExceptions] + private static IntPtr KeepFullScreenHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) + { + //处理WM_WINDOWPOSCHANGING消息 + const int WINDOWPOSCHANGING = 0x0046; + if (msg == WINDOWPOSCHANGING) + { + try + { + //得到WINDOWPOS结构体 + var pos = (WindowPosition) Marshal.PtrToStructure(lParam, typeof(WindowPosition)); + + if ((pos.Flags & WindowPositionFlags.SWP_NOMOVE) != 0 && + (pos.Flags & WindowPositionFlags.SWP_NOSIZE) != 0) + { + //既然你既不改变位置,也不改变尺寸,我就不管了... + return IntPtr.Zero; + } + + if (Win32.User32.IsIconic(hwnd)) + { + // 如果在全屏期间最小化了窗口,那么忽略后续的位置调整。 + // 否则按后续逻辑,会根据窗口在 -32000 的位置,计算出错误的目标位置,然后就跳到主屏了。 + return IntPtr.Zero; + } + + //获取窗口现在的矩形,下面用来参考计算目标矩形 + if (Win32.User32.GetWindowRect(hwnd, out var rect)) + { + var targetRect = rect; //窗口想要变化的目标矩形 + + if ((pos.Flags & WindowPositionFlags.SWP_NOMOVE) == 0) + { + //需要移动 + targetRect.Left = pos.X; + targetRect.Top = pos.Y; + } + + if ((pos.Flags & WindowPositionFlags.SWP_NOSIZE) == 0) + { + //要改变尺寸 + targetRect.Right = targetRect.Left + pos.Width; + targetRect.Bottom = targetRect.Top + pos.Height; + } + else + { + //不改变尺寸 + targetRect.Right = targetRect.Left + rect.Width; + targetRect.Bottom = targetRect.Top + rect.Height; + } + + //使用目标矩形获取显示器信息 + var monitor = Win32.User32.MonitorFromRect(targetRect, MonitorFlag.MONITOR_DEFAULTTOPRIMARY); + var info = new MonitorInfo(); + info.Size = (uint) Marshal.SizeOf(info); + if (Win32.User32.GetMonitorInfo(monitor, ref info)) + { + //基于显示器信息设置窗口尺寸位置 + pos.X = info.MonitorRect.Left; + pos.Y = info.MonitorRect.Top; + pos.Width = info.MonitorRect.Right - info.MonitorRect.Left; + pos.Height = info.MonitorRect.Bottom - info.MonitorRect.Top; + pos.Flags &= ~(WindowPositionFlags.SWP_NOSIZE | WindowPositionFlags.SWP_NOMOVE | + WindowPositionFlags.SWP_NOREDRAW); + pos.Flags |= WindowPositionFlags.SWP_NOCOPYBITS; + + if (rect == info.MonitorRect) + { + var hwndSource = HwndSource.FromHwnd(hwnd); + if (hwndSource?.RootVisual is Window window) + { + //确保窗口的 WPF 属性与 Win32 位置一致,防止有逗比全屏后改 WPF 的属性,发生一些诡异的行为 + //下面这样做其实不太好,会再次触发 WM_WINDOWPOSCHANGING 来着.....但是又没有其他时机了 + // WM_WINDOWPOSCHANGED 不能用 + //(例如:在进入全屏后,修改 Left 属性,会进入 WM_WINDOWPOSCHANGING,然后在这里将消息里的结构体中的 Left 改回, + // 使对 Left 的修改无效,那么将不会进入 WM_WINDOWPOSCHANGED,窗口尺寸正常,但窗口的 Left 属性值错误。) + var logicalPos = + hwndSource.CompositionTarget.TransformFromDevice.Transform( + new System.Windows.Point(pos.X, pos.Y)); + var logicalSize = + hwndSource.CompositionTarget.TransformFromDevice.Transform( + new System.Windows.Point(pos.Width, pos.Height)); + window.Left = logicalPos.X; + window.Top = logicalPos.Y; + window.Width = logicalSize.X; + window.Height = logicalSize.Y; + } + else + { + //这个hwnd是前面从Window来的,如果现在他不是Window...... 你信么 + } + } + + //将修改后的结构体拷贝回去 + Marshal.StructureToPtr(pos, lParam, false); + } + } + } + catch + { + // 这里也不需要日志啥的,只是为了防止上面有逗比逻辑,在消息循环里面炸了 + } + } + + return IntPtr.Zero; + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/Hotkey.cs b/Ink Canvas/Helpers/Hotkey.cs new file mode 100644 index 00000000..0a60a215 --- /dev/null +++ b/Ink Canvas/Helpers/Hotkey.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Input; +using System.Windows.Interop; + +namespace Ink_Canvas +{ + static class Hotkey + { + #region 系统api + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool RegisterHotKey(IntPtr hWnd, int id, HotkeyModifiers fsModifiers, uint vk); + + [DllImport("user32.dll")] + static extern bool UnregisterHotKey(IntPtr hWnd, int id); + #endregion + + /// + /// 注册快捷键 + /// + /// 持有快捷键窗口 + /// 组合键 + /// 快捷键 + /// 回调函数 + public static bool Regist(Window window, HotkeyModifiers fsModifiers, Key key, HotKeyCallBackHanlder callBack) + { + var hwnd = new WindowInteropHelper(window).Handle; + var _hwndSource = HwndSource.FromHwnd(hwnd); + + if (keyid == 10) + { + _hwndSource.AddHook(WndProc); + } + + int id = keyid++; + + var vk = KeyInterop.VirtualKeyFromKey(key); + if (!RegisterHotKey(hwnd, id, fsModifiers, (uint)vk)) + { + //throw new Exception("regist hotkey fail."); + return false; + } + keymap[id] = callBack; + return true; + } + + /// + /// 快捷键消息处理 + /// + static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) + { + if (msg == WM_HOTKEY) + { + int id = wParam.ToInt32(); + if (keymap.TryGetValue(id, out var callback)) + { + callback(); + } + } + return IntPtr.Zero; + } + + /// + /// 注销快捷键 + /// + /// 持有快捷键窗口的句柄 + /// 回调函数 + public static void UnRegist(IntPtr hWnd, HotKeyCallBackHanlder callBack) + { + foreach (KeyValuePair var in keymap) + { + if (var.Value == callBack) + UnregisterHotKey(hWnd, var.Key); + } + } + + + const int WM_HOTKEY = 0x312; + static int keyid = 10; + static Dictionary keymap = new Dictionary(); + + public delegate void HotKeyCallBackHanlder(); + } + + enum HotkeyModifiers + { + MOD_ALT = 0x1, + MOD_CONTROL = 0x2, + MOD_SHIFT = 0x4, + MOD_WIN = 0x8 + } + +} diff --git a/Ink Canvas/Helpers/InkRecognizeHelper.cs b/Ink Canvas/Helpers/InkRecognizeHelper.cs new file mode 100644 index 00000000..af13de86 --- /dev/null +++ b/Ink Canvas/Helpers/InkRecognizeHelper.cs @@ -0,0 +1,200 @@ +using System.Linq; +using System.Windows; +using System.Windows.Ink; +using System.Windows.Media; + +namespace Ink_Canvas.Helpers +{ + public class InkRecognizeHelper + { + //识别形状 + public static ShapeRecognizeResult RecognizeShape(StrokeCollection strokes) + { + if (strokes == null || strokes.Count == 0) + return default; + + var analyzer = new InkAnalyzer(); + analyzer.AddStrokes(strokes); + analyzer.SetStrokesType(strokes, System.Windows.Ink.StrokeType.Drawing); + + AnalysisAlternate analysisAlternate = null; + int strokesCount = strokes.Count; + var sfsaf = analyzer.Analyze(); + if (sfsaf.Successful) + { + var alternates = analyzer.GetAlternates(); + if (alternates.Count > 0) + { + while ((!alternates[0].Strokes.Contains(strokes.Last()) || + !IsContainShapeType(((InkDrawingNode)alternates[0].AlternateNodes[0]).GetShapeName())) + && strokesCount >= 2) + { + analyzer.RemoveStroke(strokes[strokes.Count - strokesCount]); + strokesCount--; + sfsaf = analyzer.Analyze(); + if (sfsaf.Successful) + { + alternates = analyzer.GetAlternates(); + } + } + analysisAlternate = alternates[0]; + } + } + + analyzer.Dispose(); + + if (analysisAlternate != null && analysisAlternate.AlternateNodes.Count > 0) + { + var node = analysisAlternate.AlternateNodes[0] as InkDrawingNode; + return new ShapeRecognizeResult(node.Centroid, node.HotPoints, analysisAlternate, node); + } + + return default; + } + + public static bool IsContainShapeType(string name) + { + if (name.Contains("Triangle") || name.Contains("Circle") || + name.Contains("Rectangle") || name.Contains("Diamond") || + name.Contains("Parallelogram") || name.Contains("Square") + || name.Contains("Ellipse")) + { + return true; + } + return false; + } + } + + //Recognizer 的实现 + + public enum RecognizeLanguage + { + SimplifiedChinese = 0x0804, + TraditionalChinese = 0x7c03, + English = 0x0809 + } + + public class ShapeRecognizeResult + { + public ShapeRecognizeResult(Point centroid, PointCollection hotPoints, AnalysisAlternate analysisAlternate, InkDrawingNode node) + { + Centroid = centroid; + HotPoints = hotPoints; + AnalysisAlternate = analysisAlternate; + InkDrawingNode = node; + } + + public AnalysisAlternate AnalysisAlternate { get; } + + public Point Centroid { get; set; } + + public PointCollection HotPoints { get; } + + public InkDrawingNode InkDrawingNode { get; } + } + + /// + /// 图形识别类 + /// + //public class ShapeRecogniser + //{ + // public InkAnalyzer _inkAnalyzer = null; + + // private ShapeRecogniser() + // { + // this._inkAnalyzer = new InkAnalyzer + // { + // AnalysisModes = AnalysisModes.AutomaticReconciliationEnabled + // }; + // } + + // /// + // /// 根据笔迹集合返回图形名称字符串 + // /// + // /// + // /// + // public InkDrawingNode Recognition(StrokeCollection strokeCollection) + // { + // if (strokeCollection == null) + // { + // //MessageBox.Show("dddddd"); + // return null; + // } + + // InkDrawingNode result = null; + // try + // { + // this._inkAnalyzer.AddStrokes(strokeCollection); + // if (this._inkAnalyzer.Analyze().Successful) + // { + // result = _internalAnalyzer(this._inkAnalyzer); + // this._inkAnalyzer.RemoveStrokes(strokeCollection); + // } + // } + // catch (System.Exception ex) + // { + // //result = ex.Message; + // System.Diagnostics.Debug.WriteLine(ex.Message); + // } + + // return result; + // } + + // /// + // /// 实现笔迹的分析,返回图形对应的字符串 + // /// 你在实际的应用中根据返回的字符串来生成对应的Shape + // /// + // /// + // /// + // private InkDrawingNode _internalAnalyzer(InkAnalyzer ink) + // { + // try + // { + // ContextNodeCollection nodecollections = ink.FindNodesOfType(ContextNodeType.InkDrawing); + // foreach (ContextNode node in nodecollections) + // { + // InkDrawingNode drawingNode = node as InkDrawingNode; + // if (drawingNode != null) + // { + // return drawingNode;//.GetShapeName(); + // } + // } + // } + // catch (System.Exception ex) + // { + // System.Diagnostics.Debug.WriteLine(ex.Message); + // } + + // return null; + // } + + + // private static ShapeRecogniser instance = null; + // public static ShapeRecogniser Instance + // { + // get + // { + // return instance == null ? (instance = new ShapeRecogniser()) : instance; + // } + // } + //} + + + //用于自动控制其他形状相对于圆的位置 + + public class Circle + { + public Circle(Point centroid, double r, Stroke stroke) + { + Centroid = centroid; + R = r; + Stroke = stroke; + } + + public Point Centroid { get; set; } + + public double R { get; set; } + + public Stroke Stroke { get; set; } + } +} diff --git a/Ink Canvas/Helpers/IsOutsideOfScreenHelper.cs b/Ink Canvas/Helpers/IsOutsideOfScreenHelper.cs new file mode 100644 index 00000000..ca159271 --- /dev/null +++ b/Ink Canvas/Helpers/IsOutsideOfScreenHelper.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Interop; +using System.Windows; + +namespace Ink_Canvas.Helpers { + internal class IsOutsideOfScreenHelper { + public static bool IsOutsideOfScreen(FrameworkElement target) { + var hwndSource = (HwndSource)PresentationSource.FromVisual(target); + if (hwndSource is null) { + return true; + } + + var hWnd = hwndSource.Handle; + var targetBounds = GetPixelBoundsToScreen(target); + + var screens = System.Windows.Forms.Screen.AllScreens; + return !screens.Any(x => x.Bounds.IntersectsWith(targetBounds)); + + System.Drawing.Rectangle GetPixelBoundsToScreen(FrameworkElement visual) { + var pixelBoundsToScreen = Rect.Empty; + pixelBoundsToScreen.Union(visual.PointToScreen(new Point(0, 0))); + pixelBoundsToScreen.Union(visual.PointToScreen(new Point(visual.ActualWidth, 0))); + pixelBoundsToScreen.Union(visual.PointToScreen(new Point(0, visual.ActualHeight))); + pixelBoundsToScreen.Union(visual.PointToScreen(new Point(visual.ActualWidth, visual.ActualHeight))); + return new System.Drawing.Rectangle( + (int)pixelBoundsToScreen.X, (int)pixelBoundsToScreen.Y, + (int)pixelBoundsToScreen.Width, (int)pixelBoundsToScreen.Height); + } + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/LogHelper.cs b/Ink Canvas/Helpers/LogHelper.cs new file mode 100644 index 00000000..0e1129b2 --- /dev/null +++ b/Ink Canvas/Helpers/LogHelper.cs @@ -0,0 +1,63 @@ +using System; +using System.IO; + +namespace Ink_Canvas.Helpers +{ + class LogHelper + { + public static string LogFile = "Log.txt"; + + public static void NewLog(string str) + { + WriteLogToFile(str, LogType.Info); + } + + public static void NewLog(Exception ex) + { + + } + + public static void WriteLogToFile(string str, LogType logType = LogType.Info) + { + string strLogType = "Info"; + switch (logType) + { + case LogType.Event: + strLogType = "Event"; + break; + case LogType.Trace: + strLogType = "Trace"; + break; + case LogType.Error: + strLogType = "Error"; + break; + } + try + { + var file = App.RootPath + LogFile; + if (!Directory.Exists(App.RootPath)) + { + Directory.CreateDirectory(App.RootPath); + } + StreamWriter sw = new StreamWriter(file, true); + sw.WriteLine(string.Format("{0} [{1}] {2}", DateTime.Now.ToString("O"), strLogType, str)); + sw.Close(); + } + catch { } + } + + internal static void WriteLogToFile(string v, object warning) + { + throw new NotImplementedException(); + } + + public enum LogType + { + Info, + Trace, + Error, + Event, + Warning + } + } +} diff --git a/Ink Canvas/Helpers/MultiTouchInput.cs b/Ink Canvas/Helpers/MultiTouchInput.cs new file mode 100644 index 00000000..14f40e92 --- /dev/null +++ b/Ink Canvas/Helpers/MultiTouchInput.cs @@ -0,0 +1,98 @@ +using System; +using System.Windows; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; + +namespace Ink_Canvas.Helpers +{ + public class VisualCanvas : FrameworkElement + { + protected override Visual GetVisualChild(int index) + { + return Visual; + } + + protected override int VisualChildrenCount => 1; + + public VisualCanvas(DrawingVisual visual) + { + Visual = visual; + AddVisualChild(visual); + } + + public DrawingVisual Visual { get; } + } + + /// + /// 用于显示笔迹的类 + /// + public class StrokeVisual : DrawingVisual + { + /// + /// 创建显示笔迹的类 + /// + public StrokeVisual() : this(new DrawingAttributes() + { + Color = Colors.Red, + //FitToCurve = true, + Width = 3, + Height = 3 + }) + { + } + + /// + /// 创建显示笔迹的类 + /// + /// + public StrokeVisual(DrawingAttributes drawingAttributes) + { + _drawingAttributes = drawingAttributes; + } + + /// + /// 设置或获取显示的笔迹 + /// + public Stroke Stroke { set; get; } + + /// + /// 在笔迹中添加点 + /// + /// + public void Add(StylusPoint point) + { + if (Stroke == null) + { + var collection = new StylusPointCollection { point }; + Stroke = new Stroke(collection) { DrawingAttributes = _drawingAttributes }; + } + else + { + Stroke.StylusPoints.Add(point); + } + } + + /// + /// 重新画出笔迹 + /// + public void Redraw() + { + try + { + using (var dc = RenderOpen()) + { + Stroke.Draw(dc); + } + } + catch { } + } + + private readonly DrawingAttributes _drawingAttributes; + + public static implicit operator Stroke(StrokeVisual v) + { + throw new NotImplementedException(); + } + } +} diff --git a/Ink Canvas/Helpers/SoftwareLauncher.cs b/Ink Canvas/Helpers/SoftwareLauncher.cs new file mode 100644 index 00000000..54fd107a --- /dev/null +++ b/Ink Canvas/Helpers/SoftwareLauncher.cs @@ -0,0 +1,74 @@ +using Microsoft.Win32; +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Ink_Canvas.Helpers +{ + internal class SoftwareLauncher + { + [DllImport("user32.dll")] + private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); + + public static void LaunchEasiCamera(string softwareName) + { + string executablePath = FindEasiCameraExecutablePath(softwareName); + + if (!string.IsNullOrEmpty(executablePath)) + { + try + { + Process.Start(executablePath); + //Console.WriteLine(softwareName + " 启动成功!"); + } + catch (Exception ex) + { + Console.WriteLine("启动失败: " + ex.Message); + //MessageBox.Show("启动失败: " + ex.Message); + } + } + else + { + //Console.WriteLine(softwareName + " 未找到可执行文件路径。"); + } + } + + private static string FindEasiCameraExecutablePath(string softwareName) + { + string executablePath = null; + + using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall")) + { + foreach (string subkeyName in key.GetSubKeyNames()) + { + using (RegistryKey subkey = key.OpenSubKey(subkeyName)) + { + string displayName = subkey.GetValue("DisplayName") as string; + string installLocation = subkey.GetValue("InstallLocation") as string; + string uninstallString = subkey.GetValue("UninstallString") as string; + + if (!string.IsNullOrEmpty(displayName) && displayName.Contains(softwareName)) + { + if (!string.IsNullOrEmpty(installLocation)) + { + executablePath = System.IO.Path.Combine(installLocation, "sweclauncher.exe"); + } + else if (!string.IsNullOrEmpty(uninstallString)) + { + int lastSlashIndex = uninstallString.LastIndexOf("\\"); + if (lastSlashIndex >= 0) + { + string folderPath = uninstallString.Substring(0, lastSlashIndex); + executablePath = System.IO.Path.Combine(folderPath, "sweclauncher", "sweclauncher.exe"); + } + } + break; + } + } + } + } + + return executablePath; + } + } +} diff --git a/Ink Canvas/Helpers/TimeMachine.cs b/Ink Canvas/Helpers/TimeMachine.cs new file mode 100644 index 00000000..6c9838e3 --- /dev/null +++ b/Ink Canvas/Helpers/TimeMachine.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; + +namespace Ink_Canvas.Helpers +{ + public class TimeMachine + { + private readonly List _currentStrokeHistory = new List(); + + private int _currentIndex = -1; + + public delegate void OnUndoStateChange(bool status); + + public event OnUndoStateChange OnUndoStateChanged; + + public delegate void OnRedoStateChange(bool status); + + public event OnRedoStateChange OnRedoStateChanged; + + public void CommitStrokeUserInputHistory(StrokeCollection stroke) + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + _currentStrokeHistory.Add(new TimeMachineHistory(stroke, TimeMachineHistoryType.UserInput, false)); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + } + + public void CommitStrokeShapeHistory(StrokeCollection strokeToBeReplaced, StrokeCollection generatedStroke) + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + _currentStrokeHistory.Add(new TimeMachineHistory(generatedStroke, + TimeMachineHistoryType.ShapeRecognition, + false, + strokeToBeReplaced)); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + } + + public void CommitStrokeManipulationHistory(Dictionary> stylusPointDictionary) + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + _currentStrokeHistory.Add( + new TimeMachineHistory(stylusPointDictionary, + TimeMachineHistoryType.Manipulation)); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + } + public void CommitStrokeDrawingAttributesHistory(Dictionary> drawingAttributes) + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + _currentStrokeHistory.Add( + new TimeMachineHistory(drawingAttributes, + TimeMachineHistoryType.DrawingAttributes)); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + } + + public void CommitStrokeEraseHistory(StrokeCollection stroke, StrokeCollection sourceStroke = null) + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + _currentStrokeHistory.Add(new TimeMachineHistory(stroke, TimeMachineHistoryType.Clear, true, sourceStroke)); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + } + + public void ClearStrokeHistory() + { + _currentStrokeHistory.Clear(); + _currentIndex = -1; + NotifyUndoRedoState(); + } + + public TimeMachineHistory Undo() + { + var item = _currentStrokeHistory[_currentIndex]; + item.StrokeHasBeenCleared = !item.StrokeHasBeenCleared; + _currentIndex--; + OnUndoStateChanged?.Invoke(_currentIndex > -1); + OnRedoStateChanged?.Invoke(_currentStrokeHistory.Count - _currentIndex - 1 > 0); + return item; + } + + public TimeMachineHistory Redo() + { + var item = _currentStrokeHistory[++_currentIndex]; + item.StrokeHasBeenCleared = !item.StrokeHasBeenCleared; + NotifyUndoRedoState(); + return item; + } + + public TimeMachineHistory[] ExportTimeMachineHistory() + { + if (_currentIndex + 1 < _currentStrokeHistory.Count) + { + _currentStrokeHistory.RemoveRange(_currentIndex + 1, (_currentStrokeHistory.Count - 1) - _currentIndex); + } + return _currentStrokeHistory.ToArray(); + } + + public bool ImportTimeMachineHistory(TimeMachineHistory[] sourceHistory) + { + _currentStrokeHistory.Clear(); + _currentStrokeHistory.AddRange(sourceHistory); + _currentIndex = _currentStrokeHistory.Count - 1; + NotifyUndoRedoState(); + return true; + } + private void NotifyUndoRedoState() + { + OnUndoStateChanged?.Invoke(_currentIndex > -1); + OnRedoStateChanged?.Invoke(_currentStrokeHistory.Count - _currentIndex - 1 > 0); + } + } + + public class TimeMachineHistory + { + public TimeMachineHistoryType CommitType; + public bool StrokeHasBeenCleared = false; + public StrokeCollection CurrentStroke; + public StrokeCollection ReplacedStroke; + //这里说一下 Tuple的 Value1 是初始值 ; Value 2 是改变值 + public Dictionary> StylusPointDictionary; + public Dictionary> DrawingAttributes; + public TimeMachineHistory(StrokeCollection currentStroke, TimeMachineHistoryType commitType, bool strokeHasBeenCleared) + { + CommitType = commitType; + CurrentStroke = currentStroke; + StrokeHasBeenCleared = strokeHasBeenCleared; + ReplacedStroke = null; + } + public TimeMachineHistory(Dictionary> stylusPointDictionary, TimeMachineHistoryType commitType) + { + CommitType = commitType; + StylusPointDictionary = stylusPointDictionary; + } + public TimeMachineHistory(Dictionary> drawingAttributes, TimeMachineHistoryType commitType) + { + CommitType = commitType; + DrawingAttributes = drawingAttributes; + } + public TimeMachineHistory(StrokeCollection currentStroke, TimeMachineHistoryType commitType, bool strokeHasBeenCleared, StrokeCollection replacedStroke) + { + CommitType = commitType; + CurrentStroke = currentStroke; + StrokeHasBeenCleared = strokeHasBeenCleared; + ReplacedStroke = replacedStroke; + } + } + + public enum TimeMachineHistoryType + { + UserInput, + ShapeRecognition, + Clear, + Manipulation, + DrawingAttributes + } +} \ No newline at end of file diff --git a/Ink Canvas/Helpers/WinTabWindowsChecker.cs b/Ink Canvas/Helpers/WinTabWindowsChecker.cs new file mode 100644 index 00000000..e97e58d3 --- /dev/null +++ b/Ink Canvas/Helpers/WinTabWindowsChecker.cs @@ -0,0 +1,73 @@ +using System.Windows.Automation; + +namespace Ink_Canvas.Helpers { + internal class WinTabWindowsChecker { + /* + public static bool IsWindowMinimized(string windowName, bool matchFullName = true) { + // 获取Win+Tab预览中的窗口 + AutomationElementCollection windows = AutomationElement.RootElement.FindAll( + TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window)); + + foreach (AutomationElement window in windows) { + //LogHelper.WriteLogToFile("" + window.Current.Name); + + string windowTitle = window.Current.Name; + + // 如果窗口标题包含 windowName,则进行检查 + if (!string.IsNullOrEmpty(windowTitle) && windowTitle.Contains(windowName)) { + if (matchFullName) { + if (windowTitle.Length == windowName.Length) { + // 检查窗口是否最小化 + WindowPattern windowPattern = window.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern; + if (windowPattern != null) { + bool isMinimized = windowPattern.Current.WindowVisualState == WindowVisualState.Minimized; + //LogHelper.WriteLogToFile("" + windowTitle + isMinimized); + return isMinimized; + } + } + } else { + // 检查窗口是否最小化 + WindowPattern windowPattern = window.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern; + if (windowPattern != null) { + bool isMinimized = windowPattern.Current.WindowVisualState == WindowVisualState.Minimized; + return isMinimized; + } + } + } + } + // 未找到软件白板窗口 + return true; + } + */ + + public static bool IsWindowExisted(string windowName, bool matchFullName = true) { + // 获取Win+Tab预览中的窗口 + AutomationElementCollection windows = AutomationElement.RootElement.FindAll( + TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window)); + + foreach (AutomationElement window in windows) { + //LogHelper.WriteLogToFile("" + window.Current.Name); + + string windowTitle = window.Current.Name; + + // 如果窗口标题包含 windowName,则进行检查 + if (!string.IsNullOrEmpty(windowTitle) && windowTitle.Contains(windowName)) { + if (matchFullName) { + if (windowTitle.Length == windowName.Length) { + WindowPattern windowPattern = window.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern; + if (windowPattern != null) { + return true; + } + } + } else { + WindowPattern windowPattern = window.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern; + if (windowPattern != null) { + return true; + } + } + } + } + return false; + } + } +} diff --git a/Ink Canvas/InkCanvasForClass.csproj b/Ink Canvas/InkCanvasForClass.csproj new file mode 100644 index 00000000..fdd34062 --- /dev/null +++ b/Ink Canvas/InkCanvasForClass.csproj @@ -0,0 +1,561 @@ + + + win;win-x86;win-x64;win-arm64 + WinExe + Ink_Canvas + InkCanvasForClass + net472 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 2 + 2.0.2.%2a + false + false + False + true + Debug;Release;x86 Debug + + + embedded + bin\$(Configuration)\ + True + + + embedded + bin\$(Configuration)\ + True + + + embedded + bin\$(Configuration)\ + True + + + Resources\icc.ico + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + app.manifest + InkCanvasForClass + 5.0.4 + Dubi906w + InkCanvasForClass + © Copyright HARKOTEK Studio 2024-now + https://icc.bliemhax.com + bundled + False + AnyCPU + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + full + 7.3 + true + + + bin\$(Platform)\$(Configuration)\ + pdbonly + 7.3 + true + + + + .\IACore.dll + + + .\IALoader.dll + + + .\IAWinFX.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} + 1 + 0 + 0 + tlbimp + False + True + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + True + + + {0002E157-0000-0000-C000-000000000046} + 5 + 3 + 0 + primary + False + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + \ No newline at end of file diff --git a/Ink Canvas/InkCanvasForClass.csproj.user b/Ink Canvas/InkCanvasForClass.csproj.user new file mode 100644 index 00000000..92ed6d11 --- /dev/null +++ b/Ink Canvas/InkCanvasForClass.csproj.user @@ -0,0 +1,6 @@ + + + + <_LastSelectedProfileId>D:\vs\ica\Ink Canvas\Properties\PublishProfiles\FolderProfile.pubxml + + \ No newline at end of file diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml new file mode 100644 index 00000000..9e0f92e6 --- /dev/null +++ b/Ink Canvas/MainWindow.xaml @@ -0,0 +1,7254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 左下 + + + 右下 + + + 左侧 + + + 右侧 + + + + + + + + + + + + + + + + + + + + + + + + + 显示页码 + + + 半透明 + + + 黑色背景 + + + + + + 显示页码 + + + 半透明 + + + 黑色背景 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DesktopAnnotation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs new file mode 100644 index 00000000..a51f2626 --- /dev/null +++ b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs @@ -0,0 +1,393 @@ +using Ink_Canvas.Helpers; +using System; +using System.Media; +using System.Runtime.InteropServices; +using System.Timers; +using System.Windows; +using System.Windows.Input; +using System.Windows.Interop; +using System.Windows.Media; + +namespace Ink_Canvas +{ + /// + /// Interaction logic for StopwatchWindow.xaml + /// + public partial class CountdownTimerWindow : Window + { + public CountdownTimerWindow() + { + InitializeComponent(); + AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25); + + timer.Elapsed += Timer_Elapsed; + timer.Interval = 50; + } + + private void Timer_Elapsed(object sender, ElapsedEventArgs e) + { + if (!isTimerRunning || isPaused) + { + timer.Stop(); + return; + } + + TimeSpan timeSpan = DateTime.Now - startTime; + TimeSpan totalTimeSpan = new TimeSpan(hour, minute, second); + TimeSpan leftTimeSpan = totalTimeSpan - timeSpan; + if (leftTimeSpan.Milliseconds > 0) leftTimeSpan += new TimeSpan(0, 0, 1); + double spentTimePercent = timeSpan.TotalMilliseconds / (totalSeconds * 1000.0); + Application.Current.Dispatcher.Invoke(() => + { + ProcessBarTime.CurrentValue = 1 - spentTimePercent; + TextBlockHour.Text = leftTimeSpan.Hours.ToString("00"); + TextBlockMinute.Text = leftTimeSpan.Minutes.ToString("00"); + TextBlockSecond.Text = leftTimeSpan.Seconds.ToString("00"); + TbCurrentTime.Text = leftTimeSpan.ToString(@"hh\:mm\:ss"); + if (spentTimePercent >= 1) + { + ProcessBarTime.CurrentValue = 0; + TextBlockHour.Text = "00"; + TextBlockMinute.Text = "00"; + TextBlockSecond.Text = "00"; + timer.Stop(); + isTimerRunning = false; + SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play; + BtnStartCover.Visibility = Visibility.Visible; + TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F")); + BorderStopTime.Visibility = Visibility.Collapsed; + } + }); + if (spentTimePercent >= 1) + { + Application.Current.Dispatcher.Invoke(() => + { + //Play sound + player.Stream = Properties.Resources.TimerDownNotice; + player.Play(); + }); + } + } + + SoundPlayer player = new SoundPlayer(); + + int hour = 0; + int minute = 1; + int second = 0; + int totalSeconds = 60; + + DateTime startTime = DateTime.Now; + DateTime pauseTime = DateTime.Now; + + bool isTimerRunning = false; + bool isPaused = false; + + Timer timer = new Timer(); + + private void Grid_MouseUp(object sender, MouseButtonEventArgs e) + { + if (isTimerRunning) return; + if (ProcessBarTime.Visibility == Visibility.Visible && isTimerRunning == false) + { + ProcessBarTime.Visibility = Visibility.Collapsed; + GridAdjustHour.Visibility = Visibility.Visible; + TextBlockHour.Foreground = Brushes.Black; + } + else + { + ProcessBarTime.Visibility = Visibility.Visible; + GridAdjustHour.Visibility = Visibility.Collapsed; + TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F")); + + if (hour == 0 && minute == 0 && second == 0) + { + second = 1; + TextBlockSecond.Text = second.ToString("00"); + } + } + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + hour++; + if (hour >= 100) hour = 0; + TextBlockHour.Text = hour.ToString("00"); + } + + private void Button_Click_1(object sender, RoutedEventArgs e) + { + hour += 5; + if (hour >= 100) hour = 0; + TextBlockHour.Text = hour.ToString("00"); + } + + private void Button_Click_2(object sender, RoutedEventArgs e) + { + hour--; + if (hour < 0) hour = 99; + TextBlockHour.Text = hour.ToString("00"); + } + + private void Button_Click_3(object sender, RoutedEventArgs e) + { + hour -= 5; + if (hour < 0) hour = 99; + TextBlockHour.Text = hour.ToString("00"); + } + + private void Button_Click_4(object sender, RoutedEventArgs e) + { + minute++; + if (minute >= 60) minute = 0; + TextBlockMinute.Text = minute.ToString("00"); + } + + private void Button_Click_5(object sender, RoutedEventArgs e) + { + minute += 5; + if (minute >= 60) minute = 0; + TextBlockMinute.Text = minute.ToString("00"); + } + + private void Button_Click_6(object sender, RoutedEventArgs e) + { + minute--; + if (minute < 0) minute = 59; + TextBlockMinute.Text = minute.ToString("00"); + } + + private void Button_Click_7(object sender, RoutedEventArgs e) + { + minute -= 5; + if (minute < 0) minute = 59; + TextBlockMinute.Text = minute.ToString("00"); + } + + private void Button_Click_8(object sender, RoutedEventArgs e) + { + second += 5; + if (second >= 60) second = 0; + TextBlockSecond.Text = second.ToString("00"); + } + + private void Button_Click_9(object sender, RoutedEventArgs e) + { + second++; + if (second >= 60) second = 0; + TextBlockSecond.Text = second.ToString("00"); + } + + private void Button_Click_10(object sender, RoutedEventArgs e) + { + second--; + if (second < 0) second = 59; + TextBlockSecond.Text = second.ToString("00"); + } + + private void Button_Click_11(object sender, RoutedEventArgs e) + { + second -= 5; + if (second < 0) second = 59; + TextBlockSecond.Text = second.ToString("00"); + } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + ProcessBarTime.Visibility = Visibility.Visible; + GridAdjustHour.Visibility = Visibility.Collapsed; + BorderStopTime.Visibility = Visibility.Collapsed; + } + + private void BtnFullscreen_MouseUp(object sender, MouseButtonEventArgs e) + { + if (WindowState == WindowState.Normal) + { + WindowState = WindowState.Maximized; + SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.BackToWindow; + } + else + { + WindowState = WindowState.Normal; + SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.FullScreen; + } + } + + private void BtnReset_MouseUp(object sender, MouseButtonEventArgs e) + { + if (!isTimerRunning) + { + TextBlockHour.Text = hour.ToString("00"); + TextBlockMinute.Text = minute.ToString("00"); + TextBlockSecond.Text = second.ToString("00"); + BtnResetCover.Visibility = Visibility.Visible; + BtnStartCover.Visibility = Visibility.Collapsed; + BorderStopTime.Visibility = Visibility.Collapsed; + TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F")); + return; + } + else if (isTimerRunning && isPaused) + { + TextBlockHour.Text = hour.ToString("00"); + TextBlockMinute.Text = minute.ToString("00"); + TextBlockSecond.Text = second.ToString("00"); + BtnResetCover.Visibility = Visibility.Visible; + BtnStartCover.Visibility = Visibility.Collapsed; + BorderStopTime.Visibility = Visibility.Collapsed; + TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F")); + SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play; + isTimerRunning = false; + timer.Stop(); + isPaused = false; + ProcessBarTime.CurrentValue = 0; + ProcessBarTime.IsPaused = false; + } + else + { + UpdateStopTime(); + startTime = DateTime.Now; + Timer_Elapsed(timer, null); + } + } + + void UpdateStopTime() + { + TimeSpan totalTimeSpan = new TimeSpan(hour, minute, second); + TextBlockStopTime.Text = (startTime + totalTimeSpan).ToString("t"); + } + + private Color StringToColor(string colorStr) + { + Byte[] argb = new Byte[4]; + for (int i = 0; i < 4; i++) + { + char[] charArray = colorStr.Substring(i * 2 + 1, 2).ToCharArray(); + //string str = "11"; + Byte b1 = toByte(charArray[0]); + Byte b2 = toByte(charArray[1]); + argb[i] = (Byte)(b2 | (b1 << 4)); + } + + return Color.FromArgb(argb[0], argb[1], argb[2], argb[3]); //#FFFFFFFF + } + + private static byte toByte(char c) + { + byte b = (byte)"0123456789ABCDEF".IndexOf(c); + return b; + } + + private void BtnStart_MouseUp(object sender, MouseButtonEventArgs e) + { + if (isPaused && isTimerRunning) + { + //继续 + startTime += DateTime.Now - pauseTime; + ProcessBarTime.IsPaused = false; + TextBlockHour.Foreground = Brushes.Black; + SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Pause; + isPaused = false; + timer.Start(); + UpdateStopTime(); + BorderStopTime.Visibility = Visibility.Visible; + } + else if (isTimerRunning) + { + //暂停 + pauseTime = DateTime.Now; + ProcessBarTime.IsPaused = true; + TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F")); + SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play; + BorderStopTime.Visibility = Visibility.Collapsed; + isPaused = true; + timer.Stop(); + } + else + { + //从头开始 + startTime = DateTime.Now; + totalSeconds = ((hour * 60) + minute) * 60 + second; + ProcessBarTime.IsPaused = false; + TextBlockHour.Foreground = Brushes.Black; + SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Pause; + BtnResetCover.Visibility = Visibility.Collapsed; + + if (totalSeconds <= 10) + { + timer.Interval = 20; + } + else if (totalSeconds <= 60) + { + timer.Interval = 30; + } + else if (totalSeconds <= 120) + { + timer.Interval = 50; + } + else + { + timer.Interval = 100; + } + + isPaused = false; + isTimerRunning = true; + timer.Start(); + UpdateStopTime(); + BorderStopTime.Visibility = Visibility.Visible; + } + } + + private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + isTimerRunning = false; + } + + private void BtnClose_MouseUp(object sender, MouseButtonEventArgs e) + { + Close(); + } + + private bool _isInCompact = false; + + private void BtnMinimal_OnMouseUp(object sender, MouseButtonEventArgs e) + { + if (_isInCompact) + { + Width = 1100; + Height = 700; + BigViewController.Visibility = Visibility.Visible; + TbCurrentTime.Visibility = Visibility.Collapsed; + + // Set to center + double dpiScaleX = 1, dpiScaleY = 1; + PresentationSource source = PresentationSource.FromVisual(this); + if (source != null) { + dpiScaleX = source.CompositionTarget.TransformToDevice.M11; + dpiScaleY = source.CompositionTarget.TransformToDevice.M22; + } + IntPtr windowHandle = new WindowInteropHelper(this).Handle; + System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.FromHandle(windowHandle); + double screenWidth = screen.Bounds.Width / dpiScaleX, screenHeight = screen.Bounds.Height / dpiScaleY; + Left = (screenWidth / 2) - (Width / 2); + Top = (screenHeight / 2) - (Height / 2); + Left = (screenWidth / 2) - (Width / 2); + Top = (screenHeight / 2) - (Height / 2); + } + else + { + if (WindowState == WindowState.Maximized) WindowState = WindowState.Normal; + Width = 400; + Height = 250; + BigViewController.Visibility = Visibility.Collapsed; + TbCurrentTime.Visibility = Visibility.Visible; + } + + _isInCompact = !_isInCompact; + } + + private void WindowDragMove(object sender, MouseEventArgs e) + { + if (e.LeftButton == MouseButtonState.Pressed) + DragMove(); + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Windows/CycleProcessBar.xaml b/Ink Canvas/Windows/CycleProcessBar.xaml new file mode 100644 index 00000000..28b9e2e1 --- /dev/null +++ b/Ink Canvas/Windows/CycleProcessBar.xaml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/Ink Canvas/Windows/CycleProcessBar.xaml.cs b/Ink Canvas/Windows/CycleProcessBar.xaml.cs new file mode 100644 index 00000000..c8bf6a85 --- /dev/null +++ b/Ink Canvas/Windows/CycleProcessBar.xaml.cs @@ -0,0 +1,204 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace Ink_Canvas.ProcessBars +{ + /// + /// CycleProcessBar1.xaml 的交互逻辑 + /// + public partial class CycleProcessBar : UserControl + { + public CycleProcessBar() + { + InitializeComponent(); + IsPaused = false; + } + + public bool IsPaused + { + set { SetRingColor(value); } + } + + private void SetRingColor(bool isPaused) + { + if (isPaused) + { + myCycleProcessBar.Stroke = new SolidColorBrush(StringToColor("#FF1A71C8")); + } + else + { + myCycleProcessBar.Stroke = new SolidColorBrush(StringToColor("#FF0067C1")); + } + } + + private Color StringToColor(string colorStr) + { + Byte[] argb = new Byte[4]; + for (int i = 0; i < 4; i++) + { + char[] charArray = colorStr.Substring(i * 2 + 1, 2).ToCharArray(); + //string str = "11"; + Byte b1 = toByte(charArray[0]); + Byte b2 = toByte(charArray[1]); + argb[i] = (Byte)(b2 | (b1 << 4)); + } + return Color.FromArgb(argb[0], argb[1], argb[2], argb[3]);//#FFFFFFFF + } + + private static byte toByte(char c) + { + byte b = (byte)"0123456789ABCDEF".IndexOf(c); + return b; + } + + public double CurrentValue + { + set { SetValue(value); } + } + + /// + /// 设置百分百,输入小数,自动乘100 + /// + /// + private void SetValue(double percentValue) + { + /***************************************** + 方形矩阵边长为34,半长为17 + 环形半径为14,所以距离边框3个像素 + 环形描边3个像素 + ******************************************/ + double angel = percentValue * 360; //角度 + + double radius = 14; //环形半径 + + //起始点 + double leftStart = 17; + double topStart = 3; + + //结束点 + double endLeft = 0; + double endTop = 0; + + if (percentValue == 0) myCycleProcessBar.Visibility = Visibility.Hidden; + else myCycleProcessBar.Visibility = Visibility.Visible; + + + //数字显示 + lbValue.Content = (percentValue * 100).ToString("0") + "%"; + + /*********************************************** + * 整个环形进度条使用Path来绘制,采用三角函数来计算 + * 环形根据角度来分别绘制,以90度划分,方便计算比例 + ***********************************************/ + + bool isLagreCircle = false; //是否优势弧,即大于180度的弧形 + + //小于90度 + if (angel <= 90) + { + /***************** + * + * * + * * ra + * * * * * * * * * + * + * + * + ******************/ + double ra = (90 - angel) * Math.PI / 180; //弧度 + endLeft = leftStart + Math.Cos(ra) * radius; //余弦横坐标 + endTop = topStart + radius - Math.Sin(ra) * radius; //正弦纵坐标 + } + + else if (angel <= 180) + { + /***************** + * + * + * + * * * * * * * * * + * * ra + * * + * * + ******************/ + + double ra = (angel - 90) * Math.PI / 180; //弧度 + endLeft = leftStart + Math.Cos(ra) * radius; //余弦横坐标 + endTop = topStart + radius + Math.Sin(ra) * radius;//正弦纵坐标 + } + + else if (angel <= 270) + { + /***************** + * + * + * + * * * * * * * * * + * * + *ra* + * * + ******************/ + isLagreCircle = true; //优势弧 + double ra = (angel - 180) * Math.PI / 180; + endLeft = leftStart - Math.Sin(ra) * radius; + endTop = topStart + radius + Math.Cos(ra) * radius; + } + + else if (angel < 360) + { + /***************** + * * + * * + ra * * + * * * * * * * * * + * + * + * + ******************/ + isLagreCircle = true; //优势弧 + double ra = (angel - 270) * Math.PI / 180; + endLeft = leftStart - Math.Cos(ra) * radius; + endTop = topStart + radius - Math.Sin(ra) * radius; + } + else + { + isLagreCircle = true; //优势弧 + endLeft = leftStart - 0.001; //不与起点在同一点,避免重叠绘制出非环形 + endTop = topStart; + } + + Point arcEndPt = new Point(endLeft, endTop); //结束点 + Size arcSize = new Size(radius, radius); + SweepDirection direction = SweepDirection.Clockwise; //顺时针弧形 + //弧形 + ArcSegment arcsegment = new ArcSegment(arcEndPt, arcSize, 0, isLagreCircle, direction, true); + + //形状集合 + PathSegmentCollection pathsegmentCollection = new PathSegmentCollection(); + pathsegmentCollection.Add(arcsegment); + + //路径描述 + PathFigure pathFigure = new PathFigure(); + pathFigure.StartPoint = new Point(leftStart, topStart); //起始地址 + pathFigure.Segments = pathsegmentCollection; + + //路径描述集合 + PathFigureCollection pathFigureCollection = new PathFigureCollection(); + pathFigureCollection.Add(pathFigure); + + //复杂形状 + PathGeometry pathGeometry = new PathGeometry(); + pathGeometry.Figures = pathFigureCollection; + + //Data赋值 + myCycleProcessBar.Data = pathGeometry; + //达到100%则闭合整个 + if (angel == 360) + { + myCycleProcessBar.Data = Geometry.Parse(myCycleProcessBar.Data.ToString() + " z"); + } + } + } +} \ No newline at end of file diff --git a/Ink Canvas/Windows/HasNewUpdateWindow.xaml b/Ink Canvas/Windows/HasNewUpdateWindow.xaml new file mode 100644 index 00000000..7d0bcb1b --- /dev/null +++ b/Ink Canvas/Windows/HasNewUpdateWindow.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + # InkCanvasForClass v5.0.2更新 + + 你好,旅行者们,本次InkCanvasForClass更新带来了如下新功能供您探索: + + 1. 全新设计的UI界面,包括浮动工具栏和白板页面均经过重新设计,更加现代化的UI让您在使用的过程中更加舒适。 + 2. 带来了实时修改橡皮大小和橡皮形状的菜单。您可以选择使用圆形橡皮,方形橡皮,和类似希沃白板的真实黑板擦(矩形)橡皮。 + 3. 白板页面支持显示当前时间和日期 + 4. 自动收纳新增对希沃轻白板、智绘教、鸿合屏幕书写等软件的支持,自动查杀新增对鸿合屏幕书写、希沃轻白板等软件的支持。 + 5. 为设置界面重写了全新的UI。 + 6. 重写了随机抽选模块,现在支持更丰富的抽选机制和自定义选项。 + 7. 修复了部分小Bug,提升了整体的用户体验。 + 8. 带来了基于FitToCurve的笔迹平滑,基于贝塞尔曲线平滑,让墨迹线条更加优美好看。 + + + + + + + + + + +