diff --git a/.configurations/configuration.dsc.yaml b/.configurations/configuration.dsc.yaml
index 4649f8d3ea..a6256da512 100644
--- a/.configurations/configuration.dsc.yaml
+++ b/.configurations/configuration.dsc.yaml
@@ -11,7 +11,7 @@ properties:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
- description: Install Visual Studio 2022 (any edition is OK)
+ description: Install Visual Studio 2022 Community (Any edition will work)
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.Community
@@ -31,4 +31,4 @@ properties:
# Next steps:
# Open a terminal
# Navigate to the folder you cloned PowerToys to.
- # Run git submodule update --init --recursive
\ No newline at end of file
+ # Run git submodule update --init --recursive
diff --git a/.configurations/configuration.vsEnterprise.dsc.yaml b/.configurations/configuration.vsEnterprise.dsc.yaml
new file mode 100644
index 0000000000..34d73f4975
--- /dev/null
+++ b/.configurations/configuration.vsEnterprise.dsc.yaml
@@ -0,0 +1,34 @@
+# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
+# Reference: https://github.com/microsoft/PowerToys/blob/main/doc/devdocs/readme.md#compiling-powertoys
+properties:
+ resources:
+ - resource: Microsoft.Windows.Developer/DeveloperMode
+ directives:
+ description: Enable Developer Mode
+ allowPrerelease: true
+ settings:
+ Ensure: Present
+ - resource: Microsoft.WinGet.DSC/WinGetPackage
+ id: vsPackage
+ directives:
+ description: Install Visual Studio 2022 Enterprise (Any edition will work)
+ allowPrerelease: true
+ settings:
+ id: Microsoft.VisualStudio.2022.Enterprise
+ source: winget
+ - resource: Microsoft.VisualStudio.DSC/VSComponents
+ dependsOn:
+ - vsPackage
+ directives:
+ description: Install required VS workloads
+ allowPrerelease: true
+ settings:
+ productId: Microsoft.VisualStudio.Product.Enterprise
+ channelId: VisualStudio.17.Release
+ vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
+ configurationVersion: 0.2.0
+
+ # Next steps:
+ # Open a terminal
+ # Navigate to the folder you cloned PowerToys to.
+ # Run git submodule update --init --recursive
diff --git a/.configurations/configuration.vsProfessional.dsc.yaml b/.configurations/configuration.vsProfessional.dsc.yaml
new file mode 100644
index 0000000000..3c08d05856
--- /dev/null
+++ b/.configurations/configuration.vsProfessional.dsc.yaml
@@ -0,0 +1,34 @@
+# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
+# Reference: https://github.com/microsoft/PowerToys/blob/main/doc/devdocs/readme.md#compiling-powertoys
+properties:
+ resources:
+ - resource: Microsoft.Windows.Developer/DeveloperMode
+ directives:
+ description: Enable Developer Mode
+ allowPrerelease: true
+ settings:
+ Ensure: Present
+ - resource: Microsoft.WinGet.DSC/WinGetPackage
+ id: vsPackage
+ directives:
+ description: Install Visual Studio 2022 Professional (Any edition will work)
+ allowPrerelease: true
+ settings:
+ id: Microsoft.VisualStudio.2022.Professional
+ source: winget
+ - resource: Microsoft.VisualStudio.DSC/VSComponents
+ dependsOn:
+ - vsPackage
+ directives:
+ description: Install required VS workloads
+ allowPrerelease: true
+ settings:
+ productId: Microsoft.VisualStudio.Product.Professional
+ channelId: VisualStudio.17.Release
+ vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
+ configurationVersion: 0.2.0
+
+ # Next steps:
+ # Open a terminal
+ # Navigate to the folder you cloned PowerToys to.
+ # Run git submodule update --init --recursive
diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt
index 8ff1469510..1de314b0f0 100644
--- a/.github/actions/spell-check/expect.txt
+++ b/.github/actions/spell-check/expect.txt
@@ -367,6 +367,7 @@ DUMMYUNIONNAME
dutil
DVASPECT
DVASPECTINFO
+DVD
DVH
DVHD
dvr
@@ -422,8 +423,8 @@ EResize
ERole
ERRORIMAGE
ERRORTITLE
+erwrite
ESettings
-esize
esrp
etl
ETW
@@ -468,6 +469,7 @@ FILEEXPLORER
FILEFLAGS
FILEFLAGSMASK
FILELOCKSMITH
+FILELOCKSMITHCONTEXTMENU
FILELOCKSMITHEXT
FILELOCKSMITHLIB
FILELOCKSMITHLIBINTEROP
diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json
index 097645b675..0e6a887ec9 100644
--- a/.pipelines/ESRPSigning_core.json
+++ b/.pipelines/ESRPSigning_core.json
@@ -102,6 +102,8 @@
"WinUI3Apps\\PowerToys.FileLocksmithExt.dll",
"WinUI3Apps\\PowerToys.FileLocksmithUI.exe",
"WinUI3Apps\\PowerToys.FileLocksmithUI.dll",
+ "WinUI3Apps\\PowerToys.FileLocksmithContextMenu.dll",
+ "FileLocksmithContextMenuPackage.msix",
"WinUI3Apps\\Peek.Common.dll",
"WinUI3Apps\\Peek.FilePreviewer.dll",
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 32e077ac9a..5074d9e290 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -73,7 +73,7 @@
-
+
@@ -90,7 +90,7 @@
-
+
diff --git a/NOTICE.md b/NOTICE.md
index 235cff2ad8..5ce46f3b7d 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -1354,7 +1354,7 @@ EXHIBIT A -Mozilla Public License.
- System.Data.SqlClient 4.8.6
- System.Diagnostics.EventLog 8.0.0
- System.Diagnostics.PerformanceCounter 8.0.0
-- System.Drawing.Common 8.0.1
+- System.Drawing.Common 8.0.2
- System.IO.Abstractions 17.2.3
- System.IO.Abstractions.TestingHelpers 17.2.3
- System.Management 8.0.0
@@ -1370,4 +1370,4 @@ EXHIBIT A -Mozilla Public License.
- Vanara.PInvoke.Shell32 3.4.11
- Vanara.PInvoke.User32 3.4.11
- WinUIEx 2.2.0
-- WPF-UI 3.0.0-preview.13
+- WPF-UI 3.0.0
diff --git a/PowerToys.sln b/PowerToys.sln
index d2b108b6f1..ab6bba5df5 100644
--- a/PowerToys.sln
+++ b/PowerToys.sln
@@ -564,6 +564,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-QoiThumbnailProvi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdNotFoundModuleInterface", "src\modules\cmdNotFound\CmdNotFoundModuleInterface\CmdNotFoundModuleInterface.vcxproj", "{0014D652-901F-4456-8D65-06FC5F997FB0}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithContextMenu", "src\modules\FileLocksmith\FileLocksmithContextMenu\FileLocksmithContextMenu.vcxproj", "{799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileLocksmithLib", "src\modules\FileLocksmith\FileLocksmithLib\FileLocksmithLib.vcxproj", "{9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITests-FancyZones", "src\modules\fancyzones\UITests-FancyZones\UITests-FancyZones.csproj", "{FE38FC07-1C05-4B57-ADA3-2FE2F53C6A52}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITests-FancyZonesEditor", "src\modules\fancyzones\UITests-FancyZonesEditor\UITests-FancyZonesEditor.csproj", "{3A9A791E-94A9-49F8-8401-C11CE288D5FB}"
@@ -2470,6 +2474,30 @@ Global
{0014D652-901F-4456-8D65-06FC5F997FB0}.Release|x64.Build.0 = Release|x64
{0014D652-901F-4456-8D65-06FC5F997FB0}.Release|x86.ActiveCfg = Release|Win32
{0014D652-901F-4456-8D65-06FC5F997FB0}.Release|x86.Build.0 = Release|Win32
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|ARM64.Build.0 = Debug|ARM64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|x64.ActiveCfg = Debug|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|x64.Build.0 = Debug|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|x86.ActiveCfg = Debug|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Debug|x86.Build.0 = Debug|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|ARM64.ActiveCfg = Release|ARM64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|ARM64.Build.0 = Release|ARM64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|x64.ActiveCfg = Release|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|x64.Build.0 = Release|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|x86.ActiveCfg = Release|x64
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA}.Release|x86.Build.0 = Release|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|ARM64.Build.0 = Debug|ARM64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|x64.ActiveCfg = Debug|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|x64.Build.0 = Debug|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|x86.ActiveCfg = Debug|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Debug|x86.Build.0 = Debug|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|ARM64.ActiveCfg = Release|ARM64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|ARM64.Build.0 = Release|ARM64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x64.ActiveCfg = Release|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x64.Build.0 = Release|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x86.ActiveCfg = Release|x64
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F}.Release|x86.Build.0 = Release|x64
{FE38FC07-1C05-4B57-ADA3-2FE2F53C6A52}.Debug|ARM64.ActiveCfg = Debug|ARM64
{FE38FC07-1C05-4B57-ADA3-2FE2F53C6A52}.Debug|ARM64.Build.0 = Debug|ARM64
{FE38FC07-1C05-4B57-ADA3-2FE2F53C6A52}.Debug|x64.ActiveCfg = Debug|x64
@@ -2701,6 +2729,8 @@ Global
{3940AD4D-F748-4BE4-9083-85769CD553EF} = {2F305555-C296-497E-AC20-5FA1B237996A}
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38} = {2F305555-C296-497E-AC20-5FA1B237996A}
{0014D652-901F-4456-8D65-06FC5F997FB0} = {4C0D0746-BE5B-49EE-BD5D-A7811628AE8B}
+ {799A50D8-DE89-4ED1-8FF8-AD5A9ED8C0CA} = {AB82E5DD-C32D-4F28-9746-2C780846188E}
+ {9D52FD25-EF90-4F9A-A015-91EFC5DAF54F} = {AB82E5DD-C32D-4F28-9746-2C780846188E}
{FE38FC07-1C05-4B57-ADA3-2FE2F53C6A52} = {D1D6BC88-09AE-4FB4-AD24-5DED46A791DD}
{3A9A791E-94A9-49F8-8401-C11CE288D5FB} = {D1D6BC88-09AE-4FB4-AD24-5DED46A791DD}
EndGlobalSection
diff --git a/doc/devdocs/readme.md b/doc/devdocs/readme.md
index 42e5b63e8d..fb0a7719f5 100644
--- a/doc/devdocs/readme.md
+++ b/doc/devdocs/readme.md
@@ -164,7 +164,7 @@ The definition of the interface used by the [`runner`](/src/runner) to manage th
### [`Common`](common.md)
-The common lib, as the name suggests, contains code shared by multiple PowerToys components and modules, e.g. [json parsing](/src/common/json.h) and [IPC primitives](/src/common/two_way_pipe_message_ipc.h).
+The common lib, as the name suggests, contains code shared by multiple PowerToys components and modules, e.g. [json parsing](/src/common/utils/json.h) and [IPC primitives](/src/common/interop/two_way_pipe_message_ipc.h).
### [`Settings`](settingsv2/)
diff --git a/installer/PowerToysSetupCustomActions/CustomAction.cpp b/installer/PowerToysSetupCustomActions/CustomAction.cpp
index 290df09898..a24713b5ac 100644
--- a/installer/PowerToysSetupCustomActions/CustomAction.cpp
+++ b/installer/PowerToysSetupCustomActions/CustomAction.cpp
@@ -952,7 +952,7 @@ UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
try
{
// Packages to unregister
- const std::vector packagesToRemoveDisplayName{ { L"PowerRenameContextMenu" }, { L"ImageResizerContextMenu" } };
+ const std::vector packagesToRemoveDisplayName{ { L"PowerRenameContextMenu" }, { L"ImageResizerContextMenu" }, { L"FileLocksmithContextMenu" } };
PackageManager packageManager;
diff --git a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj
index 81235042b4..0bc8deb1f5 100644
--- a/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj
+++ b/installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj
@@ -1,6 +1,6 @@
-
+
{32f3882b-f2d6-4586-b5ed-11e39e522bd3}
@@ -164,13 +164,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/installer/PowerToysSetupCustomActions/packages.config b/installer/PowerToysSetupCustomActions/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/installer/PowerToysSetupCustomActions/packages.config
+++ b/installer/PowerToysSetupCustomActions/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/ActionRunner/actionRunner.vcxproj b/src/ActionRunner/actionRunner.vcxproj
index 8809611842..cc41616bba 100644
--- a/src/ActionRunner/actionRunner.vcxproj
+++ b/src/ActionRunner/actionRunner.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -61,15 +61,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/ActionRunner/packages.config b/src/ActionRunner/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/ActionRunner/packages.config
+++ b/src/ActionRunner/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/Update/PowerToys.Update.vcxproj b/src/Update/PowerToys.Update.vcxproj
index 914732926c..172a7027a6 100644
--- a/src/Update/PowerToys.Update.vcxproj
+++ b/src/Update/PowerToys.Update.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -67,15 +67,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/Update/packages.config b/src/Update/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/Update/packages.config
+++ b/src/Update/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js b/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js
index 3a35b9be12..3e092ffa04 100644
--- a/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js
+++ b/src/common/FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js
@@ -7,10 +7,11 @@ export async function registerAdditionalLanguages(monaco){
await languageDefinitions();
registerAdditionalLanguage("cppExt", [".ino", ".pde"], "cpp", monaco)
registerAdditionalLanguage("xmlExt", [".wsdl", ".csproj", ".vcxproj", ".vbproj", ".fsproj"], "xml", monaco)
- registerAdditionalLanguage("txtExt", [".sln", ".log", ".vsconfig"], "txt", monaco)
+ registerAdditionalLanguage("txtExt", [".sln", ".log", ".vsconfig", ".env"], "txt", monaco)
registerAdditionalLanguage("razorExt", [".razor"], "razor", monaco)
registerAdditionalLanguage("vbExt", [".vbs"], "vb", monaco)
registerAdditionalLanguage("iniExt", [".inf", ".gitconfig", ".gitattributes", ".editorconfig"], "ini", monaco)
+ registerAdditionalLanguage("shellExt", [".ksh", ".zsh", ".bsh"], "shell", monaco)
registerAdditionalNewLanguage("reg", [".reg"], regDefinition(), monaco)
registerAdditionalNewLanguage("gitignore", [".gitignore"], gitignoreDefinition(), monaco)
}
@@ -37,6 +38,10 @@ async function languageDefinitions() {
var moduleExports = (() => { var t = Object.defineProperty; var i = Object.getOwnPropertyDescriptor; var r = Object.getOwnPropertyNames; var g = Object.prototype.hasOwnProperty; var c = (n, e) => { for (var s in e) t(n, s, { get: e[s], enumerable: !0 }) }, l = (n, e, s, a) => { if (e && typeof e == "object" || typeof e == "function") for (let o of r(e)) !g.call(n, o) && o !== s && t(n, o, { get: () => e[o], enumerable: !(a = i(e, o)) || a.enumerable }); return n }; var p = n => l(t({}, "__esModule", { value: !0 }), n); var f = {}; c(f, { conf: () => u, language: () => m }); var u = { comments: { lineComment: "#" }, brackets: [["{", "}"], ["[", "]"], ["(", ")"]], autoClosingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }], surroundingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }] }, m = { defaultToken: "", tokenPostfix: ".ini", escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, tokenizer: { root: [[/^\[[^\]]*\]/, "metatag"], [/(^\w+)(\s*)(\=)/, ["key", "", "delimiter"]], { include: "@whitespace" }, [/\d+/, "number"], [/"([^"\\]|\\.)*$/, "string.invalid"], [/'([^'\\]|\\.)*$/, "string.invalid"], [/"/, "string", '@string."'], [/'/, "string", "@string.'"]], whitespace: [[/[ \t\r\n]+/, ""], [/^\s*[#;].*$/, "comment"]], string: [[/[^\\"']+/, "string"], [/@escapes/, "string.escape"], [/\\./, "string.escape.invalid"], [/["']/, { cases: { "$#==$S2": { token: "string", next: "@pop" }, "@default": "string" } }]] } }; return p(f); })();
return moduleExports;
});
+ define("vs/basic-languages/shell/shell", ["require","require"],(require)=>{
+ var moduleExports = (() => { var a = Object.defineProperty; var s = Object.getOwnPropertyDescriptor; var n = Object.getOwnPropertyNames; var l = Object.prototype.hasOwnProperty; var c = (r, e) => { for (var i in e) a(r, i, { get: e[i], enumerable: !0 }) }, d = (r, e, i, o) => { if (e && typeof e == "object" || typeof e == "function") for (let t of n(e)) !l.call(r, t) && t !== i && a(r, t, { get: () => e[t], enumerable: !(o = s(e, t)) || o.enumerable }); return r }; var p = r => d(a({}, "__esModule", { value: !0 }), r); var g = {}; c(g, { conf: () => m, language: () => u }); var m = { comments: { lineComment: "#" }, brackets: [["{", "}"], ["[", "]"], ["(", ")"]], autoClosingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }, { open: "`", close: "`" }], surroundingPairs: [{ open: "{", close: "}" }, { open: "[", close: "]" }, { open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }, { open: "`", close: "`" }] }, u = { defaultToken: "", ignoreCase: !0, tokenPostfix: ".shell", brackets: [{ token: "delimiter.bracket", open: "{", close: "}" }, { token: "delimiter.parenthesis", open: "(", close: ")" }, { token: "delimiter.square", open: "[", close: "]" }], keywords: ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi", "fin", "fil", "done", "exit", "set", "unset", "export", "function"], builtins: ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear", "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall", "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "node", "npm", "ping", "ps", "restart", "rm", "rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop", "su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write", "yes", "zsh"], startingWithDash: /\-+\w+/, identifiersWithDashes: /[a-zA-Z]\w+(?:@startingWithDash)+/, symbols: /[=>
-
+
true
true
@@ -118,13 +118,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/GPOWrapper/packages.config b/src/common/GPOWrapper/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/GPOWrapper/packages.config
+++ b/src/common/GPOWrapper/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/SettingsAPI/SettingsAPI.vcxproj b/src/common/SettingsAPI/SettingsAPI.vcxproj
index c8a06a1a9e..bf2eaec6dc 100644
--- a/src/common/SettingsAPI/SettingsAPI.vcxproj
+++ b/src/common/SettingsAPI/SettingsAPI.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
@@ -54,15 +54,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/SettingsAPI/packages.config b/src/common/SettingsAPI/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/SettingsAPI/packages.config
+++ b/src/common/SettingsAPI/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/Themes/Themes.vcxproj b/src/common/Themes/Themes.vcxproj
index c60dde82a7..f9772c874f 100644
--- a/src/common/Themes/Themes.vcxproj
+++ b/src/common/Themes/Themes.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{98537082-0FDB-40DE-ABD8-0DC5A4269BAB}
@@ -46,13 +46,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/Themes/packages.config b/src/common/Themes/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/Themes/packages.config
+++ b/src/common/Themes/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/UnitTests-CommonLib/UnitTests-CommonLib.vcxproj b/src/common/UnitTests-CommonLib/UnitTests-CommonLib.vcxproj
index f3dd518759..aff6610d66 100644
--- a/src/common/UnitTests-CommonLib/UnitTests-CommonLib.vcxproj
+++ b/src/common/UnitTests-CommonLib/UnitTests-CommonLib.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{1A066C63-64B3-45F8-92FE-664E1CCE8077}
@@ -57,13 +57,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/UnitTests-CommonLib/packages.config b/src/common/UnitTests-CommonLib/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/UnitTests-CommonLib/packages.config
+++ b/src/common/UnitTests-CommonLib/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/logger/logger.vcxproj b/src/common/logger/logger.vcxproj
index f4915e78e3..49efbd6f86 100644
--- a/src/common/logger/logger.vcxproj
+++ b/src/common/logger/logger.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -83,13 +83,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/logger/packages.config b/src/common/logger/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/logger/packages.config
+++ b/src/common/logger/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivator/BackgroundActivator.vcxproj b/src/common/notifications/BackgroundActivator/BackgroundActivator.vcxproj
index 9b4443c380..077333a664 100644
--- a/src/common/notifications/BackgroundActivator/BackgroundActivator.vcxproj
+++ b/src/common/notifications/BackgroundActivator/BackgroundActivator.vcxproj
@@ -1,6 +1,6 @@
-
+
true
true
@@ -96,13 +96,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivator/packages.config b/src/common/notifications/BackgroundActivator/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/notifications/BackgroundActivator/packages.config
+++ b/src/common/notifications/BackgroundActivator/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivatorDLL/BackgroundActivatorDLL.vcxproj b/src/common/notifications/BackgroundActivatorDLL/BackgroundActivatorDLL.vcxproj
index 394fd21d9b..3a96d7d46f 100644
--- a/src/common/notifications/BackgroundActivatorDLL/BackgroundActivatorDLL.vcxproj
+++ b/src/common/notifications/BackgroundActivatorDLL/BackgroundActivatorDLL.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{031AC72E-FA28-4AB7-B690-6F7B9C28AA73}
@@ -64,7 +64,7 @@
-
+
@@ -81,7 +81,7 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/notifications/BackgroundActivatorDLL/packages.config b/src/common/notifications/BackgroundActivatorDLL/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/common/notifications/BackgroundActivatorDLL/packages.config
+++ b/src/common/notifications/BackgroundActivatorDLL/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/common/notifications/notifications.vcxproj b/src/common/notifications/notifications.vcxproj
index c0438616ad..9ff8830793 100644
--- a/src/common/notifications/notifications.vcxproj
+++ b/src/common/notifications/notifications.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}
@@ -43,15 +43,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/common/notifications/packages.config b/src/common/notifications/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/common/notifications/packages.config
+++ b/src/common/notifications/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/common/updating/packages.config b/src/common/updating/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/common/updating/packages.config
+++ b/src/common/updating/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/common/updating/updating.vcxproj b/src/common/updating/updating.vcxproj
index dfd2817d83..48c3d5d483 100644
--- a/src/common/updating/updating.vcxproj
+++ b/src/common/updating/updating.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{17DA04DF-E393-4397-9CF0-84DABE11032E}
@@ -57,15 +57,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj
index fabdbc9c25..ebaed7e24f 100644
--- a/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj
+++ b/src/modules/CropAndLock/CropAndLock/CropAndLock.vcxproj
@@ -1,6 +1,6 @@
-
+
true
true
@@ -122,6 +122,7 @@
+
@@ -154,7 +155,7 @@
-
+
@@ -162,8 +163,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/CropAndLock/CropAndLock/DispatcherQueue.desktop.interop.h b/src/modules/CropAndLock/CropAndLock/DispatcherQueue.desktop.interop.h
new file mode 100644
index 0000000000..2991b438a4
--- /dev/null
+++ b/src/modules/CropAndLock/CropAndLock/DispatcherQueue.desktop.interop.h
@@ -0,0 +1,51 @@
+#pragma once
+#include
+#include
+#include
+
+// This file is added as a workaround for: https://github.com/microsoft/cppwinrt/issues/1391
+// robmikh.common needs to be updated to support newer versions of C++/WinRT https://github.com/robmikh/robmikh.common/issues/2
+// Applying workaround from https://github.com/robmikh/Win32CaptureSample/commit/fc758e343ca886795b05af5003d9a3bb85ff4da2
+
+namespace robmikh::common::desktop
+{
+ namespace impl
+ {
+ inline void ShutdownAndThenPostQuitMessage(winrt::Windows::System::DispatcherQueueController const& controller, int exitCode)
+ {
+ auto action = controller.ShutdownQueueAsync();
+ action.Completed([exitCode](auto&&, auto&&)
+ {
+ PostQuitMessage(exitCode);
+ });
+ }
+ }
+
+ inline auto CreateDispatcherQueueControllerForCurrentThread()
+ {
+ namespace abi = ABI::Windows::System;
+
+ DispatcherQueueOptions options
+ {
+ sizeof(DispatcherQueueOptions),
+ DQTYPE_THREAD_CURRENT,
+ DQTAT_COM_NONE
+ };
+
+ winrt::Windows::System::DispatcherQueueController controller{ nullptr };
+ winrt::check_hresult(CreateDispatcherQueueController(options, reinterpret_cast(winrt::put_abi(controller))));
+ return controller;
+ }
+
+ inline int ShutdownDispatcherQueueControllerAndWait(winrt::Windows::System::DispatcherQueueController const& controller, int exitCode)
+ {
+ impl::ShutdownAndThenPostQuitMessage(controller, exitCode);
+ MSG msg = {};
+ while (GetMessageW(&msg, nullptr, 0, 0))
+ {
+ TranslateMessage(&msg);
+ DispatchMessageW(&msg);
+ }
+ return static_cast(msg.wParam);
+ }
+}
diff --git a/src/modules/CropAndLock/CropAndLock/packages.config b/src/modules/CropAndLock/CropAndLock/packages.config
index fe9625b6da..f53ff9a92d 100644
--- a/src/modules/CropAndLock/CropAndLock/packages.config
+++ b/src/modules/CropAndLock/CropAndLock/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/modules/CropAndLock/CropAndLock/pch.h b/src/modules/CropAndLock/CropAndLock/pch.h
index fe9e5e635e..720033cbca 100644
--- a/src/modules/CropAndLock/CropAndLock/pch.h
+++ b/src/modules/CropAndLock/CropAndLock/pch.h
@@ -26,6 +26,7 @@
// WIL
#include
+#include
// DirectX
#include
@@ -53,7 +54,10 @@
#include
#include
#include
-#include
+// robmikh.common needs to be updated to support newer versions of C++/WinRT https://github.com/robmikh/robmikh.common/issues/2
+// Applying workaround from https://github.com/robmikh/Win32CaptureSample/commit/fc758e343ca886795b05af5003d9a3bb85ff4da2
+// #include
+#include "DispatcherQueue.desktop.interop.h"
#include
#include
#include
diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj b/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj
index 6c44320941..6aa29bfe95 100644
--- a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj
+++ b/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -101,7 +101,7 @@
-
+
@@ -110,8 +110,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config b/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config
+++ b/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj
index 6bf3bb3b20..b332a8c8e4 100644
--- a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj
+++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj
@@ -1,5 +1,6 @@
+
@@ -76,6 +77,7 @@
+
@@ -107,5 +109,13 @@
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj.filters b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj.filters
index 14b6af8966..8ecdef4543 100644
--- a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj.filters
+++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/EnvironmentVariablesModuleInterface.vcxproj.filters
@@ -43,6 +43,7 @@
Resource Files
+
diff --git a/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/packages.config b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/packages.config
new file mode 100644
index 0000000000..09bfc449e2
--- /dev/null
+++ b/src/modules/EnvironmentVariables/EnvironmentVariablesModuleInterface/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/AppxManifest.xml b/src/modules/FileLocksmith/FileLocksmithContextMenu/AppxManifest.xml
new file mode 100644
index 0000000000..1fd5adf832
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/AppxManifest.xml
@@ -0,0 +1,56 @@
+
+
+
+
+ PowerToys FileLocksmith Context Menu
+ Microsoft
+ Assets\FileLocksmith\storelogo.png
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/FileLocksmith.ico b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/FileLocksmith.ico
new file mode 100644
index 0000000000..629b119069
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/FileLocksmith.ico differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/LargeTile.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/LargeTile.png
new file mode 100644
index 0000000000..f8a9f8f193
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/LargeTile.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SmallTile.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SmallTile.png
new file mode 100644
index 0000000000..8773d6366a
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SmallTile.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SplashScreen.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SplashScreen.png
new file mode 100644
index 0000000000..9d421b9526
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/SplashScreen.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square150x150Logo.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square150x150Logo.png
new file mode 100644
index 0000000000..f8a9f8f193
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square150x150Logo.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square44x44Logo.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square44x44Logo.png
new file mode 100644
index 0000000000..8773d6366a
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Square44x44Logo.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Wide310x150Logo.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Wide310x150Logo.png
new file mode 100644
index 0000000000..266b41d25b
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/Wide310x150Logo.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/storelogo.png b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/storelogo.png
new file mode 100644
index 0000000000..dfbca016bc
Binary files /dev/null and b/src/modules/FileLocksmith/FileLocksmithContextMenu/Assets/FileLocksmith/storelogo.png differ
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.base.rc b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.base.rc
new file mode 100644
index 0000000000..bc168f0621
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.base.rc
@@ -0,0 +1,50 @@
+#include
+#include "Generated Files/resource.h"
+#include "../../../common/version/version.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+#include "winres.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION FILE_VERSION
+ PRODUCTVERSION PRODUCT_VERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", COMPANY_NAME
+ VALUE "FileDescription", FILE_DESCRIPTION
+ VALUE "FileVersion", FILE_VERSION_STRING
+ VALUE "InternalName", INTERNAL_NAME
+ VALUE "LegalCopyright", COPYRIGHT_NOTE
+ VALUE "OriginalFilename", ORIGINAL_FILENAME
+ VALUE "ProductName", PRODUCT_NAME
+ VALUE "ProductVersion", PRODUCT_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj
new file mode 100644
index 0000000000..f1d35839c0
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+ 17.0
+ Win32Proj
+ {799a50d8-de89-4ed1-8ff8-ad5a9ed8c0ca}
+ FileLocksmithContextMenu
+
+
+
+ PowerToys.FileLocksmithContextMenu
+
+ $(SolutionDir)$(Platform)\$(Configuration)\TemporaryBuild\obj\$(ProjectName)\
+ ..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\
+
+
+ DynamicLibrary
+ true
+ v143
+ Unicode
+
+
+ DynamicLibrary
+ false
+ v143
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ true
+ WIN32;_DEBUG;FILELOCKSMITHCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ Use
+ ..;../../..;
+
+
+ Windows
+ true
+ false
+ runtimeobject.lib;%(AdditionalDependencies)
+ Source.def
+
+
+ del $(OutDir)\FileLocksmithContextMenuPackage.msix /q
+MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv
+
+
+
+
+ Level3
+ true
+ true
+ true
+ WIN32;NDEBUG;FILELOCKSMITHCONTEXTMENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ true
+ Use
+ ..;../../..;
+
+
+ Windows
+ true
+ true
+ true
+ false
+ runtimeobject.lib;%(AdditionalDependencies)
+ Source.def
+
+
+ del $(OutDir)\FileLocksmithContextMenuPackage.msix /q
+MakeAppx.exe pack /d . /p $(OutDir)FileLocksmithContextMenuPackage.msix /nv
+
+
+
+
+
+
+
+
+
+
+ Create
+
+
+
+
+
+
+
+
+
+
+
+ {6955446d-23f7-4023-9bb3-8657f904af99}
+
+
+ {cc6e41ac-8174-4e8a-8d22-85dd7f4851df}
+
+
+ {9d52fd25-ef90-4f9a-a015-91efc5daf54f}
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters
new file mode 100644
index 0000000000..4e95cc85ee
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/FileLocksmithContextMenu.vcxproj.filters
@@ -0,0 +1,46 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Resource Files
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Resources.resx b/src/modules/FileLocksmith/FileLocksmithContextMenu/Resources.resx
new file mode 100644
index 0000000000..beb863e7e8
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/Resources.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Unlock with File Locksmith
+ This text will be shown when the user opens the context menu (right clicks) a file. File Locksmith is the product name, do not loc.
+
+
+ File Locksmith
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/Source.def b/src/modules/FileLocksmith/FileLocksmithContextMenu/Source.def
new file mode 100644
index 0000000000..1ffdadd7a1
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/Source.def
@@ -0,0 +1,5 @@
+LIBRARY
+EXPORTS
+DllCanUnloadNow PRIVATE
+DllGetClassObject PRIVATE
+DllGetActivationFactory PRIVATE
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp b/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp
new file mode 100644
index 0000000000..1abf0e947b
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/dllmain.cpp
@@ -0,0 +1,189 @@
+// dllmain.cpp : Defines the entry point for the DLL application.
+#include "pch.h"
+
+#include
+#include
+#include
+
+#include "FileLocksmithLib/IPC.h"
+#include "FileLocksmithLib/Settings.h"
+#include "FileLocksmithLib/Trace.h"
+
+#include
+#include
+#include
+#include
+
+#include "Generated Files/resource.h"
+
+
+using namespace Microsoft::WRL;
+
+HINSTANCE g_hInst = 0;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ g_hInst = hModule;
+ Trace::RegisterProvider();
+ break;
+ case DLL_PROCESS_DETACH:
+ Trace::UnregisterProvider();
+ break;
+ }
+ return TRUE;
+}
+
+class __declspec(uuid("AAF1E27D-4976-49C2-8895-AAFA743C0A7E")) FileLocksmithContextMenuCommand final : public RuntimeClass, IExplorerCommand, IObjectWithSite>
+{
+public:
+ virtual const wchar_t* Title() { return L"File Locksmith"; }
+ virtual const EXPCMDFLAGS Flags() { return ECF_DEFAULT; }
+ virtual const EXPCMDSTATE State(_In_opt_ IShellItemArray* selection) { return ECS_ENABLED; }
+
+ // IExplorerCommand
+ IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name)
+ {
+ return SHStrDup(context_menu_caption.c_str(), name);
+ }
+
+ IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon)
+ {
+ std::wstring iconResourcePath = get_module_folderpath(g_hInst);
+ iconResourcePath += L"\\Assets\\FileLocksmith\\";
+ iconResourcePath += L"FileLocksmith.ico";
+ return SHStrDup(iconResourcePath.c_str(), icon);
+ }
+
+ IFACEMETHODIMP GetToolTip(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* infoTip)
+ {
+ *infoTip = nullptr;
+ return E_NOTIMPL;
+ }
+
+ IFACEMETHODIMP GetCanonicalName(_Out_ GUID* guidCommandName)
+ {
+ *guidCommandName = __uuidof(this);
+ return S_OK;
+ }
+
+ IFACEMETHODIMP GetState(_In_opt_ IShellItemArray* selection, _In_ BOOL okToBeSlow, _Out_ EXPCMDSTATE* cmdState)
+ {
+ *cmdState = ECS_ENABLED;
+
+ if (!FileLocksmithSettingsInstance().GetEnabled())
+ {
+ *cmdState = ECS_HIDDEN;
+ }
+
+ if (FileLocksmithSettingsInstance().GetShowInExtendedContextMenu())
+ {
+ *cmdState = ECS_HIDDEN;
+ }
+
+ return S_OK;
+ }
+
+ IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept
+ {
+ Trace::Invoked();
+ ipc::Writer writer;
+
+ if (selection == nullptr)
+ {
+ return S_OK;
+ }
+
+ if (HRESULT result = writer.start(); FAILED(result))
+ {
+ Trace::InvokedRet(result);
+ return result;
+ }
+
+ std::wstring path = get_module_folderpath(g_hInst);
+ path = path + L"\\PowerToys.FileLocksmithUI.exe";
+
+ HRESULT result;
+
+ if (!RunNonElevatedEx(path.c_str(), L"", get_module_folderpath(g_hInst)))
+ {
+ result = E_FAIL;
+ Trace::InvokedRet(result);
+ return result;
+ }
+
+ DWORD num_items;
+ selection->GetCount(&num_items);
+
+ for (DWORD i = 0; i < num_items; i++)
+ {
+ IShellItem* item;
+ result = selection->GetItemAt(i, &item);
+ if (SUCCEEDED(result))
+ {
+ LPWSTR file_path;
+ result = item->GetDisplayName(SIGDN_FILESYSPATH, &file_path);
+ if (SUCCEEDED(result))
+ {
+ // TODO Aggregate items and send to UI
+ writer.add_path(file_path);
+ CoTaskMemFree(file_path);
+ }
+
+ item->Release();
+ }
+ }
+
+ Trace::InvokedRet(S_OK);
+ return S_OK;
+ }
+
+ IFACEMETHODIMP GetFlags(_Out_ EXPCMDFLAGS* flags)
+ {
+ *flags = Flags();
+ return S_OK;
+ }
+ IFACEMETHODIMP EnumSubCommands(_COM_Outptr_ IEnumExplorerCommand** enumCommands)
+ {
+ *enumCommands = nullptr;
+ return E_NOTIMPL;
+ }
+
+ // IObjectWithSite
+ IFACEMETHODIMP SetSite(_In_ IUnknown* site) noexcept
+ {
+ m_site = site;
+ return S_OK;
+ }
+ IFACEMETHODIMP GetSite(_In_ REFIID riid, _COM_Outptr_ void** site) noexcept { return m_site.CopyTo(riid, site); }
+
+protected:
+ ComPtr m_site;
+
+private:
+ std::wstring context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_FILE_LOCKSMITH_CONTEXT_MENU_ENTRY, L"Unlock with File Locksmith");
+};
+
+CoCreatableClass(FileLocksmithContextMenuCommand)
+CoCreatableClassWrlCreatorMapInclude(FileLocksmithContextMenuCommand)
+
+
+STDAPI DllGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IActivationFactory** factory)
+{
+ return Module::GetModule().GetActivationFactory(activatableClassId, factory);
+}
+
+STDAPI DllCanUnloadNow()
+{
+ return Module::GetModule().GetObjectCount() == 0 ? S_OK : S_FALSE;
+}
+
+STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_ void** instance)
+{
+ return Module::GetModule().GetClassObject(rclsid, riid, instance);
+}
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/framework.h b/src/modules/FileLocksmith/FileLocksmithContextMenu/framework.h
new file mode 100644
index 0000000000..54b83e94fd
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/framework.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files
+#include
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/packages.config b/src/modules/FileLocksmith/FileLocksmithContextMenu/packages.config
new file mode 100644
index 0000000000..6199e2345c
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.cpp b/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.cpp
new file mode 100644
index 0000000000..64b7eef6d6
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.cpp
@@ -0,0 +1,5 @@
+// pch.cpp: source file corresponding to the pre-compiled header
+
+#include "pch.h"
+
+// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.h b/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.h
new file mode 100644
index 0000000000..885d5d62e4
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/pch.h
@@ -0,0 +1,13 @@
+// pch.h: This is a precompiled header file.
+// Files listed below are compiled only once, improving build performance for future builds.
+// This also affects IntelliSense performance, including code completion and many code browsing features.
+// However, files listed here are ALL re-compiled if any one of them is updated between builds.
+// Do not add files here that you will be updating frequently as this negates the performance advantage.
+
+#ifndef PCH_H
+#define PCH_H
+
+// add headers that you want to pre-compile here
+#include "framework.h"
+
+#endif //PCH_H
diff --git a/src/modules/FileLocksmith/FileLocksmithContextMenu/resource.base.h b/src/modules/FileLocksmith/FileLocksmithContextMenu/resource.base.h
new file mode 100644
index 0000000000..0f984b9721
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithContextMenu/resource.base.h
@@ -0,0 +1,13 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by ImageResizerContextMenu.rc
+
+//////////////////////////////
+// Non-localizable
+
+#define FILE_DESCRIPTION "PowerToys File Locksmith Context Menu"
+#define INTERNAL_NAME "PowerToys.FileLocksmithContextMenu.dll"
+#define ORIGINAL_FILENAME "PowerToys.FileLocksmithContextMenu.dll"
+
+// Non-localizable
+//////////////////////////////
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp
index fabd02d951..e0eee3d781 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp
+++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.cpp
@@ -1,12 +1,13 @@
#include "pch.h"
#include "ExplorerCommand.h"
-#include "Constants.h"
-#include "Settings.h"
#include "dllmain.h"
-#include "Trace.h"
#include "Generated Files/resource.h"
+#include "FileLocksmithLib/Constants.h"
+#include "FileLocksmithLib/Settings.h"
+#include "FileLocksmithLib/Trace.h"
+
#include
#include
#include
@@ -284,4 +285,4 @@ HRESULT ExplorerCommand::LaunchUI(CMINVOKECOMMANDINFO* pici, ipc::Writer* writer
CloseHandle(processInformation.hThread);
return S_OK;
-}
+}
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h
index dda50f9949..d59f266157 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h
+++ b/src/modules/FileLocksmith/FileLocksmithExt/ExplorerCommand.h
@@ -2,7 +2,7 @@
#include "pch.h"
-#include "IPC.h"
+#include "FileLocksmithLib/IPC.h"
#define EXPLORER_COMMAND_UUID_STR "84d68575-e186-46ad-b0cb-baeb45ee29c0"
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj
index e9186c86a5..969658a40a 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj
+++ b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj
@@ -1,35 +1,9 @@
-
+
-
-
- Debug
- ARM64
-
-
- Debug
- Win32
-
-
- Release
- ARM64
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
16.0
Win32Proj
@@ -39,39 +13,13 @@
PowerToys.FileLocksmithExt
-
+
DynamicLibrary
true
v143
Unicode
-
- DynamicLibrary
- false
- v143
- true
- Unicode
-
-
- DynamicLibrary
- true
- v143
- Unicode
-
-
- DynamicLibrary
- true
- v143
- Unicode
-
-
- DynamicLibrary
- false
- v143
- true
- Unicode
-
-
+
DynamicLibrary
false
v143
@@ -83,33 +31,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
Level3
true
WIN32;_DEBUG;FILELOCKSMITHEXT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
true
Use
- ../../;../../../;%(AdditionalIncludeDirectories)
+ ..;../../;../../../;%(AdditionalIncludeDirectories)
Windows
@@ -118,7 +51,7 @@
dll.def
-
+
Level3
true
@@ -127,79 +60,7 @@
WIN32;NDEBUG;FILELOCKSMITHEXT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
true
Use
- ../../;../../../;%(AdditionalIncludeDirectories)
-
-
- Windows
- true
- true
- true
- false
- dll.def
-
-
-
-
- Level3
- true
- _DEBUG;FILELOCKSMITHEXT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- ../../;../../../;%(AdditionalIncludeDirectories)
-
-
- Windows
- true
- false
- dll.def
-
-
-
-
- Level3
- true
- _DEBUG;FILELOCKSMITHEXT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- ../../;../../../;%(AdditionalIncludeDirectories)
-
-
- Windows
- true
- false
- dll.def
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;FILELOCKSMITHLIB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- ../../;../../../;%(AdditionalIncludeDirectories)
-
-
- Windows
- true
- true
- true
- false
- dll.def
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;FILELOCKSMITHLIB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- true
- Use
- ../../;../../../;%(AdditionalIncludeDirectories)
+ ..;../../;../../../;%(AdditionalIncludeDirectories)
Windows
@@ -212,16 +73,11 @@
-
-
-
-
-
@@ -234,18 +90,10 @@
-
- Create
- Create
- Create
- Create
- Create
- Create
+ Create
-
-
@@ -260,17 +108,20 @@
{98537082-0fdb-40de-abd8-0dc5a4269bab}
+
+ {9d52fd25-ef90-4f9a-a015-91efc5daf54f}
+
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj.filters b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj.filters
index d0a249143f..c3b4f47ebc 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj.filters
+++ b/src/modules/FileLocksmith/FileLocksmithExt/FileLocksmithExt.vcxproj.filters
@@ -21,27 +21,12 @@
Header Files
-
- Header Files
-
Header Files
Header Files
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
@@ -59,15 +44,6 @@
Source Files
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp b/src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp
index 2c06bc403b..ee692603d2 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp
+++ b/src/modules/FileLocksmith/FileLocksmithExt/PowerToysModule.cpp
@@ -5,12 +5,15 @@
#include
#include
#include
+#include
+#include
#include
-#include "Constants.h"
+#include "FileLocksmithLib/Constants.h"
+#include "FileLocksmithLib/Settings.h"
+#include "FileLocksmithLib/Trace.h"
+
#include "dllmain.h"
-#include "Settings.h"
-#include "Trace.h"
#include "Generated Files/resource.h"
class FileLocksmithModule : public PowertoyModuleIface
@@ -74,6 +77,18 @@ public:
virtual void enable() override
{
Logger::info(L"File Locksmith enabled");
+
+ if (package::IsWin11OrGreater())
+ {
+ std::wstring path = get_module_folderpath(globals::instance);
+ std::wstring packageUri = path + L"\\FileLocksmithContextMenuPackage.msix";
+
+ if (!package::IsPackageRegistered(constants::nonlocalizable::ContextMenuPackageName))
+ {
+ package::RegisterSparsePackage(path, packageUri);
+ }
+ }
+
m_enabled = true;
save_settings();
}
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/dllmain.cpp b/src/modules/FileLocksmith/FileLocksmithExt/dllmain.cpp
index 934139da95..e2a5adcc25 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/dllmain.cpp
+++ b/src/modules/FileLocksmith/FileLocksmithExt/dllmain.cpp
@@ -5,7 +5,8 @@
#pragma comment(lib, "shlwapi")
#include "ClassFactory.h"
-#include "Trace.h"
+
+#include "FileLocksmithLib/Trace.h"
namespace globals
{
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/packages.config b/src/modules/FileLocksmith/FileLocksmithExt/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/packages.config
+++ b/src/modules/FileLocksmith/FileLocksmithExt/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Constants.h b/src/modules/FileLocksmith/FileLocksmithLib/Constants.h
similarity index 90%
rename from src/modules/FileLocksmith/FileLocksmithExt/Constants.h
rename to src/modules/FileLocksmith/FileLocksmithLib/Constants.h
index d6ac9c9b73..98a141831b 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/Constants.h
+++ b/src/modules/FileLocksmith/FileLocksmithLib/Constants.h
@@ -28,6 +28,9 @@ namespace constants::nonlocalizable
// Name of the file where the list of files to checked will be stored
constexpr WCHAR LastRunPath[] = L"\\last-run.log";
+
+ // Name of the tier 1 context menu package
+ constexpr WCHAR ContextMenuPackageName[] = L"FileLocksmithContextMenu";
}
// Macros, non-localizable
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.cpp b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.cpp
new file mode 100644
index 0000000000..aa0124ea70
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.cpp
@@ -0,0 +1,10 @@
+// FileLocksmithLib.cpp : Defines the functions for the static library.
+//
+
+#include "pch.h"
+#include "framework.h"
+
+// TODO: This is an example of a library function
+void fnFileLocksmithLib()
+{
+}
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj
new file mode 100644
index 0000000000..3e3ecc8756
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj
@@ -0,0 +1,86 @@
+
+
+
+ 17.0
+ Win32Proj
+ {9d52fd25-ef90-4f9a-a015-91efc5daf54f}
+ FileLocksmithLib
+ 10.0
+
+
+
+ StaticLibrary
+ true
+ v143
+ Unicode
+
+
+ StaticLibrary
+ false
+ v143
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ true
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ Use
+ ../../..;../..;
+
+
+
+
+ true
+
+
+
+
+ Level3
+ true
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ Use
+ ../../..;../..;
+
+
+
+
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj.filters b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj.filters
new file mode 100644
index 0000000000..8b223a619b
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/FileLocksmithLib.vcxproj.filters
@@ -0,0 +1,54 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/IPC.cpp b/src/modules/FileLocksmith/FileLocksmithLib/IPC.cpp
similarity index 100%
rename from src/modules/FileLocksmith/FileLocksmithExt/IPC.cpp
rename to src/modules/FileLocksmith/FileLocksmithLib/IPC.cpp
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/IPC.h b/src/modules/FileLocksmith/FileLocksmithLib/IPC.h
similarity index 93%
rename from src/modules/FileLocksmith/FileLocksmithExt/IPC.h
rename to src/modules/FileLocksmith/FileLocksmithLib/IPC.h
index 6013c0fa4d..44ae5f451c 100644
--- a/src/modules/FileLocksmith/FileLocksmithExt/IPC.h
+++ b/src/modules/FileLocksmith/FileLocksmithLib/IPC.h
@@ -2,6 +2,8 @@
#include "pch.h"
+#include
+
namespace ipc
{
class Writer
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Settings.cpp b/src/modules/FileLocksmith/FileLocksmithLib/Settings.cpp
similarity index 100%
rename from src/modules/FileLocksmith/FileLocksmithExt/Settings.cpp
rename to src/modules/FileLocksmith/FileLocksmithLib/Settings.cpp
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Settings.h b/src/modules/FileLocksmith/FileLocksmithLib/Settings.h
similarity index 100%
rename from src/modules/FileLocksmith/FileLocksmithExt/Settings.h
rename to src/modules/FileLocksmith/FileLocksmithLib/Settings.h
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Trace.cpp b/src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp
similarity index 100%
rename from src/modules/FileLocksmith/FileLocksmithExt/Trace.cpp
rename to src/modules/FileLocksmith/FileLocksmithLib/Trace.cpp
diff --git a/src/modules/FileLocksmith/FileLocksmithExt/Trace.h b/src/modules/FileLocksmith/FileLocksmithLib/Trace.h
similarity index 100%
rename from src/modules/FileLocksmith/FileLocksmithExt/Trace.h
rename to src/modules/FileLocksmith/FileLocksmithLib/Trace.h
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/framework.h b/src/modules/FileLocksmith/FileLocksmithLib/framework.h
new file mode 100644
index 0000000000..71cd6b7eaa
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/framework.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include
+#include
+#include
+#include
+#include
+
+// C++ Standard library
+#include
+#include
+#include
+#include
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/pch.cpp b/src/modules/FileLocksmith/FileLocksmithLib/pch.cpp
new file mode 100644
index 0000000000..64b7eef6d6
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/pch.cpp
@@ -0,0 +1,5 @@
+// pch.cpp: source file corresponding to the pre-compiled header
+
+#include "pch.h"
+
+// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
diff --git a/src/modules/FileLocksmith/FileLocksmithLib/pch.h b/src/modules/FileLocksmith/FileLocksmithLib/pch.h
new file mode 100644
index 0000000000..885d5d62e4
--- /dev/null
+++ b/src/modules/FileLocksmith/FileLocksmithLib/pch.h
@@ -0,0 +1,13 @@
+// pch.h: This is a precompiled header file.
+// Files listed below are compiled only once, improving build performance for future builds.
+// This also affects IntelliSense performance, including code completion and many code browsing features.
+// However, files listed here are ALL re-compiled if any one of them is updated between builds.
+// Do not add files here that you will be updating frequently as this negates the performance advantage.
+
+#ifndef PCH_H
+#define PCH_H
+
+// add headers that you want to pre-compile here
+#include "framework.h"
+
+#endif //PCH_H
diff --git a/src/modules/FileLocksmith/FileLocksmithLibInterop/interop.cpp b/src/modules/FileLocksmith/FileLocksmithLibInterop/interop.cpp
index cc0fce4a79..e208adafcf 100644
--- a/src/modules/FileLocksmith/FileLocksmithLibInterop/interop.cpp
+++ b/src/modules/FileLocksmith/FileLocksmithLibInterop/interop.cpp
@@ -2,7 +2,7 @@
#include "FileLocksmith.h"
-#include "../FileLocksmithExt/Constants.h"
+#include "../FileLocksmithLib/Constants.h"
namespace FileLocksmith::Interop
{
diff --git a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml
index c7b9023cb8..8c5b744fb5 100644
--- a/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml
+++ b/src/modules/Hosts/Hosts/HostsXAML/Views/MainPage.xaml
@@ -76,9 +76,23 @@
-
+
@@ -153,8 +153,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/MeasureTool/MeasureToolCore/packages.config b/src/modules/MeasureTool/MeasureToolCore/packages.config
index 627512b778..43c18505d6 100644
--- a/src/modules/MeasureTool/MeasureToolCore/packages.config
+++ b/src/modules/MeasureTool/MeasureToolCore/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/src/modules/MeasureTool/MeasureToolModuleInterface/MeasureToolModuleInterface.vcxproj b/src/modules/MeasureTool/MeasureToolModuleInterface/MeasureToolModuleInterface.vcxproj
index 034db5680b..727520bc54 100644
--- a/src/modules/MeasureTool/MeasureToolModuleInterface/MeasureToolModuleInterface.vcxproj
+++ b/src/modules/MeasureTool/MeasureToolModuleInterface/MeasureToolModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{92C39820-9F84-4529-BC7D-22AAE514D63B}
@@ -82,13 +82,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MeasureTool/MeasureToolModuleInterface/packages.config b/src/modules/MeasureTool/MeasureToolModuleInterface/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/MeasureTool/MeasureToolModuleInterface/packages.config
+++ b/src/modules/MeasureTool/MeasureToolModuleInterface/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/FindMyMouse/FindMyMouse.vcxproj b/src/modules/MouseUtils/FindMyMouse/FindMyMouse.vcxproj
index 48a9333946..5b53ada1a7 100644
--- a/src/modules/MouseUtils/FindMyMouse/FindMyMouse.vcxproj
+++ b/src/modules/MouseUtils/FindMyMouse/FindMyMouse.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{e94fd11c-0591-456f-899f-efc0ca548336}
@@ -121,13 +121,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/FindMyMouse/packages.config b/src/modules/MouseUtils/FindMyMouse/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/MouseUtils/FindMyMouse/packages.config
+++ b/src/modules/MouseUtils/FindMyMouse/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MouseHighlighter/MouseHighlighter.vcxproj b/src/modules/MouseUtils/MouseHighlighter/MouseHighlighter.vcxproj
index a80e9e95d1..b5e3be202a 100644
--- a/src/modules/MouseUtils/MouseHighlighter/MouseHighlighter.vcxproj
+++ b/src/modules/MouseUtils/MouseHighlighter/MouseHighlighter.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{782a61be-9d85-4081-b35c-1ccc9dcc1e88}
@@ -119,13 +119,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MouseHighlighter/packages.config b/src/modules/MouseUtils/MouseHighlighter/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/MouseUtils/MouseHighlighter/packages.config
+++ b/src/modules/MouseUtils/MouseHighlighter/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MouseJump/MouseJump.vcxproj b/src/modules/MouseUtils/MouseJump/MouseJump.vcxproj
index bb0be49bd8..0cfc9bf811 100644
--- a/src/modules/MouseUtils/MouseJump/MouseJump.vcxproj
+++ b/src/modules/MouseUtils/MouseJump/MouseJump.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{8a08d663-4995-40e3-b42c-3f910625f284}
@@ -117,13 +117,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MouseJump/packages.config b/src/modules/MouseUtils/MouseJump/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/MouseUtils/MouseJump/packages.config
+++ b/src/modules/MouseUtils/MouseJump/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MousePointerCrosshairs/MousePointerCrosshairs.vcxproj b/src/modules/MouseUtils/MousePointerCrosshairs/MousePointerCrosshairs.vcxproj
index 5cb02f3617..0310019c50 100644
--- a/src/modules/MouseUtils/MousePointerCrosshairs/MousePointerCrosshairs.vcxproj
+++ b/src/modules/MouseUtils/MousePointerCrosshairs/MousePointerCrosshairs.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{eae14c0e-7a6b-45da-9080-a7d8c077ba6e}
@@ -119,13 +119,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MousePointerCrosshairs/packages.config b/src/modules/MouseUtils/MousePointerCrosshairs/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/MouseUtils/MousePointerCrosshairs/packages.config
+++ b/src/modules/MouseUtils/MousePointerCrosshairs/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/MouseWithoutBordersModuleInterface.vcxproj b/src/modules/MouseWithoutBorders/ModuleInterface/MouseWithoutBordersModuleInterface.vcxproj
index 276c653855..91f3fd9585 100644
--- a/src/modules/MouseWithoutBorders/ModuleInterface/MouseWithoutBordersModuleInterface.vcxproj
+++ b/src/modules/MouseWithoutBorders/ModuleInterface/MouseWithoutBordersModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{2833C9C6-AB32-4048-A5C7-A70898337B57}
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj
index 4f53db3f31..c270fbd640 100644
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj
+++ b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -73,13 +73,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config b/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config
+++ b/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj
index 144e8cdf7a..b1be2d5c82 100644
--- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj
+++ b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -130,13 +130,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/ShortcutGuide/ShortcutGuide/packages.config b/src/modules/ShortcutGuide/ShortcutGuide/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/ShortcutGuide/ShortcutGuide/packages.config
+++ b/src/modules/ShortcutGuide/ShortcutGuide/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj
index 1621a8a460..22853eb9df 100644
--- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj
+++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -78,13 +78,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/packages.config b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/packages.config
+++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj
index 39233d7ed5..581326eaf5 100644
--- a/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj
+++ b/src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.vcxproj
@@ -2,7 +2,7 @@
-
+
@@ -191,15 +191,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/alwaysontop/AlwaysOnTop/packages.config b/src/modules/alwaysontop/AlwaysOnTop/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/alwaysontop/AlwaysOnTop/packages.config
+++ b/src/modules/alwaysontop/AlwaysOnTop/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/AlwaysOnTopModuleInterface.vcxproj b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/AlwaysOnTopModuleInterface.vcxproj
index ad8e3e138b..0e6ebada69 100644
--- a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/AlwaysOnTopModuleInterface.vcxproj
+++ b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/AlwaysOnTopModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{48A0A19E-A0BE-4256-ACF8-CC3B80291AF9}
@@ -67,7 +67,7 @@
-
+
@@ -75,8 +75,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/packages.config b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/alwaysontop/AlwaysOnTopModuleInterface/packages.config
+++ b/src/modules/alwaysontop/AlwaysOnTopModuleInterface/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/awake/AwakeModuleInterface/AwakeModuleInterface.vcxproj b/src/modules/awake/AwakeModuleInterface/AwakeModuleInterface.vcxproj
index 6e4556e7f6..3aba624af3 100644
--- a/src/modules/awake/AwakeModuleInterface/AwakeModuleInterface.vcxproj
+++ b/src/modules/awake/AwakeModuleInterface/AwakeModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{5e7360a8-d048-4ed3-8f09-0bfd64c5529a}
@@ -66,15 +66,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/awake/AwakeModuleInterface/packages.config b/src/modules/awake/AwakeModuleInterface/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/awake/AwakeModuleInterface/packages.config
+++ b/src/modules/awake/AwakeModuleInterface/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj
index a7fd427c2a..c0fa3ec63e 100644
--- a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj
+++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
+
17.0
Win32Proj
@@ -100,8 +100,19 @@
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj.filters b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj.filters
index 1834d3ae88..6fc7e0e5b4 100644
--- a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj.filters
+++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/CmdNotFoundModuleInterface.vcxproj.filters
@@ -1,6 +1,5 @@
-
+
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
@@ -42,4 +41,7 @@
Resource Files
+
+
+
\ No newline at end of file
diff --git a/src/modules/cmdNotFound/CmdNotFoundModuleInterface/packages.config b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/packages.config
new file mode 100644
index 0000000000..09bfc449e2
--- /dev/null
+++ b/src/modules/cmdNotFound/CmdNotFoundModuleInterface/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj
index 84e4d5cc41..99042906fe 100644
--- a/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj
+++ b/src/modules/colorPicker/ColorPicker/ColorPicker.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -73,13 +73,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/colorPicker/ColorPicker/packages.config b/src/modules/colorPicker/ColorPicker/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/colorPicker/ColorPicker/packages.config
+++ b/src/modules/colorPicker/ColorPicker/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/colorPicker/ColorPickerUI/App.xaml b/src/modules/colorPicker/ColorPickerUI/App.xaml
index 9824ba1f50..a6e26f31e2 100644
--- a/src/modules/colorPicker/ColorPickerUI/App.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/App.xaml
@@ -1,16 +1,16 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/src/modules/colorPicker/ColorPickerUI/App.xaml.cs b/src/modules/colorPicker/ColorPickerUI/App.xaml.cs
index 9097ec9c29..ee74c35199 100644
--- a/src/modules/colorPicker/ColorPickerUI/App.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/App.xaml.cs
@@ -7,7 +7,6 @@ using System.ComponentModel.Composition;
using System.Threading;
using System.Windows;
using ColorPicker.Mouse;
-using Common.UI;
using ManagedCommon;
namespace ColorPickerUI
@@ -21,7 +20,6 @@ namespace ColorPickerUI
private static string[] _args;
private int _powerToysRunnerPid;
private bool disposedValue;
- private ThemeManager _themeManager;
private CancellationTokenSource NativeThreadCTS { get; set; }
@@ -62,7 +60,6 @@ namespace ColorPickerUI
_powerToysRunnerPid = -1;
}
- _themeManager = new ThemeManager(this);
base.OnStartup(e);
}
@@ -86,8 +83,6 @@ namespace ColorPickerUI
_instanceMutex?.Dispose();
}
- _themeManager?.Dispose();
-
disposedValue = true;
}
}
diff --git a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml
index 5e8d9b3904..e8ec0a0a7a 100644
--- a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml
@@ -1,27 +1,47 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs
index 5a893953e7..e4f9b89742 100644
--- a/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml.cs
@@ -5,19 +5,24 @@
using System;
using System.Windows;
using ColorPicker.Helpers;
+using Common.UI;
+using Wpf.Ui.Controls;
namespace ColorPicker
{
///
/// Interaction logic for ColorEditorWindow.xaml
///
- public partial class ColorEditorWindow : Window
+ public partial class ColorEditorWindow : FluentWindow
{
private readonly AppStateHandler _appStateHandler;
public ColorEditorWindow(AppStateHandler appStateHandler)
{
InitializeComponent();
+ Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
+ WindowBackdropType = OSVersionHelper.IsWindows11() ? WindowBackdropType.Mica : WindowBackdropType = WindowBackdropType.None;
+
_appStateHandler = appStateHandler;
Closing += ColorEditorWindow_Closing;
}
@@ -31,7 +36,6 @@ namespace ColorPicker
protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
- NativeMethods.SetToolWindowStyle(this);
}
}
}
diff --git a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
index 41516fb3f3..b2da169222 100644
--- a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
+++ b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
@@ -48,15 +48,21 @@
App.manifest
+
+
+
+
+ Always
+
-
+
@@ -66,9 +72,6 @@
Always
-
- Always
-
diff --git a/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml b/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml
index 0eac32df7b..b2b398b5c6 100644
--- a/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml
@@ -1,66 +1,181 @@
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
-
-
diff --git a/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml.cs b/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml.cs
index 73eb876d57..f21973fe49 100644
--- a/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Controls/ColorFormatControl.xaml.cs
@@ -4,6 +4,7 @@
using System;
using System.Globalization;
+using System.Linq;
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Controls;
@@ -111,10 +112,11 @@ namespace ColorPicker.Controls
return;
}
- var peer = UIElementAutomationPeer.FromElement(clipboardNotification);
+ var innerTextBlock = ((StackPanel)clipboardNotification).Children.OfType().FirstOrDefault();
+ var peer = UIElementAutomationPeer.FromElement(innerTextBlock);
if (peer == null)
{
- peer = UIElementAutomationPeer.CreatePeerForElement(clipboardNotification);
+ peer = UIElementAutomationPeer.CreatePeerForElement(innerTextBlock);
}
peer.RaiseAutomationEvent(AutomationEvents.MenuOpened);
diff --git a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml
index dc522149db..220eabae1d 100644
--- a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml
@@ -1,457 +1,392 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml.cs b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml.cs
index b7fbdbc67a..ef1e074297 100644
--- a/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Controls/ColorPickerControl.xaml.cs
@@ -13,8 +13,8 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using ColorPicker.Helpers;
using ManagedCommon;
-using ModernWpf.Controls;
-using ModernWpf.Controls.Primitives;
+using Wpf.Ui.Controls;
+using static System.Net.Mime.MediaTypeNames;
namespace ColorPicker.Controls
{
@@ -74,9 +74,9 @@ namespace ColorPicker.Controls
control._ignoreRGBChanges = true;
control.HexCode.Text = ColorToHex(newColor);
- control.RNumberBox.Text = newColor.R.ToString(CultureInfo.InvariantCulture);
- control.GNumberBox.Text = newColor.G.ToString(CultureInfo.InvariantCulture);
- control.BNumberBox.Text = newColor.B.ToString(CultureInfo.InvariantCulture);
+ control.RNumberBox.Value = newColor.R;
+ control.GNumberBox.Value = newColor.G;
+ control.BNumberBox.Value = newColor.B;
control.SetColorFromTextBoxes(System.Drawing.Color.FromArgb(newColor.R, newColor.G, newColor.B));
control._ignoreRGBChanges = false;
@@ -173,9 +173,9 @@ namespace ColorPicker.Controls
if (!_ignoreRGBChanges)
{
- RNumberBox.Text = currentColor.R.ToString(CultureInfo.InvariantCulture);
- GNumberBox.Text = currentColor.G.ToString(CultureInfo.InvariantCulture);
- BNumberBox.Text = currentColor.B.ToString(CultureInfo.InvariantCulture);
+ RNumberBox.Value = currentColor.R;
+ GNumberBox.Value = currentColor.G;
+ BNumberBox.Value = currentColor.B;
}
_currentColor = currentColor;
@@ -193,17 +193,17 @@ namespace ColorPicker.Controls
{
_isCollapsed = false;
- var resizeColor = new DoubleAnimation(349, new Duration(TimeSpan.FromMilliseconds(250)));
+ var resizeColor = new DoubleAnimation(256, new Duration(TimeSpan.FromMilliseconds(250)));
resizeColor.EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseInOut };
var moveColor = new ThicknessAnimation(new Thickness(0), new Duration(TimeSpan.FromMilliseconds(250)));
moveColor.EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseInOut };
- ControlHelper.SetCornerRadius(CurrentColorButton, new CornerRadius(2));
- CurrentColorButton.BeginAnimation(Button.WidthProperty, resizeColor);
- CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
+ CurrentColorButton.BeginAnimation(System.Windows.Controls.Button.HeightProperty, resizeColor);
+ CurrentColorButton.BeginAnimation(System.Windows.Controls.Button.MarginProperty, moveColor);
CurrentColorButton.IsEnabled = false;
SessionEventHelper.Event.EditorAdjustColorOpened = true;
+ DetailsFlyout.IsOpen = true;
}
}
@@ -216,19 +216,17 @@ namespace ColorPicker.Controls
var resizeColor = new DoubleAnimation(165, new Duration(TimeSpan.FromMilliseconds(150)));
resizeColor.EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseInOut };
- var moveColor = new ThicknessAnimation(new Thickness(92, 0, 0, 0), new Duration(TimeSpan.FromMilliseconds(150)));
+ var moveColor = new ThicknessAnimation(new Thickness(0, 72, 0, 72), new Duration(TimeSpan.FromMilliseconds(150)));
moveColor.EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseInOut };
- ControlHelper.SetCornerRadius(CurrentColorButton, new CornerRadius(0));
- CurrentColorButton.BeginAnimation(Button.WidthProperty, resizeColor);
- CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
+ CurrentColorButton.BeginAnimation(System.Windows.Controls.Button.HeightProperty, resizeColor);
+ CurrentColorButton.BeginAnimation(System.Windows.Controls.Button.MarginProperty, moveColor);
CurrentColorButton.IsEnabled = true;
}
}
private void OKButton_Click(object sender, RoutedEventArgs e)
{
- HideDetails();
SelectedColorChangedCommand.Execute(_currentColor);
SessionEventHelper.Event.EditorColorAdjusted = true;
DetailsFlyout.Hide();
@@ -253,7 +251,7 @@ namespace ColorPicker.Controls
private void ColorVariationButton_Click(object sender, RoutedEventArgs e)
{
- var selectedColor = ((SolidColorBrush)((Button)sender).Background).Color;
+ var selectedColor = ((SolidColorBrush)((System.Windows.Controls.Button)sender).Background).Color;
SelectedColorChangedCommand.Execute(selectedColor);
SessionEventHelper.Event.EditorSimilarColorPicked = true;
}
@@ -284,7 +282,7 @@ namespace ColorPicker.Controls
private void HexCode_TextChanged(object sender, TextChangedEventArgs e)
{
- var newValue = (sender as TextBox).Text;
+ var newValue = (sender as System.Windows.Controls.TextBox).Text;
// support hex with 3 and 6 characters and optional with hashtag
var reg = new Regex("^#?([0-9A-Fa-f]{3}){1,2}$");
@@ -362,9 +360,11 @@ namespace ColorPicker.Controls
if (!_ignoreRGBChanges)
{
var numberBox = sender as NumberBox;
- var r = numberBox.Name == "RNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)RNumberBox.Value;
- var g = numberBox.Name == "GNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)GNumberBox.Value;
- var b = numberBox.Name == "BNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)BNumberBox.Value;
+
+ byte r = numberBox.Name == "RNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)RNumberBox.Value;
+ byte g = numberBox.Name == "GNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)GNumberBox.Value;
+ byte b = numberBox.Name == "BNumberBox" ? GetValueFromNumberBox(numberBox) : (byte)BNumberBox.Value;
+
_ignoreRGBChanges = true;
SetColorFromTextBoxes(System.Drawing.Color.FromArgb(r, g, b));
_ignoreRGBChanges = false;
@@ -379,11 +379,12 @@ namespace ColorPicker.Controls
/// Validated value as per numberbox conditions, if content is invalid it returns previous value
private static byte GetValueFromNumberBox(NumberBox numberBox)
{
- var internalTextBox = GetChildOfType(numberBox);
- var parsedValue = numberBox.NumberFormatter.ParseDouble(internalTextBox.Text);
+ double? parsedValue = ParseDouble(numberBox.Text);
+
if (parsedValue != null)
{
var parsedValueByte = (byte)parsedValue;
+
if (parsedValueByte >= numberBox.Minimum && parsedValueByte <= numberBox.Maximum)
{
return parsedValueByte;
@@ -394,6 +395,16 @@ namespace ColorPicker.Controls
return (byte)numberBox.Value;
}
+ public static double? ParseDouble(string text)
+ {
+ if (double.TryParse(text, out double result))
+ {
+ return result;
+ }
+
+ return null;
+ }
+
public static T GetChildOfType(DependencyObject depObj)
where T : DependencyObject
{
diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs
index e438fee69d..f52c717a10 100644
--- a/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Helpers/AppStateHandler.cs
@@ -150,7 +150,7 @@ namespace ColorPicker.Helpers
if (_colorEditorWindow == null)
{
_colorEditorWindow = new ColorEditorWindow(this);
- _colorEditorWindow.Content = _colorEditorViewModel;
+ _colorEditorWindow.contentPresenter.Content = _colorEditorViewModel;
_colorEditorViewModel.OpenColorPickerRequested += ColorEditorViewModel_OpenColorPickerRequested;
_colorEditorViewModel.OpenSettingsRequested += ColorEditorViewModel_OpenSettingsRequested;
_colorEditorViewModel.OpenColorPickerRequested += (object sender, EventArgs e) =>
diff --git a/src/modules/colorPicker/ColorPickerUI/Helpers/ControlHelper.cs b/src/modules/colorPicker/ColorPickerUI/Helpers/ControlHelper.cs
new file mode 100644
index 0000000000..d56732000c
--- /dev/null
+++ b/src/modules/colorPicker/ColorPickerUI/Helpers/ControlHelper.cs
@@ -0,0 +1,317 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+
+namespace ColorPicker.Helpers
+{
+ public static class ControlHelper
+ {
+ ///
+ /// Gets the radius for the corners of the control's border.
+ ///
+ /// The element from which to read the property value.
+ ///
+ /// The degree to which the corners are rounded, expressed as values of the CornerRadius
+ /// structure.
+ ///
+ public static CornerRadius GetCornerRadius(Control control)
+ {
+ return (CornerRadius)control.GetValue(CornerRadiusProperty);
+ }
+
+ ///
+ /// Sets the radius for the corners of the control's border.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetCornerRadius(Control control, CornerRadius value)
+ {
+ control.SetValue(CornerRadiusProperty, value);
+ }
+
+ ///
+ /// Identifies the CornerRadius dependency property.
+ ///
+ public static readonly DependencyProperty CornerRadiusProperty =
+ DependencyProperty.RegisterAttached(
+ "CornerRadius",
+ typeof(CornerRadius),
+ typeof(ControlHelper),
+ null);
+
+ ///
+ /// Identifies the Header dependency property.
+ ///
+ public static readonly DependencyProperty HeaderProperty =
+ DependencyProperty.RegisterAttached(
+ "Header",
+ typeof(object),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(OnHeaderChanged));
+
+ ///
+ /// Gets the content for the control's header.
+ ///
+ /// The element from which to read the property value.
+ /// The content of the control's header. The default is **null**.
+ public static object GetHeader(Control control)
+ {
+ return control.GetValue(HeaderProperty);
+ }
+
+ ///
+ /// Sets the content for the control's header.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetHeader(Control control, object value)
+ {
+ control.SetValue(HeaderProperty, value);
+ }
+
+ private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ UpdateHeaderVisibility((Control)d);
+ }
+
+ ///
+ /// Identifies the HeaderTemplate dependency property.
+ ///
+ public static readonly DependencyProperty HeaderTemplateProperty =
+ DependencyProperty.RegisterAttached(
+ "HeaderTemplate",
+ typeof(DataTemplate),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(OnHeaderTemplateChanged));
+
+ ///
+ /// Gets the DataTemplate used to display the content of the control's header.
+ ///
+ /// The element from which to read the property value.
+ ///
+ /// The template that specifies the visualization of the header object. The default
+ /// is **null**.
+ ///
+ public static DataTemplate GetHeaderTemplate(Control control)
+ {
+ return (DataTemplate)control.GetValue(HeaderTemplateProperty);
+ }
+
+ ///
+ /// Sets the DataTemplate used to display the content of the control's header.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetHeaderTemplate(Control control, DataTemplate value)
+ {
+ control.SetValue(HeaderTemplateProperty, value);
+ }
+
+ private static void OnHeaderTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ UpdateHeaderVisibility((Control)d);
+ }
+
+ private static readonly DependencyPropertyKey HeaderVisibilityPropertyKey =
+ DependencyProperty.RegisterAttachedReadOnly(
+ "HeaderVisibility",
+ typeof(Visibility),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(Visibility.Collapsed));
+
+ public static readonly DependencyProperty HeaderVisibilityProperty =
+ HeaderVisibilityPropertyKey.DependencyProperty;
+
+ public static Visibility GetHeaderVisibility(Control control)
+ {
+ return (Visibility)control.GetValue(HeaderVisibilityProperty);
+ }
+
+ private static void SetHeaderVisibility(Control control, Visibility value)
+ {
+ control.SetValue(HeaderVisibilityPropertyKey, value);
+ }
+
+ private static void UpdateHeaderVisibility(Control control)
+ {
+ Visibility visibility;
+
+ if (GetHeaderTemplate(control) != null)
+ {
+ visibility = Visibility.Visible;
+ }
+ else
+ {
+ visibility = IsNullOrEmptyString(GetHeader(control)) ? Visibility.Collapsed : Visibility.Visible;
+ }
+
+ SetHeaderVisibility(control, visibility);
+ }
+
+ ///
+ /// Gets the text that is displayed in the control until the value is changed
+ /// by a user action or some other operation.
+ ///
+ /// The element from which to read the property value.
+ ///
+ /// The text that is displayed in the control when no value is entered. The default
+ /// is an empty string ("").
+ ///
+ public static string GetPlaceholderText(Control control)
+ {
+ return (string)control.GetValue(PlaceholderTextProperty);
+ }
+
+ ///
+ /// Sets the text that is displayed in the control until the value is changed
+ /// by a user action or some other operation.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetPlaceholderText(Control control, string value)
+ {
+ control.SetValue(PlaceholderTextProperty, value);
+ }
+
+ ///
+ /// Identifies the PlaceholderText dependency property.
+ ///
+ public static readonly DependencyProperty PlaceholderTextProperty =
+ DependencyProperty.RegisterAttached(
+ "PlaceholderText",
+ typeof(string),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(string.Empty, OnPlaceholderTextChanged));
+
+ private static void OnPlaceholderTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ UpdatePlaceholderTextVisibility((Control)d);
+ }
+
+ public static Visibility GetPlaceholderTextVisibility(Control control)
+ {
+ return (Visibility)control.GetValue(PlaceholderTextVisibilityProperty);
+ }
+
+ private static void SetPlaceholderTextVisibility(Control control, Visibility value)
+ {
+ control.SetValue(PlaceholderTextVisibilityPropertyKey, value);
+ }
+
+ private static readonly DependencyPropertyKey PlaceholderTextVisibilityPropertyKey =
+ DependencyProperty.RegisterAttachedReadOnly(
+ "PlaceholderTextVisibility",
+ typeof(Visibility),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(Visibility.Collapsed));
+
+ public static readonly DependencyProperty PlaceholderTextVisibilityProperty =
+ PlaceholderTextVisibilityPropertyKey.DependencyProperty;
+
+ private static void UpdatePlaceholderTextVisibility(Control control)
+ {
+ SetPlaceholderTextVisibility(control, string.IsNullOrEmpty(GetPlaceholderText(control)) ? Visibility.Collapsed : Visibility.Visible);
+ }
+
+ ///
+ /// Gets a brush that describes the color of placeholder text.
+ ///
+ /// The element from which to read the property value.
+ /// The brush that describes the color of placeholder text.
+ public static Brush GetPlaceholderForeground(Control control)
+ {
+ return (Brush)control.GetValue(PlaceholderForegroundProperty);
+ }
+
+ ///
+ /// Sets a brush that describes the color of placeholder text.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetPlaceholderForeground(Control control, Brush value)
+ {
+ control.SetValue(PlaceholderForegroundProperty, value);
+ }
+
+ ///
+ /// Identifies the PlaceholderForeground dependency property.
+ ///
+ public static readonly DependencyProperty PlaceholderForegroundProperty =
+ DependencyProperty.RegisterAttached(
+ "PlaceholderForeground",
+ typeof(Brush),
+ typeof(ControlHelper),
+ null);
+
+ ///
+ /// Gets content that is shown below the control. The content should provide
+ /// guidance about the input expected by the control.
+ ///
+ /// The element from which to read the property value.
+ /// The content to be displayed below the control. The default is **null**.
+ public static object GetDescription(Control control)
+ {
+ return control.GetValue(DescriptionProperty);
+ }
+
+ ///
+ /// Sets content that is shown below the control. The content should provide
+ /// guidance about the input expected by the control.
+ ///
+ /// The element on which to set the attached property.
+ /// The property value to set.
+ public static void SetDescription(Control control, object value)
+ {
+ control.SetValue(DescriptionProperty, value);
+ }
+
+ ///
+ /// Identifies the Description dependency property.
+ ///
+ public static readonly DependencyProperty DescriptionProperty =
+ DependencyProperty.RegisterAttached(
+ "Description",
+ typeof(object),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(OnDescriptionChanged));
+
+ private static void OnDescriptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ UpdateDescriptionVisibility((Control)d);
+ }
+
+ private static readonly DependencyPropertyKey DescriptionVisibilityPropertyKey =
+ DependencyProperty.RegisterAttachedReadOnly(
+ "DescriptionVisibility",
+ typeof(Visibility),
+ typeof(ControlHelper),
+ new FrameworkPropertyMetadata(Visibility.Collapsed));
+
+ public static readonly DependencyProperty DescriptionVisibilityProperty =
+ DescriptionVisibilityPropertyKey.DependencyProperty;
+
+ public static Visibility GetDescriptionVisibility(Control control)
+ {
+ return (Visibility)control.GetValue(DescriptionVisibilityProperty);
+ }
+
+ private static void SetDescriptionVisibility(Control control, Visibility value)
+ {
+ control.SetValue(DescriptionVisibilityPropertyKey, value);
+ }
+
+ private static void UpdateDescriptionVisibility(Control control)
+ {
+ SetDescriptionVisibility(control, IsNullOrEmptyString(GetDescription(control)) ? Visibility.Collapsed : Visibility.Visible);
+ }
+
+ internal static bool IsNullOrEmptyString(object obj)
+ {
+ return obj == null || (obj is string s && string.IsNullOrEmpty(s));
+ }
+ }
+}
diff --git a/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml b/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml
index 208e1fcda0..6aa90ae58e 100644
--- a/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml
@@ -1,24 +1,29 @@
-
+
-
-
+
+
-
+
diff --git a/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml.cs b/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml.cs
index c3df6f54c7..d25357c99f 100644
--- a/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/MainWindow.xaml.cs
@@ -6,6 +6,7 @@ using System.ComponentModel.Composition;
using System.Windows;
using System.Windows.Interop;
using ColorPicker.ViewModelContracts;
+using Wpf.Ui.Controls;
namespace ColorPicker
{
@@ -18,6 +19,7 @@ namespace ColorPicker
{
Closing += MainWindow_Closing;
Bootstrapper.InitializeContainer(this);
+ Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType.None);
InitializeComponent();
DataContext = this;
Show(); // Call show just to make sure source is initialized at startup.
diff --git a/src/modules/colorPicker/ColorPickerUI/Properties/Resources.Designer.cs b/src/modules/colorPicker/ColorPickerUI/Properties/Resources.Designer.cs
index 005f23cd01..674e05bf45 100644
--- a/src/modules/colorPicker/ColorPickerUI/Properties/Resources.Designer.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Properties/Resources.Designer.cs
@@ -141,6 +141,15 @@ namespace ColorPicker.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Color Picker.
+ ///
+ public static string CP_Title {
+ get {
+ return ResourceManager.GetString("CP_Title", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Color dark 1.
///
@@ -231,6 +240,15 @@ namespace ColorPicker.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Pick.
+ ///
+ public static string New_Label {
+ get {
+ return ResourceManager.GetString("New_Label", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Press the Color Picker icon to capture a color from your screen..
///
diff --git a/src/modules/colorPicker/ColorPickerUI/Properties/Resources.resx b/src/modules/colorPicker/ColorPickerUI/Properties/Resources.resx
index fa0776b451..31d9777e7c 100644
--- a/src/modules/colorPicker/ColorPickerUI/Properties/Resources.resx
+++ b/src/modules/colorPicker/ColorPickerUI/Properties/Resources.resx
@@ -400,4 +400,12 @@
Plum
Plum color
+
+ Pick
+ Button label to pick a new color
+
+
+ Color Picker
+ Do not translate product name
+
\ No newline at end of file
diff --git a/src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml b/src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml
index 6f6c811c50..720fbce43c 100644
--- a/src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml
@@ -1,55 +1,59 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+ ColorCopiedNotificationBorder="{Binding ElementName=CopiedBorderIndicator}"
+ ColorFormatModel="{Binding}"
+ SelectedColor="{Binding ElementName=colorEditorControl, Path=DataContext.SelectedColor}" />
+ Margin="0,14,12,10"
+ Background="Transparent"
+ Orientation="Vertical" />
-
-
+
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml.cs b/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml.cs
index ba17e3be86..3d026a0276 100644
--- a/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Views/ColorEditorView.xaml.cs
@@ -42,11 +42,13 @@ namespace ColorPicker.Views
};
}
- private void HistoryColors_ItemClick(object sender, ModernWpf.Controls.ItemClickEventArgs e)
+ /*
+ private void HistoryColors_ItemClick(object sender, ItemClickEventArgs e)
{
// Note: it does not handle clicking on the same color.
// More appropriate event would be SelectionChanged but we can not distinguish between user action and program action inside of it.
SessionEventHelper.Event.EditorHistoryColorPicked = true;
}
+ */
}
}
diff --git a/src/modules/colorPicker/ColorPickerUI/Views/MainView.xaml b/src/modules/colorPicker/ColorPickerUI/Views/MainView.xaml
index c4dda22413..cbf4aa1179 100644
--- a/src/modules/colorPicker/ColorPickerUI/Views/MainView.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/Views/MainView.xaml
@@ -1,20 +1,23 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+ Grid.RowSpan="2"
+ Margin="1"
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch"
+ Background="{Binding ColorBrush}"
+ BorderBrush="{DynamicResource SurfaceStrokeColorDefaultBrush}"
+ BorderThickness="1"
+ CornerRadius="{DynamicResource ControlCornerRadius}" />
-
+
-
+
diff --git a/src/modules/colorPicker/ColorPickerUI/Views/ZoomView.xaml b/src/modules/colorPicker/ColorPickerUI/Views/ZoomView.xaml
index 0fadecf7ae..ec3af48220 100644
--- a/src/modules/colorPicker/ColorPickerUI/Views/ZoomView.xaml
+++ b/src/modules/colorPicker/ColorPickerUI/Views/ZoomView.xaml
@@ -1,62 +1,68 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
+
+
diff --git a/src/modules/fancyzones/FancyZones/FancyZones.vcxproj b/src/modules/fancyzones/FancyZones/FancyZones.vcxproj
index 643aad98cf..a26e00dcb1 100644
--- a/src/modules/fancyzones/FancyZones/FancyZones.vcxproj
+++ b/src/modules/fancyzones/FancyZones/FancyZones.vcxproj
@@ -2,7 +2,7 @@
-
+
true
@@ -160,15 +160,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZones/packages.config b/src/modules/fancyzones/FancyZones/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/fancyzones/FancyZones/packages.config
+++ b/src/modules/fancyzones/FancyZones/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesLib/FancyZonesLib.vcxproj b/src/modules/fancyzones/FancyZonesLib/FancyZonesLib.vcxproj
index d2e5b1ca43..e3be24801a 100644
--- a/src/modules/fancyzones/FancyZonesLib/FancyZonesLib.vcxproj
+++ b/src/modules/fancyzones/FancyZonesLib/FancyZonesLib.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -154,15 +154,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesLib/packages.config b/src/modules/fancyzones/FancyZonesLib/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/fancyzones/FancyZonesLib/packages.config
+++ b/src/modules/fancyzones/FancyZonesLib/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesModuleInterface/FancyZonesModuleInterface.vcxproj b/src/modules/fancyzones/FancyZonesModuleInterface/FancyZonesModuleInterface.vcxproj
index 12a82f47e2..4d0f7fbece 100644
--- a/src/modules/fancyzones/FancyZonesModuleInterface/FancyZonesModuleInterface.vcxproj
+++ b/src/modules/fancyzones/FancyZonesModuleInterface/FancyZonesModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{48804216-2A0E-4168-A6D8-9CD068D14227}
@@ -69,7 +69,7 @@
-
+
@@ -77,8 +77,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesModuleInterface/packages.config b/src/modules/fancyzones/FancyZonesModuleInterface/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/fancyzones/FancyZonesModuleInterface/packages.config
+++ b/src/modules/fancyzones/FancyZonesModuleInterface/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj b/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj
index 160abae1fa..685c63ca17 100644
--- a/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj
+++ b/src/modules/fancyzones/FancyZonesTests/UnitTests/UnitTests.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}
@@ -85,15 +85,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/fancyzones/FancyZonesTests/UnitTests/packages.config b/src/modules/fancyzones/FancyZonesTests/UnitTests/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/fancyzones/FancyZonesTests/UnitTests/packages.config
+++ b/src/modules/fancyzones/FancyZonesTests/UnitTests/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj b/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj
index c8d8268489..bd62017a6c 100644
--- a/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj
+++ b/src/modules/imageresizer/ImageResizerContextMenu/ImageResizerContextMenu.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -120,15 +120,15 @@ MakeAppx.exe pack /d . /p $(OutDir)ImageResizerContextMenuPackage.msix /nv
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/ImageResizerContextMenu/packages.config b/src/modules/imageresizer/ImageResizerContextMenu/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/imageresizer/ImageResizerContextMenu/packages.config
+++ b/src/modules/imageresizer/ImageResizerContextMenu/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj
index d8ae785f46..e669a76994 100644
--- a/src/modules/imageresizer/dll/ImageResizerExt.vcxproj
+++ b/src/modules/imageresizer/dll/ImageResizerExt.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -138,13 +138,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/dll/packages.config b/src/modules/imageresizer/dll/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/imageresizer/dll/packages.config
+++ b/src/modules/imageresizer/dll/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/ui/App.xaml b/src/modules/imageresizer/ui/App.xaml
index 27b50ccee3..d177d900e6 100644
--- a/src/modules/imageresizer/ui/App.xaml
+++ b/src/modules/imageresizer/ui/App.xaml
@@ -18,6 +18,7 @@
+
\ No newline at end of file
diff --git a/src/modules/imageresizer/ui/Models/ResizeFit.cs b/src/modules/imageresizer/ui/Models/ResizeFit.cs
index 74073f1ea0..6f880114a9 100644
--- a/src/modules/imageresizer/ui/Models/ResizeFit.cs
+++ b/src/modules/imageresizer/ui/Models/ResizeFit.cs
@@ -1,6 +1,7 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
+// See the LICENSE file in the project root for more information.
+// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
namespace ImageResizer.Models
{
diff --git a/src/modules/imageresizer/ui/Models/ResizeSize.cs b/src/modules/imageresizer/ui/Models/ResizeSize.cs
index 761f59adf2..e200d729c9 100644
--- a/src/modules/imageresizer/ui/Models/ResizeSize.cs
+++ b/src/modules/imageresizer/ui/Models/ResizeSize.cs
@@ -1,6 +1,7 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
+// See the LICENSE file in the project root for more information.
+// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/src/modules/imageresizer/ui/Models/ResizeUnit.cs b/src/modules/imageresizer/ui/Models/ResizeUnit.cs
index f3c6a59dc2..13ef1f63df 100644
--- a/src/modules/imageresizer/ui/Models/ResizeUnit.cs
+++ b/src/modules/imageresizer/ui/Models/ResizeUnit.cs
@@ -1,6 +1,7 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
+// See the LICENSE file in the project root for more information.
+// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
namespace ImageResizer.Models
{
diff --git a/src/modules/imageresizer/ui/Properties/Resources.Designer.cs b/src/modules/imageresizer/ui/Properties/Resources.Designer.cs
index 3b0ac8807b..4d89835deb 100644
--- a/src/modules/imageresizer/ui/Properties/Resources.Designer.cs
+++ b/src/modules/imageresizer/ui/Properties/Resources.Designer.cs
@@ -87,15 +87,6 @@ namespace ImageResizer.Properties {
}
}
- ///
- /// Looks up a localized string similar to H.
- ///
- public static string HeightChar {
- get {
- return ResourceManager.GetString("HeightChar", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Image Resizer.
///
@@ -142,7 +133,7 @@ namespace ImageResizer.Properties {
}
///
- /// Looks up a localized string similar to Ign_ore the orientation of pictures.
+ /// Looks up a localized string similar to Ignore the _orientation of pictures.
///
public static string Input_IgnoreOrientation {
get {
@@ -151,7 +142,7 @@ namespace ImageResizer.Properties {
}
///
- /// Looks up a localized string similar to Remove metadata that doesn't affect rendering.
+ /// Looks up a localized string similar to Remove meta_data that doesn't affect rendering.
///
public static string Input_RemoveMetadata {
get {
@@ -160,7 +151,7 @@ namespace ImageResizer.Properties {
}
///
- /// Looks up a localized string similar to R_esize the original pictures (don't create copies).
+ /// Looks up a localized string similar to Over_write files.
///
public static string Input_Replace {
get {
@@ -519,15 +510,6 @@ namespace ImageResizer.Properties {
}
}
- ///
- /// Looks up a localized string similar to Times Symbol.
- ///
- public static string Times_Symbol {
- get {
- return ResourceManager.GetString("Times_Symbol", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Unit.
///
@@ -563,14 +545,5 @@ namespace ImageResizer.Properties {
return ResourceManager.GetString("Width", resourceCulture);
}
}
-
- ///
- /// Looks up a localized string similar to W.
- ///
- public static string WidthChar {
- get {
- return ResourceManager.GetString("WidthChar", resourceCulture);
- }
- }
}
}
diff --git a/src/modules/imageresizer/ui/Properties/Resources.resx b/src/modules/imageresizer/ui/Properties/Resources.resx
index 50ee6864ec..313db96558 100644
--- a/src/modules/imageresizer/ui/Properties/Resources.resx
+++ b/src/modules/imageresizer/ui/Properties/Resources.resx
@@ -140,13 +140,13 @@
Custom
- Ign_ore the orientation of pictures
+ Ignore the _orientation of pictures
Gif files with animations may not be correctly resized.
- R_esize the original pictures (don't create copies)
+ Ov_erwrite files
Resize
@@ -189,33 +189,43 @@
About {0} hour, {1} minute remaining.
+ "About" = Approximately, not "on the subject of"
About {0} hour, {1} minutes remaining.
+ "About" = Approximately, not "on the subject of"
About {0} hours, {1} minute remaining.
+ "About" = Approximately, not "on the subject of"
About {0} hours, {1} minutes remaining.
+ "About" = Approximately, not "on the subject of"
About {1} minute, {2} second remaining.
+ "About" = Approximately, not "on the subject of"
About {1} minute, {2} seconds remaining.
+ "About" = Approximately, not "on the subject of"
About {1} minutes, {2} second remaining.
+ "About" = Approximately, not "on the subject of"
About {1} minutes, {2} seconds remaining.
+ "About" = Approximately, not "on the subject of"
About {2} second remaining.
+ "About" = Approximately, not "on the subject of"
About {2} seconds remaining.
+ "About" = Approximately, not "on the subject of"
Fill
@@ -262,9 +272,6 @@
Small
-
- Times Symbol
-
Unit
@@ -281,14 +288,6 @@
Settings
- Remove metadata that doesn't affect rendering
-
-
- H
- First character of 'Height'
-
-
- W
- First character of 'Width'
+ Remove meta_data that doesn't affect rendering
\ No newline at end of file
diff --git a/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs b/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs
index 5290e28573..7466ec45b1 100644
--- a/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs
+++ b/src/modules/imageresizer/ui/ViewModels/InputViewModel.cs
@@ -57,9 +57,9 @@ namespace ImageResizer.ViewModels
public Settings Settings { get; }
- public IEnumerable ResizeFitValues { get => Enum.GetValues(typeof(ResizeFit)).Cast(); }
+ public IEnumerable ResizeFitValues => Enum.GetValues(typeof(ResizeFit)).Cast();
- public IEnumerable ResizeUnitValues { get => Enum.GetValues(typeof(ResizeUnit)).Cast(); }
+ public IEnumerable ResizeUnitValues => Enum.GetValues(typeof(ResizeUnit)).Cast();
public ICommand ResizeCommand { get; }
@@ -69,14 +69,9 @@ namespace ImageResizer.ViewModels
public ICommand EnterKeyPressedCommand { get; private set; }
- public bool TryingToResizeGifFiles
- {
- get
- {
- // Any of the files is a gif.
- return _batch.Files.Any(filename => filename.EndsWith(".gif", System.StringComparison.InvariantCultureIgnoreCase));
- }
- }
+ // Any of the files is a gif
+ public bool TryingToResizeGifFiles =>
+ _batch.Files.Any(filename => filename.EndsWith(".gif", System.StringComparison.InvariantCultureIgnoreCase));
public void Resize()
{
diff --git a/src/modules/imageresizer/ui/Views/ResizeUnitConverter.cs b/src/modules/imageresizer/ui/Views/EnumToIntConverter.cs
similarity index 52%
rename from src/modules/imageresizer/ui/Views/ResizeUnitConverter.cs
rename to src/modules/imageresizer/ui/Views/EnumToIntConverter.cs
index 5484c3c468..fcfd151c77 100644
--- a/src/modules/imageresizer/ui/Views/ResizeUnitConverter.cs
+++ b/src/modules/imageresizer/ui/Views/EnumToIntConverter.cs
@@ -4,28 +4,18 @@
using System;
using System.Globalization;
+using System.Windows;
using System.Windows.Data;
-using ImageResizer.Models;
-using ImageResizer.Properties;
namespace ImageResizer.Views
{
- [ValueConversion(typeof(ResizeUnit), typeof(string))]
- internal class ResizeUnitConverter : IValueConverter
+ [ValueConversion(typeof(Enum), typeof(int))]
+ internal class EnumToIntConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var output = Resources.ResourceManager.GetString(Enum.GetName(typeof(ResizeUnit), value), culture);
-
- if ((string)parameter == "ToLower")
- {
- output = output.ToLower(culture);
- }
-
- return output;
- }
+ => (int)value;
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- => throw new NotImplementedException();
+ => targetType.GetEnumValues().GetValue((int)value);
}
}
diff --git a/src/modules/imageresizer/ui/Views/EnumValueConverter.cs b/src/modules/imageresizer/ui/Views/EnumValueConverter.cs
index 4eb0abdd25..c95b69b295 100644
--- a/src/modules/imageresizer/ui/Views/EnumValueConverter.cs
+++ b/src/modules/imageresizer/ui/Views/EnumValueConverter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
+// See the LICENSE file in the project root for more information.
+// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
using System;
using System.Globalization;
@@ -16,6 +17,11 @@ namespace ImageResizer.Views
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var type = value?.GetType();
+ if (!type.IsEnum)
+ {
+ return value;
+ }
+
var builder = new StringBuilder();
builder
diff --git a/src/modules/imageresizer/ui/Views/InputPage.xaml b/src/modules/imageresizer/ui/Views/InputPage.xaml
index 0b90254fd0..f219c830c8 100644
--- a/src/modules/imageresizer/ui/Views/InputPage.xaml
+++ b/src/modules/imageresizer/ui/Views/InputPage.xaml
@@ -9,15 +9,16 @@
-
+
+
-
+
-
-
-
+
+
+
@@ -76,7 +64,7 @@
-
+
@@ -90,15 +78,13 @@
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
BorderThickness="0,1,0,0" />
-
+
+
-
+
-
+
@@ -107,19 +93,17 @@
-
-
-
-
-
+ SelectedIndex="{Binding ElementName=SizeComboBox, Path=SelectedValue.Fit, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
-
-
+
+
@@ -193,76 +172,75 @@
-
+ SelectedIndex="{Binding ElementName=SizeComboBox, Path=SelectedValue.Unit, Mode=TwoWay, Converter={StaticResource EnumToIntConverter}}">
-
-
+
+
-
+
+
+
+
+
+
-
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
@@ -271,30 +249,26 @@
-
+
+
-
+
@@ -307,8 +281,6 @@
Content="{x:Static p:Resources.Cancel}"
IsCancel="True" />
-
-
diff --git a/src/modules/imageresizer/ui/Views/InputPage.xaml.cs b/src/modules/imageresizer/ui/Views/InputPage.xaml.cs
index c22f74bdc2..4999e2610f 100644
--- a/src/modules/imageresizer/ui/Views/InputPage.xaml.cs
+++ b/src/modules/imageresizer/ui/Views/InputPage.xaml.cs
@@ -1,13 +1,13 @@
// Copyright (c) Brice Lambson
// The Brice Lambson licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
+// See the LICENSE file in the project root for more information.
+// Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
using System.Windows.Controls;
using System.Windows.Input;
using ImageResizer.ViewModels;
using Wpf.Ui.Controls;
using static ImageResizer.ViewModels.InputViewModel;
-using Numberbox = Wpf.Ui.Controls.NumberBox;
namespace ImageResizer.Views
{
@@ -29,10 +29,9 @@ namespace ImageResizer.Views
if (e.Key == Key.Enter)
{
var numberBox = sender as NumberBox;
- var viewModel = (InputViewModel)this.DataContext;
- double number;
+ var viewModel = (InputViewModel)DataContext;
KeyPressParams keyParams;
- if (double.TryParse(((System.Windows.Controls.TextBox)e.OriginalSource).Text, out number))
+ if (double.TryParse(((System.Windows.Controls.TextBox)e.OriginalSource).Text, out double number))
{
// Determine which NumberBox triggered the event based on its name
switch (numberBox.Name)
diff --git a/src/modules/imageresizer/ui/Views/MainWindow.xaml b/src/modules/imageresizer/ui/Views/MainWindow.xaml
index 72a5120710..2ca6ca6b6c 100644
--- a/src/modules/imageresizer/ui/Views/MainWindow.xaml
+++ b/src/modules/imageresizer/ui/Views/MainWindow.xaml
@@ -16,6 +16,7 @@
ExtendsContentIntoTitleBar="True"
Icon="/PowerToys.ImageResizer;component/Resources/ImageResizer.ico"
ResizeMode="NoResize"
+ SizeToContent="Height"
WindowCornerPreference="Default"
WindowStartupLocation="CenterScreen">
@@ -58,6 +59,7 @@
+
diff --git a/src/modules/imageresizer/ui/Views/ResultsPage.xaml b/src/modules/imageresizer/ui/Views/ResultsPage.xaml
index 9f010df456..e84906879d 100644
--- a/src/modules/imageresizer/ui/Views/ResultsPage.xaml
+++ b/src/modules/imageresizer/ui/Views/ResultsPage.xaml
@@ -9,11 +9,7 @@
Margin="12,12,12,0"
FontSize="16"
Text="{x:Static p:Resources.Results_MainInstruction}" />
-
+
@@ -28,11 +24,12 @@
+
-
+
81010002
@@ -161,7 +161,7 @@
-
+
@@ -175,8 +175,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditor/packages.config b/src/modules/keyboardmanager/KeyboardManagerEditor/packages.config
index 96e6f248fe..a97821046a 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditor/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEditor/packages.config
@@ -4,5 +4,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorLibrary.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorLibrary.vcxproj
index 9163e66903..b34cdbc528 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorLibrary.vcxproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/KeyboardManagerEditorLibrary.vcxproj
@@ -2,7 +2,7 @@
-
+
16.0
Win32Proj
@@ -98,7 +98,7 @@
-
+
@@ -108,8 +108,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/packages.config b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/packages.config
index 76411065b0..59cfa64851 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorLibrary/packages.config
@@ -3,5 +3,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorTest/KeyboardManagerEditorTest.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEditorTest/KeyboardManagerEditorTest.vcxproj
index 918c92e5e8..61f7494694 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorTest/KeyboardManagerEditorTest.vcxproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorTest/KeyboardManagerEditorTest.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{62173D9A-6724-4C00-A1C8-FB646480A9EC}
@@ -67,13 +67,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEditorTest/packages.config b/src/modules/keyboardmanager/KeyboardManagerEditorTest/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEditorTest/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEditorTest/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj
index e67ddc52d9..96e6a36275 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEngine/KeyboardManagerEngine.vcxproj
@@ -1,6 +1,6 @@
-
+
true
true
@@ -80,13 +80,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngine/packages.config b/src/modules/keyboardmanager/KeyboardManagerEngine/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngine/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEngine/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManagerEngineLibrary.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManagerEngineLibrary.vcxproj
index 81a7624c1e..86b3e23b90 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManagerEngineLibrary.vcxproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManagerEngineLibrary.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -59,13 +59,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/packages.config b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEngineLibrary/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineTest/KeyboardManagerEngineTest.vcxproj b/src/modules/keyboardmanager/KeyboardManagerEngineTest/KeyboardManagerEngineTest.vcxproj
index 41aa5e80f7..34feefa8ac 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngineTest/KeyboardManagerEngineTest.vcxproj
+++ b/src/modules/keyboardmanager/KeyboardManagerEngineTest/KeyboardManagerEngineTest.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{7f4b3a60-bc27-45a7-8000-68b0b6ea7466}
@@ -71,13 +71,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/KeyboardManagerEngineTest/packages.config b/src/modules/keyboardmanager/KeyboardManagerEngineTest/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/KeyboardManagerEngineTest/packages.config
+++ b/src/modules/keyboardmanager/KeyboardManagerEngineTest/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/common/KeyboardManagerCommon.vcxproj b/src/modules/keyboardmanager/common/KeyboardManagerCommon.vcxproj
index ebcd470c61..3fdd382256 100644
--- a/src/modules/keyboardmanager/common/KeyboardManagerCommon.vcxproj
+++ b/src/modules/keyboardmanager/common/KeyboardManagerCommon.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
{8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}
@@ -75,13 +75,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/common/packages.config b/src/modules/keyboardmanager/common/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/common/packages.config
+++ b/src/modules/keyboardmanager/common/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj
index 5fb50af17e..b66361ff99 100644
--- a/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj
+++ b/src/modules/keyboardmanager/dll/KeyboardManager.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{89f34af7-1c34-4a72-aa6e-534bcf972bd9}
@@ -73,13 +73,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/keyboardmanager/dll/packages.config b/src/modules/keyboardmanager/dll/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/keyboardmanager/dll/packages.config
+++ b/src/modules/keyboardmanager/dll/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj
index 9984a9431e..667b63a8ca 100644
--- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj
+++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -76,15 +76,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/launcher/Microsoft.Launcher/packages.config b/src/modules/launcher/Microsoft.Launcher/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/launcher/Microsoft.Launcher/packages.config
+++ b/src/modules/launcher/Microsoft.Launcher/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs
index 0be408dc49..6152d4c391 100644
--- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs
+++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs
@@ -46,7 +46,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.WorkspacesHelper
path = path[1..];
}
- if (!DoesPathExist(path, workspaceEnv.Value, machineName))
+ if (!DoesPathExist(path, workspaceEnv.Value))
{
return null;
}
@@ -72,18 +72,11 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.WorkspacesHelper
};
}
- private bool DoesPathExist(string path, WorkspaceEnvironment workspaceEnv, string machineName)
+ private bool DoesPathExist(string path, WorkspaceEnvironment workspaceEnv)
{
- if (workspaceEnv == WorkspaceEnvironment.Local || workspaceEnv == WorkspaceEnvironment.RemoteWSL)
+ if (workspaceEnv == WorkspaceEnvironment.Local)
{
- var resolvedPath = path;
-
- if (workspaceEnv == WorkspaceEnvironment.RemoteWSL)
- {
- resolvedPath = $"\\\\wsl$\\{machineName}{resolvedPath.Replace('/', '\\')}";
- }
-
- return Directory.Exists(resolvedPath) || File.Exists(resolvedPath);
+ return Directory.Exists(path) || File.Exists(path);
}
// If the workspace environment is not Local or WSL, assume the path exists
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs
index 746206d8ed..0f8328ef10 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest/QueryTests.cs
@@ -4,6 +4,7 @@
using System.Globalization;
using System.Linq;
+using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Wox.Plugin;
@@ -13,6 +14,19 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
[TestClass]
public class QueryTests
{
+ private static Mock _main;
+ private static Mock _api;
+
+ [TestInitialize]
+ public void Initialize()
+ {
+ _api = new Mock();
+ _api.Setup(api => api.ChangeQuery(It.IsAny(), It.IsAny())).Verifiable();
+
+ _main = new Mock();
+ _main.Object.Init(new PluginInitContext() { API = _api.Object });
+ }
+
[DataTestMethod]
[DataRow("=pi(9+)", "Expression wrong or incomplete (Did you forget some parentheses?)")]
[DataRow("=pi,", "Expression wrong or incomplete (Did you forget some parentheses?)")]
@@ -28,12 +42,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
[DataRow("10+(8*9)/0*7", "Expression contains division by zero")]
public void ErrorResultOnInvalidKeywordQuery(string typedString, string expectedResult)
{
- // Setup
- Mock main = new();
Query expectedQuery = new(typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).FirstOrDefault().SubTitle;
+ var result = _main.Object.Query(expectedQuery).FirstOrDefault().SubTitle;
// Assert
Assert.AreEqual(expectedResult, result);
@@ -55,11 +67,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void NoResultOnInvalidGlobalQuery(string typedString)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
// Act
- var result = main.Object.Query(expectedQuery).Count;
+ var result = _main.Object.Query(expectedQuery).Count;
// Assert
Assert.AreEqual(result, 0);
@@ -79,13 +90,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void NoResultIfQueryEndsWithBinaryOperator(string typedString)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
Query expectedQueryWithKeyword = new("=" + typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).Count;
- var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).Count;
+ var result = _main.Object.Query(expectedQuery).Count;
+ var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).Count;
// Assert
Assert.AreEqual(result, 0);
@@ -100,13 +110,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void NoErrorForDivisionByNumberWithDecimalDigits(string typedString)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
Query expectedQueryWithKeyword = new("=" + typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).FirstOrDefault().SubTitle;
- var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).FirstOrDefault().SubTitle;
+ var result = _main.Object.Query(expectedQuery).FirstOrDefault().SubTitle;
+ var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).FirstOrDefault().SubTitle;
// Assert
Assert.AreEqual(result, "Copy this number to the clipboard");
@@ -190,13 +199,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void NoErrorForHumanMultiplicationExpressions(string typedString)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
Query expectedQueryWithKeyword = new("=" + typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).FirstOrDefault()?.SubTitle;
- var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.SubTitle;
+ var result = _main.Object.Query(expectedQuery).FirstOrDefault()?.SubTitle;
+ var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.SubTitle;
// Assert
Assert.AreEqual("Copy this number to the clipboard", result);
@@ -221,13 +229,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void RightAnswerForHumanMultiplicationExpressions(string typedString, double answer)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
Query expectedQueryWithKeyword = new("=" + typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).FirstOrDefault()?.Title;
- var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.Title;
+ var result = _main.Object.Query(expectedQuery).FirstOrDefault()?.Title;
+ var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.Title;
// Assert
Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), result);
@@ -242,17 +249,34 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
public void RightAnswerForLargeHexadecimalNumbers(string typedString, double answer)
{
// Setup
- Mock main = new();
Query expectedQuery = new(typedString);
Query expectedQueryWithKeyword = new("=" + typedString, "=");
// Act
- var result = main.Object.Query(expectedQuery).FirstOrDefault()?.Title;
- var resultWithKeyword = main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.Title;
+ var result = _main.Object.Query(expectedQuery).FirstOrDefault()?.Title;
+ var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).FirstOrDefault()?.Title;
// Assert
Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), result);
Assert.AreEqual(answer.ToString(CultureInfo.CurrentCulture), resultWithKeyword);
}
+
+ [DataTestMethod]
+ [DataRow("#", "#1+1=", true)]
+ [DataRow("#", "#1+1", false)]
+ [DataRow("#", "#1/0=", false)]
+ [DataRow("", "1+1=", false)]
+ public void HandleInputReplace(string actionKeyword, string query, bool shouldChangeQuery)
+ {
+ // Setup
+ Query expectedQuery = new(query, actionKeyword);
+ _main.Object.UpdateSettings(new PowerLauncherPluginSettings()); // Default settings
+
+ // Act
+ _main.Object.Query(expectedQuery);
+
+ // Assert
+ _api.Verify(api => api.ChangeQuery(It.IsAny(), It.IsAny()), shouldChangeQuery ? Times.Once : Times.Never);
+ }
}
}
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Main.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Main.cs
index 3a1d0fec78..fccb4ead7c 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Main.cs
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Main.cs
@@ -17,6 +17,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
{
public class Main : IPlugin, IPluginI18n, IDisposable, ISettingProvider
{
+ private const string InputUseEnglishFormat = nameof(InputUseEnglishFormat);
+ private const string OutputUseEnglishFormat = nameof(OutputUseEnglishFormat);
+ private const string ReplaceInput = nameof(ReplaceInput);
+
private static readonly CalculateEngine CalculateEngine = new CalculateEngine();
private PluginInitContext Context { get; set; }
@@ -25,6 +29,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
private bool _inputUseEnglishFormat;
private bool _outputUseEnglishFormat;
+ private bool _replaceInput;
public string Name => Resources.wox_plugin_calculator_plugin_name;
@@ -40,20 +45,27 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
public IEnumerable AdditionalOptions => new List()
{
// The number examples has to be created at runtime to prevent translation.
- new PluginAdditionalOption()
+ new PluginAdditionalOption
{
- Key = "InputUseEnglishFormat",
+ Key = InputUseEnglishFormat,
DisplayLabel = Resources.wox_plugin_calculator_in_en_format,
DisplayDescription = string.Format(CultureInfo.CurrentCulture, WoxPluginCalculatorInEnFormatDescription, 1000.55.ToString("N2", new CultureInfo("en-us"))),
Value = false,
},
- new PluginAdditionalOption()
+ new PluginAdditionalOption
{
- Key = "OutputUseEnglishFormat",
+ Key = OutputUseEnglishFormat,
DisplayLabel = Resources.wox_plugin_calculator_out_en_format,
DisplayDescription = string.Format(CultureInfo.CurrentCulture, WoxPluginCalculatorOutEnFormatDescription, 1000.55.ToString("G", new CultureInfo("en-us"))),
Value = false,
},
+ new PluginAdditionalOption
+ {
+ Key = ReplaceInput,
+ DisplayLabel = Resources.wox_plugin_calculator_replace_input,
+ DisplayDescription = Resources.wox_plugin_calculator_replace_input_description,
+ Value = true,
+ },
};
public List Query(Query query)
@@ -61,6 +73,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
ArgumentNullException.ThrowIfNull(query);
bool isGlobalQuery = string.IsNullOrEmpty(query.ActionKeyword);
+ bool replaceInput = _replaceInput && !isGlobalQuery && query.Search.EndsWith('=');
CultureInfo inputCulture = _inputUseEnglishFormat ? new CultureInfo("en-us") : CultureInfo.CurrentCulture;
CultureInfo outputCulture = _outputUseEnglishFormat ? new CultureInfo("en-us") : CultureInfo.CurrentCulture;
@@ -73,6 +86,11 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
NumberTranslator translator = NumberTranslator.Create(inputCulture, new CultureInfo("en-US"));
var input = translator.Translate(query.Search.Normalize(NormalizationForm.FormKC));
+ if (replaceInput)
+ {
+ input = input[..^1];
+ }
+
if (!CalculateHelper.InputValid(input))
{
return new List();
@@ -89,10 +107,16 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
// If errorMessage is not default then do error handling
return errorMessage == default ? new List() : ErrorHandler.OnError(IconPath, isGlobalQuery, query.RawQuery, errorMessage);
}
+ else if (replaceInput)
+ {
+ var pluginResult = ResultHelper.CreateResult(result.RoundedResult, IconPath, inputCulture, outputCulture);
+ Context.API.ChangeQuery($"{query.ActionKeyword} {pluginResult.QueryTextDisplay}");
+ return new List();
+ }
return new List
{
- ResultHelper.CreateResult(result.RoundedResult, IconPath, outputCulture),
+ ResultHelper.CreateResult(result.RoundedResult, IconPath, inputCulture, outputCulture),
};
}
catch (Mages.Core.ParseException)
@@ -157,18 +181,23 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
{
var inputUseEnglishFormat = false;
var outputUseEnglishFormat = false;
+ var replaceInput = true;
if (settings != null && settings.AdditionalOptions != null)
{
- var optionInputEn = settings.AdditionalOptions.FirstOrDefault(x => x.Key == "InputUseEnglishFormat");
+ var optionInputEn = settings.AdditionalOptions.FirstOrDefault(x => x.Key == InputUseEnglishFormat);
inputUseEnglishFormat = optionInputEn?.Value ?? inputUseEnglishFormat;
- var optionOutputEn = settings.AdditionalOptions.FirstOrDefault(x => x.Key == "OutputUseEnglishFormat");
+ var optionOutputEn = settings.AdditionalOptions.FirstOrDefault(x => x.Key == OutputUseEnglishFormat);
outputUseEnglishFormat = optionOutputEn?.Value ?? outputUseEnglishFormat;
+
+ var optionReplaceInput = settings.AdditionalOptions.FirstOrDefault(x => x.Key == ReplaceInput);
+ replaceInput = optionReplaceInput?.Value ?? replaceInput;
}
_inputUseEnglishFormat = inputUseEnglishFormat;
_outputUseEnglishFormat = outputUseEnglishFormat;
+ _replaceInput = replaceInput;
}
public void Dispose()
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs
index 3ac08d3ab9..d772c9c367 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.Designer.cs
@@ -185,5 +185,23 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
return ResourceManager.GetString("wox_plugin_calculator_plugin_name", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Replace input appending '='.
+ ///
+ public static string wox_plugin_calculator_replace_input {
+ get {
+ return ResourceManager.GetString("wox_plugin_calculator_replace_input", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When using direct activation, appending '=' to the expression will replace the input with the calculated result (e.g. =5*3-2=)..
+ ///
+ public static string wox_plugin_calculator_replace_input_description {
+ get {
+ return ResourceManager.GetString("wox_plugin_calculator_replace_input_description", resourceCulture);
+ }
+ }
}
}
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx
index a51a01975e..538b135c94 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx
@@ -161,4 +161,10 @@
Expression contains division by zero
+
+ Replace input if query ends with '='
+
+
+ When using direct activation, appending '=' to the expression will replace the input with the calculated result (e.g. '=5*3-2=' will change the query to '=13').
+
\ No newline at end of file
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs
index 0cc9033747..3dd1a6b137 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/ResultHelper.cs
@@ -12,12 +12,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
{
public static class ResultHelper
{
- public static Result CreateResult(CalculateResult result, string iconPath, CultureInfo culture)
+ public static Result CreateResult(CalculateResult result, string iconPath, CultureInfo inputCulture, CultureInfo outputCulture)
{
- return CreateResult(result.RoundedResult, iconPath, culture);
+ return CreateResult(result.RoundedResult, iconPath, inputCulture, outputCulture);
}
- public static Result CreateResult(decimal? roundedResult, string iconPath, CultureInfo culture)
+ public static Result CreateResult(decimal? roundedResult, string iconPath, CultureInfo inputCulture, CultureInfo outputCulture)
{
// Return null when the expression is not a valid calculator query.
if (roundedResult == null)
@@ -28,11 +28,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
return new Result
{
// Using CurrentCulture since this is user facing
- Title = roundedResult?.ToString(culture),
+ Title = roundedResult?.ToString(outputCulture),
IcoPath = iconPath,
Score = 300,
SubTitle = Properties.Resources.wox_plugin_calculator_copy_number_to_clipboard,
- Action = c => Action(roundedResult, culture),
+ Action = c => Action(roundedResult, outputCulture),
+ QueryTextDisplay = roundedResult?.ToString(inputCulture),
};
}
diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ResultHelper.cs
index 2714d6e470..77a7f55be7 100644
--- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ResultHelper.cs
+++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ResultHelper.cs
@@ -58,7 +58,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
result.Action = (_) => ContextMenuHelper.TryToOpenInRegistryEditor(entry);
result.ContextData = entry;
- result.ToolTipData = new ToolTipData(Resources.RegistryKey, $"{Resources.KeyName}\t{result.Title}");
+ result.ToolTipData = new ToolTipData(Resources.RegistryKey, $"{Resources.KeyName} {result.Title}");
resultList.Add(result);
}
@@ -198,10 +198,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper
/// A tool-tip text
private static string GetToolTipTextForRegistryValue(RegistryKey key, KeyValuePair valueEntry)
{
- return $"{Resources.KeyName}\t{key.Name}{Environment.NewLine}"
- + $"{Resources.Name}\t{valueEntry.Key}{Environment.NewLine}"
- + $"{Resources.Type}\t{ValueHelper.GetType(key, valueEntry.Key)}{Environment.NewLine}"
- + $"{Resources.Value}\t{ValueHelper.GetValue(key, valueEntry.Key)}";
+ return $"{Resources.KeyName} {key.Name}{Environment.NewLine}"
+ + $"{Resources.Name} {valueEntry.Key}{Environment.NewLine}"
+ + $"{Resources.Type} {ValueHelper.GetType(key, valueEntry.Key)}{Environment.NewLine}"
+ + $"{Resources.Value} {ValueHelper.GetValue(key, valueEntry.Key)}";
}
///
diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs
index 4e62d9d407..2fa2699953 100644
--- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs
+++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs
@@ -842,9 +842,6 @@ namespace PowerLauncher
{
if (_viewModel.Plugins.Count > 0 && _viewModel.SelectedPlugin != null)
{
- // Needed to update UI in case the user choose the same plugin multiple times
- _viewModel.ChangeQueryText(string.Empty);
-
_viewModel.ChangeQueryText(_viewModel.SelectedPlugin.Metadata.ActionKeyword, true);
SearchBox.QueryTextBox.Focus();
diff --git a/src/modules/launcher/PowerLauncher/PublicAPIInstance.cs b/src/modules/launcher/PowerLauncher/PublicAPIInstance.cs
index 4357270a6b..d13f28cccf 100644
--- a/src/modules/launcher/PowerLauncher/PublicAPIInstance.cs
+++ b/src/modules/launcher/PowerLauncher/PublicAPIInstance.cs
@@ -49,7 +49,10 @@ namespace Wox
public void ChangeQuery(string query, bool requery = false)
{
- _mainVM.ChangeQueryText(query, requery);
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ _mainVM.ChangeQueryText(query, requery);
+ });
}
public void CheckForNewUpdate()
diff --git a/src/modules/launcher/PowerLauncher/ResultList.xaml b/src/modules/launcher/PowerLauncher/ResultList.xaml
index 0c8f69b21e..7eda85a709 100644
--- a/src/modules/launcher/PowerLauncher/ResultList.xaml
+++ b/src/modules/launcher/PowerLauncher/ResultList.xaml
@@ -85,12 +85,14 @@
FontWeight="SemiBold"
Style="{DynamicResource CollapsableTextblock}"
Text="{Binding Result.ToolTipData.Title}"
+ TextAlignment="Left"
TextWrapping="Wrap" />
diff --git a/src/modules/launcher/PowerLauncher/ResultList.xaml.cs b/src/modules/launcher/PowerLauncher/ResultList.xaml.cs
index 9cc6d8e1aa..020cf919fb 100644
--- a/src/modules/launcher/PowerLauncher/ResultList.xaml.cs
+++ b/src/modules/launcher/PowerLauncher/ResultList.xaml.cs
@@ -22,7 +22,7 @@ namespace PowerLauncher
// From https://learn.microsoft.com/dotnet/desktop/wpf/data/how-to-find-datatemplate-generated-elements
private TypeChildItem FindVisualChild(DependencyObject obj)
- where TypeChildItem : DependencyObject
+ where TypeChildItem : DependencyObject
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)
{
@@ -80,20 +80,22 @@ namespace PowerLauncher
}
}
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using StringComparison.InvariantCulture since this is user facing")]
private void ToolTip_Opened(object sender, RoutedEventArgs e)
{
- if (string.Equals(sender.GetType().FullName, "System.Windows.Controls.ToolTip", System.StringComparison.InvariantCulture))
+ if (string.Equals(sender.GetType().FullName, "System.Windows.Controls.ToolTip", System.StringComparison.Ordinal))
{
- HideCurrentToolTip();
- _previouslyOpenedToolTip = (ToolTip)sender;
+ var openedToolTip = (ToolTip)sender;
+ if (_previouslyOpenedToolTip != openedToolTip)
+ {
+ HideCurrentToolTip();
+ _previouslyOpenedToolTip = openedToolTip;
+ }
}
}
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1309:Use ordinal string comparison", Justification = "Using StringComparison.InvariantCulture since this is user facing")]
private void SuggestionsListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
- if (string.Equals(((ListView)e.OriginalSource).Name, "SuggestionsList", System.StringComparison.InvariantCulture))
+ if (string.Equals(((ListView)e.OriginalSource).Name, "SuggestionsList", System.StringComparison.Ordinal))
{
HideCurrentToolTip();
}
diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs
index 0e81bcaa75..3b65c8ed7b 100644
--- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs
+++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs
@@ -9,7 +9,6 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
-using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@@ -380,8 +379,15 @@ namespace PowerLauncher.ViewModel
/// Optional Parameter that if true, will automatically execute a query against the updated text
public void ChangeQueryText(string queryText, bool requery = false)
{
+ var sameQueryText = SystemQueryText == queryText;
+
SystemQueryText = queryText;
+ if (sameQueryText)
+ {
+ OnPropertyChanged(nameof(SystemQueryText));
+ }
+
if (requery)
{
QueryText = queryText;
diff --git a/src/modules/pasteplain/PastePlainModuleInterface/PastePlainModuleInterface.vcxproj b/src/modules/pasteplain/PastePlainModuleInterface/PastePlainModuleInterface.vcxproj
index 5eeeafeb1b..22371b8947 100644
--- a/src/modules/pasteplain/PastePlainModuleInterface/PastePlainModuleInterface.vcxproj
+++ b/src/modules/pasteplain/PastePlainModuleInterface/PastePlainModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -73,13 +73,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/pasteplain/PastePlainModuleInterface/dllmain.cpp b/src/modules/pasteplain/PastePlainModuleInterface/dllmain.cpp
index 32da5d0f4b..ba463b3718 100644
--- a/src/modules/pasteplain/PastePlainModuleInterface/dllmain.cpp
+++ b/src/modules/pasteplain/PastePlainModuleInterface/dllmain.cpp
@@ -355,6 +355,13 @@ private:
try_inject_modifier_key_restore(inputs, VK_LMENU);
try_inject_modifier_key_restore(inputs, VK_RMENU);
+ // After restoring the modifier keys send a dummy key to prevent Start Menu from activating
+ INPUT dummyEvent = {};
+ dummyEvent.type = INPUT_KEYBOARD;
+ dummyEvent.ki.wVk = 0xFF;
+ dummyEvent.ki.dwFlags = KEYEVENTF_KEYUP;
+ inputs.push_back(dummyEvent);
+
auto uSent = SendInput(static_cast(inputs.size()), inputs.data(), sizeof(INPUT));
if (uSent != inputs.size())
{
diff --git a/src/modules/pasteplain/PastePlainModuleInterface/packages.config b/src/modules/pasteplain/PastePlainModuleInterface/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/pasteplain/PastePlainModuleInterface/packages.config
+++ b/src/modules/pasteplain/PastePlainModuleInterface/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/peek/Peek.Common/Helpers/ReadableStringHelper.cs b/src/modules/peek/Peek.Common/Helpers/ReadableStringHelper.cs
index 0ea75816e9..808d654772 100644
--- a/src/modules/peek/Peek.Common/Helpers/ReadableStringHelper.cs
+++ b/src/modules/peek/Peek.Common/Helpers/ReadableStringHelper.cs
@@ -13,7 +13,7 @@ namespace Peek.Common.Helpers
private const int MaxDigitsToDisplay = 3;
private const int PowerFactor = 1024;
- public static string BytesToReadableString(ulong bytes)
+ public static string BytesToReadableString(ulong bytes, bool showTotalBytes = true)
{
string totalBytesDisplays = (bytes == 1) ?
ResourceLoaderInstance.ResourceLoader.GetString("ReadableString_ByteString") :
@@ -41,7 +41,7 @@ namespace Peek.Common.Helpers
string formatSpecifier = GetFormatSpecifierString(index, number, bytes, precision);
- return bytes == 0
+ return bytes == 0 || !showTotalBytes
? string.Format(CultureInfo.CurrentCulture, formatSpecifier, number)
: string.Format(CultureInfo.CurrentCulture, formatSpecifier + totalBytesDisplays, number, bytes);
}
diff --git a/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml b/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml
new file mode 100644
index 0000000000..59bd179d0a
--- /dev/null
+++ b/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml.cs b/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml.cs
new file mode 100644
index 0000000000..5361b7ddd1
--- /dev/null
+++ b/src/modules/peek/Peek.FilePreviewer/Controls/DriveControl.xaml.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Globalization;
+using CommunityToolkit.Mvvm.ComponentModel;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Peek.Common.Helpers;
+using Peek.FilePreviewer.Previewers.Drive.Models;
+using Windows.Foundation;
+
+namespace Peek.FilePreviewer.Controls
+{
+ [INotifyPropertyChanged]
+ public sealed partial class DriveControl : UserControl
+ {
+ [ObservableProperty]
+ private Rect _spaceBarClip;
+
+ public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
+ nameof(Source),
+ typeof(DrivePreviewData),
+ typeof(DriveControl),
+ new PropertyMetadata(null, new PropertyChangedCallback((d, e) => ((DriveControl)d).UpdateSpaceBar())));
+
+ public DrivePreviewData? Source
+ {
+ get { return (DrivePreviewData)GetValue(SourceProperty); }
+ set { SetValue(SourceProperty, value); }
+ }
+
+ public DriveControl()
+ {
+ this.InitializeComponent();
+ }
+
+ public string FormatType(string type)
+ {
+ return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type"), type);
+ }
+
+ public string FormatFileSystem(string fileSystem)
+ {
+ return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("Drive_FileSystem"), fileSystem);
+ }
+
+ public string FormatCapacity(ulong capacity)
+ {
+ return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("Drive_Capacity"), ReadableStringHelper.BytesToReadableString(capacity, false));
+ }
+
+ public string FormatFreeSpace(ulong freeSpace)
+ {
+ return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("Drive_FreeSpace"), ReadableStringHelper.BytesToReadableString(freeSpace, false));
+ }
+
+ public string FormatUsedSpace(ulong usedSpace)
+ {
+ return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("Drive_UsedSpace"), ReadableStringHelper.BytesToReadableString(usedSpace, false));
+ }
+
+ private void SizeChanged_Handler(object sender, SizeChangedEventArgs e)
+ {
+ UpdateSpaceBar();
+ }
+
+ private void UpdateSpaceBar()
+ {
+ if (Source != null && Source.PercentageUsage > 0)
+ {
+ var usedWidth = CapacityBar.ActualWidth * Source!.PercentageUsage;
+ SpaceBarClip = new(0, 0, usedWidth, 20);
+ }
+ else
+ {
+ SpaceBarClip = new(0, 0, 0, 0);
+ }
+ }
+ }
+}
diff --git a/src/modules/peek/Peek.FilePreviewer/FilePreview.xaml b/src/modules/peek/Peek.FilePreviewer/FilePreview.xaml
index 674cd85079..db143e70ec 100644
--- a/src/modules/peek/Peek.FilePreviewer/FilePreview.xaml
+++ b/src/modules/peek/Peek.FilePreviewer/FilePreview.xaml
@@ -70,6 +70,11 @@
Source="{x:Bind ArchivePreviewer.Tree, Mode=OneWay}"
Visibility="{x:Bind IsPreviewVisible(ArchivePreviewer, Previewer.State), Mode=OneWay}" />
+
+
Previewer as IShellPreviewHandlerPreviewer;
+ public IDrivePreviewer? DrivePreviewer => Previewer as IDrivePreviewer;
+
public IUnsupportedFilePreviewer? UnsupportedFilePreviewer => Previewer as IUnsupportedFilePreviewer;
public IFileSystemItem Item
@@ -152,12 +154,14 @@ namespace Peek.FilePreviewer
VideoPreview.Visibility = Visibility.Collapsed;
BrowserPreview.Visibility = Visibility.Collapsed;
ArchivePreview.Visibility = Visibility.Collapsed;
+ DrivePreview.Visibility = Visibility.Collapsed;
UnsupportedFilePreview.Visibility = Visibility.Collapsed;
ImagePreview.FlowDirection = FlowDirection.LeftToRight;
VideoPreview.FlowDirection = FlowDirection.LeftToRight;
BrowserPreview.FlowDirection = FlowDirection.LeftToRight;
ArchivePreview.FlowDirection = FlowDirection.LeftToRight;
+ DrivePreview.FlowDirection = FlowDirection.LeftToRight;
UnsupportedFilePreview.FlowDirection = FlowDirection.LeftToRight;
return;
@@ -224,6 +228,7 @@ namespace Peek.FilePreviewer
ImagePreview.Source = null;
ArchivePreview.Source = null;
BrowserPreview.Source = null;
+ DrivePreview.Source = null;
ShellPreviewHandlerPreviewer?.Clear();
ShellPreviewHandlerPreview.Source = null;
diff --git a/src/modules/peek/Peek.FilePreviewer/Peek.FilePreviewer.csproj b/src/modules/peek/Peek.FilePreviewer/Peek.FilePreviewer.csproj
index 9a7058ee44..8c411077fd 100644
--- a/src/modules/peek/Peek.FilePreviewer/Peek.FilePreviewer.csproj
+++ b/src/modules/peek/Peek.FilePreviewer/Peek.FilePreviewer.csproj
@@ -18,6 +18,7 @@
+
@@ -46,6 +47,12 @@
+
+
+ MSBuild:Compile
+
+
+
MSBuild:Compile
diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/DrivePreviewer.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/DrivePreviewer.cs
new file mode 100644
index 0000000000..4408f64fe6
--- /dev/null
+++ b/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/DrivePreviewer.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.ComponentModel;
+using Microsoft.UI.Xaml.Media.Imaging;
+using Peek.Common.Helpers;
+using Peek.Common.Models;
+using Peek.FilePreviewer.Models;
+using Peek.FilePreviewer.Previewers.Drive.Models;
+using Peek.FilePreviewer.Previewers.Helpers;
+using Peek.FilePreviewer.Previewers.Interfaces;
+using Windows.Foundation;
+
+namespace Peek.FilePreviewer.Previewers.Drive
+{
+ public partial class DrivePreviewer : ObservableObject, IDrivePreviewer
+ {
+ [ObservableProperty]
+ private PreviewState _state;
+
+ [ObservableProperty]
+ private DrivePreviewData? _preview;
+
+ private IFileSystemItem Item { get; }
+
+ public DrivePreviewer(IFileSystemItem file)
+ {
+ Item = file;
+ }
+
+ public async Task CopyAsync()
+ {
+ // Nothing to copy for a drive
+ await Task.CompletedTask;
+ }
+
+ public Task GetPreviewSizeAsync(CancellationToken cancellationToken)
+ {
+ var size = new Size(680, 400);
+ var previewSize = new PreviewSize { MonitorSize = size, UseEffectivePixels = true };
+ return Task.FromResult(previewSize);
+ }
+
+ public async Task LoadPreviewAsync(CancellationToken cancellationToken)
+ {
+ State = PreviewState.Loading;
+
+ var preview = new DrivePreviewData();
+ preview.Name = Item.Name;
+
+ var drive = new DriveInfo(Item.Path);
+ preview.Type = GetDriveTypeDescription(drive.DriveType);
+
+ if (drive.IsReady)
+ {
+ preview.FileSystem = drive.DriveFormat;
+
+ preview.Capacity = drive.TotalSize > 0
+ ? (ulong)drive.TotalSize
+ : 0;
+
+ preview.FreeSpace = drive.AvailableFreeSpace > 0
+ ? (ulong)drive.AvailableFreeSpace
+ : 0;
+
+ preview.UsedSpace = preview.Capacity - preview.FreeSpace;
+
+ if (preview.Capacity > 0)
+ {
+ preview.PercentageUsage = (double)preview.UsedSpace / preview.Capacity;
+ }
+ }
+ else
+ {
+ preview.FileSystem = ResourceLoaderInstance.ResourceLoader.GetString("Drive_Unknown");
+ }
+
+ cancellationToken.ThrowIfCancellationRequested();
+ var iconBitmap = await IconHelper.GetIconAsync(Item.Path, cancellationToken);
+ preview.IconPreview = iconBitmap ?? new SvgImageSource(new Uri("ms-appx:///Assets/Peek/DefaultFileIcon.svg"));
+
+ Preview = preview;
+ State = PreviewState.Loaded;
+ }
+
+ public static bool IsPathSupported(string path)
+ {
+ return DriveInfo.GetDrives().Any(d => d.Name == path);
+ }
+
+ private string GetDriveTypeDescription(DriveType driveType) => driveType switch
+ {
+ DriveType.Unknown => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Unknown"),
+ DriveType.NoRootDirectory => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Unknown"), // You shouldn't be able to preview an unmounted drives
+ DriveType.Removable => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type_Removable"),
+ DriveType.Fixed => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type_Fixed"),
+ DriveType.Network => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type_Network"),
+ DriveType.CDRom => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type_Optical"),
+ DriveType.Ram => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Type_RAM_Disk"),
+ _ => ResourceLoaderInstance.ResourceLoader.GetString("Drive_Unknown"),
+ };
+ }
+}
diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/Models/DrivePreviewData.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/Models/DrivePreviewData.cs
new file mode 100644
index 0000000000..daf617952a
--- /dev/null
+++ b/src/modules/peek/Peek.FilePreviewer/Previewers/Drive/Models/DrivePreviewData.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using CommunityToolkit.Mvvm.ComponentModel;
+using Microsoft.UI.Xaml.Media;
+
+namespace Peek.FilePreviewer.Previewers.Drive.Models
+{
+ public partial class DrivePreviewData : ObservableObject
+ {
+ [ObservableProperty]
+ private ImageSource? iconPreview;
+
+ [ObservableProperty]
+ private string _name;
+
+ [ObservableProperty]
+ private string _type;
+
+ [ObservableProperty]
+ private string _fileSystem;
+
+ [ObservableProperty]
+ private ulong _capacity;
+
+ [ObservableProperty]
+ private ulong _usedSpace;
+
+ [ObservableProperty]
+ private ulong _freeSpace;
+
+ ///
+ /// Represents the usage percentage of the drive, ranging from 0 to 1
+ ///
+ [ObservableProperty]
+ private double _percentageUsage;
+
+ public DrivePreviewData()
+ {
+ Name = string.Empty;
+ Type = string.Empty;
+ FileSystem = string.Empty;
+ }
+ }
+}
diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/Interfaces/IDrivePreviewer.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/Interfaces/IDrivePreviewer.cs
new file mode 100644
index 0000000000..2624311955
--- /dev/null
+++ b/src/modules/peek/Peek.FilePreviewer/Previewers/Interfaces/IDrivePreviewer.cs
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Peek.FilePreviewer.Previewers.Drive.Models;
+
+namespace Peek.FilePreviewer.Previewers.Interfaces
+{
+ public interface IDrivePreviewer : IPreviewer
+ {
+ public DrivePreviewData? Preview { get; }
+ }
+}
diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/PreviewerFactory.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/PreviewerFactory.cs
index 661fbb4360..089b96bff5 100644
--- a/src/modules/peek/Peek.FilePreviewer/Previewers/PreviewerFactory.cs
+++ b/src/modules/peek/Peek.FilePreviewer/Previewers/PreviewerFactory.cs
@@ -8,6 +8,7 @@ using Peek.Common.Extensions;
using Peek.Common.Models;
using Peek.FilePreviewer.Models;
using Peek.FilePreviewer.Previewers.Archives;
+using Peek.FilePreviewer.Previewers.Drive;
using Peek.UI.Telemetry.Events;
namespace Peek.FilePreviewer.Previewers
@@ -43,6 +44,10 @@ namespace Peek.FilePreviewer.Previewers
{
return new ShellPreviewHandlerPreviewer(file);
}
+ else if (DrivePreviewer.IsPathSupported(file.Path))
+ {
+ return new DrivePreviewer(file);
+ }
// Other previewer types check their supported file types here
return CreateDefaultPreviewer(file);
diff --git a/src/modules/peek/Peek.UI/Helpers/FileExplorerHelper.cs b/src/modules/peek/Peek.UI/Helpers/FileExplorerHelper.cs
index b2bb1234cd..2c3931c218 100644
--- a/src/modules/peek/Peek.UI/Helpers/FileExplorerHelper.cs
+++ b/src/modules/peek/Peek.UI/Helpers/FileExplorerHelper.cs
@@ -63,21 +63,23 @@ namespace Peek.UI.Helpers
var shell = new Shell32.Shell();
ShellWindows shellWindows = shell.Windows();
- foreach (IWebBrowserApp webBrowserApp in shell.Windows())
+ foreach (IWebBrowserApp webBrowserApp in shellWindows)
{
- var shellFolderView = (Shell32.IShellFolderViewDual2)webBrowserApp.Document;
- var folderTitle = shellFolderView.Folder.Title;
-
- if (webBrowserApp.HWND == foregroundWindowHandle)
+ if (webBrowserApp.Document is Shell32.IShellFolderViewDual2 shellFolderView)
{
- var serviceProvider = (IServiceProvider)webBrowserApp;
- var shellBrowser = (IShellBrowser)serviceProvider.QueryService(PInvoke.SID_STopLevelBrowser, typeof(IShellBrowser).GUID);
- shellBrowser.GetWindow(out IntPtr shellBrowserHandle);
+ var folderTitle = shellFolderView.Folder.Title;
- if (activeTab == shellBrowserHandle)
+ if (webBrowserApp.HWND == foregroundWindowHandle)
{
- shellItemArray = GetShellItemArray(shellBrowser, onlySelectedFiles);
- return shellItemArray;
+ var serviceProvider = (IServiceProvider)webBrowserApp;
+ var shellBrowser = (IShellBrowser)serviceProvider.QueryService(PInvoke.SID_STopLevelBrowser, typeof(IShellBrowser).GUID);
+ shellBrowser.GetWindow(out IntPtr shellBrowserHandle);
+
+ if (activeTab == shellBrowserHandle)
+ {
+ shellItemArray = GetShellItemArray(shellBrowser, onlySelectedFiles);
+ return shellItemArray;
+ }
}
}
}
diff --git a/src/modules/peek/Peek.UI/Strings/en-us/Resources.resw b/src/modules/peek/Peek.UI/Strings/en-us/Resources.resw
index 726796babb..dba48568a3 100644
--- a/src/modules/peek/Peek.UI/Strings/en-us/Resources.resw
+++ b/src/modules/peek/Peek.UI/Strings/en-us/Resources.resw
@@ -265,4 +265,45 @@
{0} - Peek
Title of the Peek window. {0} is the name of the currently previewed item."Peek" is the name of the utility.
+
+ {0} free
+ {0} is the free space of the drive
+
+
+ {0} used
+ {0} is the used space of the drive
+
+
+ Capacity: {0}
+ {0} is the capacity of the drive
+
+
+ File System: {0}
+ {0} is the file system of the drive
+
+
+ Type: {0}
+ {0} is the type of the drive
+
+
+ Fixed
+
+
+ Network
+
+
+ Optical
+ "Optical" indicates CD or DVD drives
+
+
+ RAM Disk
+
+
+ Removable
+ "Removal" indicates USB or external hard drives
+
+
+ Unknown
+ Used for unknown drive type or file system
+
\ No newline at end of file
diff --git a/src/modules/peek/peek/peek.vcxproj b/src/modules/peek/peek/peek.vcxproj
index 95fa2bf1e5..4dae4791d3 100644
--- a/src/modules/peek/peek/peek.vcxproj
+++ b/src/modules/peek/peek/peek.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{a1425b53-3d61-4679-8623-e64a0d3d0a48}
@@ -60,7 +60,7 @@
-
+
@@ -70,8 +70,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs
index 6ad6eb59c5..0f87a8c0a4 100644
--- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs
+++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs
@@ -38,6 +38,7 @@ namespace PowerAccent.Core
PT,
RO,
SK,
+ SL,
SP,
SR,
SV,
@@ -79,6 +80,7 @@ namespace PowerAccent.Core
Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese
Language.RO => GetDefaultLetterKeyRO(letter), // Romanian
Language.SK => GetDefaultLetterKeySK(letter), // Slovak
+ Language.SL => GetDefaultLetterKeySL(letter), // Slovenian
Language.SP => GetDefaultLetterKeySP(letter), // Spain
Language.SR => GetDefaultLetterKeySR(letter), // Serbian
Language.SV => GetDefaultLetterKeySV(letter), // Swedish
@@ -123,6 +125,7 @@ namespace PowerAccent.Core
.Union(GetDefaultLetterKeyPT(letter))
.Union(GetDefaultLetterKeyRO(letter))
.Union(GetDefaultLetterKeySK(letter))
+ .Union(GetDefaultLetterKeySL(letter))
.Union(GetDefaultLetterKeySP(letter))
.Union(GetDefaultLetterKeySR(letter))
.Union(GetDefaultLetterKeySV(letter))
@@ -735,5 +738,18 @@ namespace PowerAccent.Core
_ => Array.Empty(),
};
}
+
+ // Slovenian
+ private static string[] GetDefaultLetterKeySL(LetterKey letter)
+ {
+ return letter switch
+ {
+ LetterKey.VK_C => new[] { "č" },
+ LetterKey.VK_E => new[] { "€" },
+ LetterKey.VK_S => new[] { "š" },
+ LetterKey.VK_Z => new[] { "ž" },
+ _ => Array.Empty(),
+ };
+ }
}
}
diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/PowerAccentKeyboardService.vcxproj b/src/modules/poweraccent/PowerAccentKeyboardService/PowerAccentKeyboardService.vcxproj
index c8ecde8515..38592d22d9 100644
--- a/src/modules/poweraccent/PowerAccentKeyboardService/PowerAccentKeyboardService.vcxproj
+++ b/src/modules/poweraccent/PowerAccentKeyboardService/PowerAccentKeyboardService.vcxproj
@@ -1,6 +1,6 @@
-
+
true
true
@@ -120,13 +120,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/poweraccent/PowerAccentKeyboardService/packages.config b/src/modules/poweraccent/PowerAccentKeyboardService/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/poweraccent/PowerAccentKeyboardService/packages.config
+++ b/src/modules/poweraccent/PowerAccentKeyboardService/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj b/src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj
index 0e9ef9a69c..e60d4a42d9 100644
--- a/src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj
+++ b/src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{34A354C5-23C7-4343-916C-C52DAF4FC39D}
@@ -67,15 +67,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/packages.config b/src/modules/poweraccent/PowerAccentModuleInterface/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/poweraccent/PowerAccentModuleInterface/packages.config
+++ b/src/modules/poweraccent/PowerAccentModuleInterface/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj
index 053695376f..a5a93705d7 100644
--- a/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj
+++ b/src/modules/powerrename/PowerRenameContextMenu/PowerRenameContextMenu.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -121,15 +121,15 @@ MakeAppx.exe pack /d . /p $(OutDir)PowerRenameContextMenuPackage.msix /nv
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/powerrename/PowerRenameContextMenu/packages.config b/src/modules/powerrename/PowerRenameContextMenu/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/powerrename/PowerRenameContextMenu/packages.config
+++ b/src/modules/powerrename/PowerRenameContextMenu/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj
index 2f911fcd22..c4d45a2c8b 100644
--- a/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj
+++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameUI.vcxproj
@@ -2,7 +2,7 @@
-
+
true
true
@@ -203,7 +203,7 @@
-
+
@@ -215,8 +215,8 @@
-
-
+
+
diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/App.xaml b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/App.xaml
index 8ee568b2a6..b385360c1d 100644
--- a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/App.xaml
+++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/App.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
+ xmlns:controls="using:Microsoft.UI.Xaml.Controls"
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">
@@ -11,11 +12,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
-
-
-
-
-
+ Background="{ThemeResource AccentSplitButtonBorderBrushDivider}" />
-
-
-
-
-
-
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
diff --git a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml
index c3c30cbeb9..83610f1a3b 100644
--- a/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml
+++ b/src/modules/powerrename/PowerRenameUILib/PowerRenameXAML/MainWindow.xaml
@@ -593,7 +593,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="button_rename_Click"
- Style="{StaticResource SplitAccentButtonStyle}">
+ Style="{StaticResource AccentSplitButtonStyle}">
diff --git a/src/modules/powerrename/PowerRenameUILib/packages.config b/src/modules/powerrename/PowerRenameUILib/packages.config
index 040eedefa7..f331e94090 100644
--- a/src/modules/powerrename/PowerRenameUILib/packages.config
+++ b/src/modules/powerrename/PowerRenameUILib/packages.config
@@ -2,7 +2,7 @@
-
+
diff --git a/src/modules/powerrename/dll/PowerRenameExt.vcxproj b/src/modules/powerrename/dll/PowerRenameExt.vcxproj
index 7e07bca332..0e269b53f1 100644
--- a/src/modules/powerrename/dll/PowerRenameExt.vcxproj
+++ b/src/modules/powerrename/dll/PowerRenameExt.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -73,7 +73,7 @@
-
+
@@ -81,8 +81,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/powerrename/dll/packages.config b/src/modules/powerrename/dll/packages.config
index 17131cfe2f..ecc3202cd3 100644
--- a/src/modules/powerrename/dll/packages.config
+++ b/src/modules/powerrename/dll/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/powerrename/lib/PowerRenameLib.vcxproj b/src/modules/powerrename/lib/PowerRenameLib.vcxproj
index d55914f19e..143f531169 100644
--- a/src/modules/powerrename/lib/PowerRenameLib.vcxproj
+++ b/src/modules/powerrename/lib/PowerRenameLib.vcxproj
@@ -1,6 +1,6 @@
-
+
{51920F1F-C28C-4ADF-8660-4238766796C2}
Win32Proj
@@ -76,7 +76,7 @@
-
+
@@ -84,8 +84,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/powerrename/lib/packages.config b/src/modules/powerrename/lib/packages.config
index 17131cfe2f..ecc3202cd3 100644
--- a/src/modules/powerrename/lib/packages.config
+++ b/src/modules/powerrename/lib/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj
index 21f6f06ada..edb4c22d36 100644
--- a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj
+++ b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}
@@ -66,7 +66,7 @@
-
+
@@ -74,8 +74,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/powerrename/testapp/packages.config b/src/modules/powerrename/testapp/packages.config
index 17131cfe2f..ecc3202cd3 100644
--- a/src/modules/powerrename/testapp/packages.config
+++ b/src/modules/powerrename/testapp/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj
index 2d1a18246d..542019a9ee 100644
--- a/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj
+++ b/src/modules/powerrename/unittests/PowerRenameLibUnitTests.vcxproj
@@ -1,6 +1,6 @@
-
+
{2151F984-E006-4A9F-92EF-C6DDE3DC8413}
Win32Proj
@@ -76,7 +76,7 @@
-
+
@@ -84,8 +84,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/powerrename/unittests/packages.config b/src/modules/powerrename/unittests/packages.config
index 17131cfe2f..ecc3202cd3 100644
--- a/src/modules/powerrename/unittests/packages.config
+++ b/src/modules/powerrename/unittests/packages.config
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/GcodePreviewHandlerCpp/GcodePreviewHandlerCpp.vcxproj b/src/modules/previewpane/GcodePreviewHandlerCpp/GcodePreviewHandlerCpp.vcxproj
index 094c55e6cb..8881cce555 100644
--- a/src/modules/previewpane/GcodePreviewHandlerCpp/GcodePreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/GcodePreviewHandlerCpp/GcodePreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -109,13 +109,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/GcodePreviewHandlerCpp/packages.config b/src/modules/previewpane/GcodePreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/GcodePreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/GcodePreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/GcodeThumbnailProviderCpp/GcodeThumbnailProviderCpp.vcxproj b/src/modules/previewpane/GcodeThumbnailProviderCpp/GcodeThumbnailProviderCpp.vcxproj
index 9b2e7d8b11..9e3f08dbf7 100644
--- a/src/modules/previewpane/GcodeThumbnailProviderCpp/GcodeThumbnailProviderCpp.vcxproj
+++ b/src/modules/previewpane/GcodeThumbnailProviderCpp/GcodeThumbnailProviderCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,15 +106,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/GcodeThumbnailProviderCpp/packages.config b/src/modules/previewpane/GcodeThumbnailProviderCpp/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/GcodeThumbnailProviderCpp/packages.config
+++ b/src/modules/previewpane/GcodeThumbnailProviderCpp/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/MarkdownPreviewHandlerCpp/MarkdownPreviewHandlerCpp.vcxproj b/src/modules/previewpane/MarkdownPreviewHandlerCpp/MarkdownPreviewHandlerCpp.vcxproj
index 642ffa77a7..906194f470 100644
--- a/src/modules/previewpane/MarkdownPreviewHandlerCpp/MarkdownPreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/MarkdownPreviewHandlerCpp/MarkdownPreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -118,13 +118,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/MarkdownPreviewHandlerCpp/packages.config b/src/modules/previewpane/MarkdownPreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/MarkdownPreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/MarkdownPreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/MonacoPreviewHandlerCpp/MonacoPreviewHandlerCpp.vcxproj b/src/modules/previewpane/MonacoPreviewHandlerCpp/MonacoPreviewHandlerCpp.vcxproj
index 3095a6f374..265c3a8c11 100644
--- a/src/modules/previewpane/MonacoPreviewHandlerCpp/MonacoPreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/MonacoPreviewHandlerCpp/MonacoPreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -109,13 +109,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/MonacoPreviewHandlerCpp/packages.config b/src/modules/previewpane/MonacoPreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/MonacoPreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/MonacoPreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/PdfPreviewHandlerCpp/PdfPreviewHandlerCpp.vcxproj b/src/modules/previewpane/PdfPreviewHandlerCpp/PdfPreviewHandlerCpp.vcxproj
index 242a7c25ca..cdf06b4431 100644
--- a/src/modules/previewpane/PdfPreviewHandlerCpp/PdfPreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/PdfPreviewHandlerCpp/PdfPreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,13 +106,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/PdfPreviewHandlerCpp/packages.config b/src/modules/previewpane/PdfPreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/PdfPreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/PdfPreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/PdfThumbnailProviderCpp/PdfThumbnailProviderCpp.vcxproj b/src/modules/previewpane/PdfThumbnailProviderCpp/PdfThumbnailProviderCpp.vcxproj
index fc45a56d67..0219414765 100644
--- a/src/modules/previewpane/PdfThumbnailProviderCpp/PdfThumbnailProviderCpp.vcxproj
+++ b/src/modules/previewpane/PdfThumbnailProviderCpp/PdfThumbnailProviderCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,15 +106,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/PdfThumbnailProviderCpp/packages.config b/src/modules/previewpane/PdfThumbnailProviderCpp/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/PdfThumbnailProviderCpp/packages.config
+++ b/src/modules/previewpane/PdfThumbnailProviderCpp/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/QoiPreviewHandlerCpp/QoiPreviewHandlerCpp.vcxproj b/src/modules/previewpane/QoiPreviewHandlerCpp/QoiPreviewHandlerCpp.vcxproj
index 28307d2d30..4da8cdb196 100644
--- a/src/modules/previewpane/QoiPreviewHandlerCpp/QoiPreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/QoiPreviewHandlerCpp/QoiPreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -109,13 +109,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/QoiPreviewHandlerCpp/packages.config b/src/modules/previewpane/QoiPreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/QoiPreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/QoiPreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/QoiThumbnailProviderCpp/QoiThumbnailProviderCpp.vcxproj b/src/modules/previewpane/QoiThumbnailProviderCpp/QoiThumbnailProviderCpp.vcxproj
index ac1ae6fac5..ebfe79391b 100644
--- a/src/modules/previewpane/QoiThumbnailProviderCpp/QoiThumbnailProviderCpp.vcxproj
+++ b/src/modules/previewpane/QoiThumbnailProviderCpp/QoiThumbnailProviderCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,15 +106,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/QoiThumbnailProviderCpp/packages.config b/src/modules/previewpane/QoiThumbnailProviderCpp/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/QoiThumbnailProviderCpp/packages.config
+++ b/src/modules/previewpane/QoiThumbnailProviderCpp/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/StlThumbnailProviderCpp/StlThumbnailProviderCpp.vcxproj b/src/modules/previewpane/StlThumbnailProviderCpp/StlThumbnailProviderCpp.vcxproj
index 337a8c4b53..e994e57665 100644
--- a/src/modules/previewpane/StlThumbnailProviderCpp/StlThumbnailProviderCpp.vcxproj
+++ b/src/modules/previewpane/StlThumbnailProviderCpp/StlThumbnailProviderCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,15 +106,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/StlThumbnailProviderCpp/packages.config b/src/modules/previewpane/StlThumbnailProviderCpp/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/StlThumbnailProviderCpp/packages.config
+++ b/src/modules/previewpane/StlThumbnailProviderCpp/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/SvgPreviewHandlerCpp/SvgPreviewHandlerCpp.vcxproj b/src/modules/previewpane/SvgPreviewHandlerCpp/SvgPreviewHandlerCpp.vcxproj
index 94eeae7e29..56d680ce4b 100644
--- a/src/modules/previewpane/SvgPreviewHandlerCpp/SvgPreviewHandlerCpp.vcxproj
+++ b/src/modules/previewpane/SvgPreviewHandlerCpp/SvgPreviewHandlerCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -109,13 +109,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/SvgPreviewHandlerCpp/packages.config b/src/modules/previewpane/SvgPreviewHandlerCpp/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/src/modules/previewpane/SvgPreviewHandlerCpp/packages.config
+++ b/src/modules/previewpane/SvgPreviewHandlerCpp/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProviderCpp.vcxproj b/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProviderCpp.vcxproj
index 7eff3bdf67..cfa896cfb9 100644
--- a/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProviderCpp.vcxproj
+++ b/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProviderCpp.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -106,15 +106,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/previewpane/SvgThumbnailProviderCpp/packages.config b/src/modules/previewpane/SvgThumbnailProviderCpp/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/SvgThumbnailProviderCpp/packages.config
+++ b/src/modules/previewpane/SvgThumbnailProviderCpp/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/powerpreview/packages.config b/src/modules/previewpane/powerpreview/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/previewpane/powerpreview/packages.config
+++ b/src/modules/previewpane/powerpreview/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/previewpane/powerpreview/powerpreview.vcxproj b/src/modules/previewpane/powerpreview/powerpreview.vcxproj
index 67572b3a69..682702b4e0 100644
--- a/src/modules/previewpane/powerpreview/powerpreview.vcxproj
+++ b/src/modules/previewpane/powerpreview/powerpreview.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -91,15 +91,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/registrypreview/RegistryPreviewExt/RegistryPreviewExt.vcxproj b/src/modules/registrypreview/RegistryPreviewExt/RegistryPreviewExt.vcxproj
index 911f2fe419..43b439b09e 100644
--- a/src/modules/registrypreview/RegistryPreviewExt/RegistryPreviewExt.vcxproj
+++ b/src/modules/registrypreview/RegistryPreviewExt/RegistryPreviewExt.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -119,15 +119,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/registrypreview/RegistryPreviewExt/packages.config b/src/modules/registrypreview/RegistryPreviewExt/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/registrypreview/RegistryPreviewExt/packages.config
+++ b/src/modules/registrypreview/RegistryPreviewExt/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.Events.cs b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.Events.cs
index e8bd42563c..420b4fd01a 100644
--- a/src/modules/registrypreview/RegistryPreviewUI/MainWindow.Events.cs
+++ b/src/modules/registrypreview/RegistryPreviewUI/MainWindow.Events.cs
@@ -8,6 +8,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
+using System.Threading.Tasks;
using CommunityToolkit.WinUI.UI.Controls;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
@@ -59,6 +60,18 @@ namespace RegistryPreview
if (textBox.ContextFlyout != null && textBox.ContextFlyout.IsOpen)
{
textBox.ContextFlyout.Hide();
+
+ // if true, the app will not close yet
+ args.Handled = true;
+
+ // HACK: To fix https://github.com/microsoft/PowerToys/issues/28820, wait a bit for the close animation of the flyout to run before closing the application.
+ // This might be called many times if the flyout still hasn't been closed, as Window_Closed will be called again by App.Current.Exit
+ DispatcherQueue.TryEnqueue(async () =>
+ {
+ await Task.Delay(100);
+ App.Current.Exit();
+ });
+ return;
}
// Save window placement
diff --git a/src/modules/videoconference/VideoConferenceModule/VideoConference.vcxproj b/src/modules/videoconference/VideoConferenceModule/VideoConference.vcxproj
index 7b205f7296..826ee3f2d3 100644
--- a/src/modules/videoconference/VideoConferenceModule/VideoConference.vcxproj
+++ b/src/modules/videoconference/VideoConferenceModule/VideoConference.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{5ABA70DE-3A3F-41F6-A1F5-D1F74F54F9BB}
@@ -163,15 +163,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
diff --git a/src/modules/videoconference/VideoConferenceModule/packages.config b/src/modules/videoconference/VideoConferenceModule/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/videoconference/VideoConferenceModule/packages.config
+++ b/src/modules/videoconference/VideoConferenceModule/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/videoconference/VideoConferenceShared/VideoConferenceShared.vcxproj b/src/modules/videoconference/VideoConferenceShared/VideoConferenceShared.vcxproj
index d720b314df..c97bb89b9a 100644
--- a/src/modules/videoconference/VideoConferenceShared/VideoConferenceShared.vcxproj
+++ b/src/modules/videoconference/VideoConferenceShared/VideoConferenceShared.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -134,15 +134,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/videoconference/VideoConferenceShared/packages.config b/src/modules/videoconference/VideoConferenceShared/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/modules/videoconference/VideoConferenceShared/packages.config
+++ b/src/modules/videoconference/VideoConferenceShared/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/runner/packages.config b/src/runner/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/src/runner/packages.config
+++ b/src/runner/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/runner/runner.vcxproj b/src/runner/runner.vcxproj
index d3f1272bc4..0336716fec 100644
--- a/src/runner/runner.vcxproj
+++ b/src/runner/runner.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -126,15 +126,15 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs
index 4454fa13a7..00559e4a2e 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/App.xaml.cs
@@ -82,7 +82,7 @@ namespace Microsoft.PowerToys.Settings.UI
{
if (settingsWindow == null)
{
- settingsWindow = new MainWindow(IsDarkTheme());
+ settingsWindow = new MainWindow();
}
settingsWindow.Activate();
@@ -92,7 +92,7 @@ namespace Microsoft.PowerToys.Settings.UI
settingsWindow.NavigateToSection(type);
WindowHelpers.BringToForeground(settingsWindow.GetWindowHandle());
- }
+ }
if (ensurePageIsSelected)
{
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
index c54f5a2159..0f1a241b25 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Flyout/LaunchPage.xaml
@@ -5,9 +5,8 @@
xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="using:Microsoft.PowerToys.Settings.UI.Flyout"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:tk7controls="using:CommunityToolkit.WinUI.UI.Controls"
+ xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
xmlns:ui="using:CommunityToolkit.WinUI"
xmlns:viewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
mc:Ignorable="d">
@@ -65,13 +64,13 @@
-
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs
index 1ea867cbab..b3dec9c601 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs
+++ b/src/settings-ui/Settings.UI/SettingsXAML/MainWindow.xaml.cs
@@ -7,7 +7,6 @@ using ManagedCommon;
using Microsoft.PowerLauncher.Telemetry;
using Microsoft.PowerToys.Settings.UI.Helpers;
using Microsoft.PowerToys.Settings.UI.Library;
-using Microsoft.PowerToys.Settings.UI.OOBE.Views;
using Microsoft.PowerToys.Settings.UI.Views;
using Microsoft.PowerToys.Telemetry;
using Microsoft.UI;
@@ -41,6 +40,9 @@ namespace Microsoft.PowerToys.Settings.UI
if (createHidden)
{
placement.ShowCmd = NativeMethods.SW_HIDE;
+
+ // Restore the last known placement on the first activation
+ this.Activated += Window_Activated;
}
NativeMethods.SetWindowPlacement(hWnd, ref placement);
@@ -213,6 +215,17 @@ namespace Microsoft.PowerToys.Settings.UI
}
}
+ private void Window_Activated(object sender, WindowActivatedEventArgs args)
+ {
+ if (args.WindowActivationState != WindowActivationState.Deactivated)
+ {
+ this.Activated -= Window_Activated;
+ var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
+ var placement = Utils.DeserializePlacementOrDefault(hWnd);
+ NativeMethods.SetWindowPlacement(hWnd, ref placement);
+ }
+ }
+
internal void EnsurePageIsSelected()
{
ShellPage.EnsurePageIsSelected();
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
index 93c429733f..001bab2e95 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerAccentPage.xaml
@@ -80,6 +80,7 @@
+
diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerOcrPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerOcrPage.xaml
index f73e99cb3f..5d170cdb91 100644
--- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerOcrPage.xaml
+++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerOcrPage.xaml
@@ -56,8 +56,7 @@
DropDownOpened="TextExtractor_ComboBox_DropDownOpened"
ItemsSource="{x:Bind Path=ViewModel.AvailableLanguages, Mode=OneWay}"
Loaded="TextExtractor_ComboBox_Loaded"
- SelectedIndex="{x:Bind Path=ViewModel.LanguageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- SelectedValue="{Binding SelectedColorRepresentationValue, Mode=TwoWay}" />
+ SelectedIndex="{x:Bind Path=ViewModel.LanguageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
index c7dee649b7..f6d745db77 100644
--- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
+++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
@@ -1073,7 +1073,7 @@
File type, do not translate
- .cpp, .py, .json, .xml, .csproj, ...
+ .txt, .cpp, .py, .json, .xml, .csproj, ...
{Locked}
@@ -1129,7 +1129,8 @@
Stereolithography
- {Locked}
+ {Locked}
+
.stl
{Locked}
@@ -1151,13 +1152,16 @@
.qoi
- {Locked}
+ {Locked}
+
Portable Document Format
- {Locked}
+ {Locked}
+
.pdf
- {Locked}
+ {Locked}
+
These settings allow you to manage your Windows File Explorer custom preview handlers.
@@ -3437,6 +3441,9 @@ Activate by holding the key for the character you want to add an accent to, then
Slovak
+
+ Slovenian
+
Spanish
@@ -3973,7 +3980,7 @@ Activate by holding the key for the character you want to add an accent to, then
Preview
- .cpp, .py, .json, .xml, .csproj, ...
+ .txt, .cpp, .py, .json, .xml, .csproj, ...
Source code files (Monaco)
@@ -4030,4 +4037,4 @@ Activate by holding the key for the character you want to add an accent to, then
The enabled state of some thumbnail handlers is managed by your organization.
-
+
\ No newline at end of file
diff --git a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs
index 95d95e84a1..d71404c290 100644
--- a/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs
+++ b/src/settings-ui/Settings.UI/ViewModels/PowerAccentViewModel.cs
@@ -51,6 +51,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
"PT",
"RO",
"SK",
+ "SL",
"SP",
"SR",
"SV",
diff --git a/tools/BugReportTool/BugReportTool/BugReportTool.vcxproj b/tools/BugReportTool/BugReportTool/BugReportTool.vcxproj
index 8ce7e68484..734146a663 100644
--- a/tools/BugReportTool/BugReportTool/BugReportTool.vcxproj
+++ b/tools/BugReportTool/BugReportTool/BugReportTool.vcxproj
@@ -1,6 +1,6 @@
-
+
16.0
Win32Proj
@@ -80,14 +80,14 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/tools/BugReportTool/BugReportTool/packages.config b/tools/BugReportTool/BugReportTool/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/tools/BugReportTool/BugReportTool/packages.config
+++ b/tools/BugReportTool/BugReportTool/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/tools/WebcamReportTool/WebcamReportTool.vcxproj b/tools/WebcamReportTool/WebcamReportTool.vcxproj
index 7a56bd2082..feab9a9842 100644
--- a/tools/WebcamReportTool/WebcamReportTool.vcxproj
+++ b/tools/WebcamReportTool/WebcamReportTool.vcxproj
@@ -1,6 +1,6 @@
-
+
v143
@@ -62,14 +62,14 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/tools/WebcamReportTool/packages.config b/tools/WebcamReportTool/packages.config
index 2c654a3e7d..ff4b059648 100644
--- a/tools/WebcamReportTool/packages.config
+++ b/tools/WebcamReportTool/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/tools/project_template/ModuleTemplate/ModuleTemplateCompileTest.vcxproj b/tools/project_template/ModuleTemplate/ModuleTemplateCompileTest.vcxproj
index b0fa518792..e9ed3777d7 100644
--- a/tools/project_template/ModuleTemplate/ModuleTemplateCompileTest.vcxproj
+++ b/tools/project_template/ModuleTemplate/ModuleTemplateCompileTest.vcxproj
@@ -1,6 +1,6 @@
-
+
15.0
{64A80062-4D8B-4229-8A38-DFA1D7497749}
@@ -110,13 +110,13 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
\ No newline at end of file
diff --git a/tools/project_template/ModuleTemplate/packages.config b/tools/project_template/ModuleTemplate/packages.config
index 47bae1882f..09bfc449e2 100644
--- a/tools/project_template/ModuleTemplate/packages.config
+++ b/tools/project_template/ModuleTemplate/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file