mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-17 17:48:02 +01:00
Compare commits
50 Commits
stefan/tes
...
stefa/test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d1f7c03c3 | ||
|
|
5f36a3981c | ||
|
|
8cbb306a75 | ||
|
|
c6d605ea39 | ||
|
|
a090558aad | ||
|
|
faea17b612 | ||
|
|
5439f9499a | ||
|
|
df14a5dbb3 | ||
|
|
9c1fb53d2a | ||
|
|
63226e656a | ||
|
|
f742d3c1c3 | ||
|
|
2543dee1f1 | ||
|
|
3cc7c4da0b | ||
|
|
b2b2856e52 | ||
|
|
b41129d489 | ||
|
|
f9cbff6976 | ||
|
|
1a8007ca0a | ||
|
|
949b9a6185 | ||
|
|
06806ae283 | ||
|
|
afa72846b1 | ||
|
|
bde9243d72 | ||
|
|
106f90dc01 | ||
|
|
42564e6c10 | ||
|
|
99b014516d | ||
|
|
5e666556f4 | ||
|
|
d7f0d0e5c1 | ||
|
|
c095cdde4e | ||
|
|
67b18d0e98 | ||
|
|
7d9681ecd2 | ||
|
|
7e0f69f7d4 | ||
|
|
412550abcd | ||
|
|
468e55c7e1 | ||
|
|
1f4eff4a5d | ||
|
|
5ab83c6ad2 | ||
|
|
4ebc4cbc0d | ||
|
|
b57c3f9bf0 | ||
|
|
9265136a64 | ||
|
|
887d475560 | ||
|
|
0990724e44 | ||
|
|
9d2f9bcff2 | ||
|
|
89a87e6db4 | ||
|
|
59a133b9e2 | ||
|
|
5e7d5d1f7f | ||
|
|
22000228e2 | ||
|
|
ba76bfe04e | ||
|
|
25b92400fb | ||
|
|
bd4cdcf52b | ||
|
|
967b888ba1 | ||
|
|
479c95b32b | ||
|
|
205dfc3cb1 |
13
.github/actions/spell-check/allow/allow.txt
vendored
13
.github/actions/spell-check/allow/allow.txt
vendored
@@ -1,13 +0,0 @@
|
||||
cloudai
|
||||
bkmeneguello
|
||||
FWest
|
||||
gdnbaselines
|
||||
github
|
||||
https
|
||||
obairka
|
||||
sdl
|
||||
ssh
|
||||
ubuntu
|
||||
unuing
|
||||
workarounds
|
||||
wil
|
||||
134
.github/actions/spell-check/allow/code.txt
vendored
Normal file
134
.github/actions/spell-check/allow/code.txt
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
# COLORS
|
||||
|
||||
argb
|
||||
bgra
|
||||
BLACKONWHITE
|
||||
BLUEGRAY
|
||||
BRIGHTGREEN
|
||||
COLORONCOLOR
|
||||
DARKPURPLE
|
||||
DARKTEAL
|
||||
DARKYELLOW
|
||||
Farbraum
|
||||
ICEBLUE
|
||||
LIGHTORANGE
|
||||
LIGHTTURQUOISE
|
||||
NCol
|
||||
OLIVEGREEN
|
||||
PALEBLUE
|
||||
PArgb
|
||||
Pbgra
|
||||
WHITEONBLACK
|
||||
|
||||
|
||||
# FILES
|
||||
|
||||
AYUV
|
||||
bak
|
||||
exa
|
||||
exabyte
|
||||
Gbits
|
||||
Gbps
|
||||
gcode
|
||||
Mbits
|
||||
MBs
|
||||
mkv
|
||||
msix
|
||||
nupkg
|
||||
petabyte
|
||||
resw
|
||||
resx
|
||||
Stereolithography
|
||||
terabyte
|
||||
UYVY
|
||||
xbf
|
||||
YUY
|
||||
YUYV
|
||||
YVU
|
||||
YVYU
|
||||
zipfolder
|
||||
|
||||
|
||||
# FONTS
|
||||
|
||||
Consolas
|
||||
Neue
|
||||
Noto
|
||||
Roboto
|
||||
Segoe
|
||||
|
||||
|
||||
# IN URLs
|
||||
|
||||
accessibilityinsights
|
||||
arik
|
||||
epicgames
|
||||
fwlink
|
||||
joefinapps
|
||||
lepo
|
||||
linkedin
|
||||
oblitum
|
||||
robmensching
|
||||
sinclairinat
|
||||
stylecop
|
||||
uipi
|
||||
yinwang
|
||||
|
||||
|
||||
# KEYS
|
||||
|
||||
altdown
|
||||
BUTTONUP
|
||||
CTRLALTDEL
|
||||
Ctrls
|
||||
EXSEL
|
||||
HOLDENTER
|
||||
HOLDESC
|
||||
KBDLLHOOKSTRUCT
|
||||
keyevent
|
||||
LAlt
|
||||
LBUTTON
|
||||
LBUTTONDBLCLK
|
||||
LBUTTONDOWN
|
||||
LBUTTONUP
|
||||
LCONTROL
|
||||
LCtrl
|
||||
LEFTDOWN
|
||||
LEFTUP
|
||||
MBUTTON
|
||||
MBUTTONDBLCLK
|
||||
MBUTTONDOWN
|
||||
MBUTTONUP
|
||||
MIDDLEDOWN
|
||||
MIDDLEUP
|
||||
NCRBUTTONDBLCLK
|
||||
NCRBUTTONDOWN
|
||||
NCRBUTTONUP
|
||||
NUMLOCK
|
||||
RBUTTON
|
||||
RBUTTONDBLCLK
|
||||
RBUTTONDOWN
|
||||
RBUTTONUP
|
||||
RCONTROL
|
||||
RCtrl
|
||||
RIGHTDOWN
|
||||
RIGHTUP
|
||||
VKTAB
|
||||
winkey
|
||||
WMKEYDOWN
|
||||
WMKEYUP
|
||||
WMSYSKEYDOWN
|
||||
WMSYSKEYUP
|
||||
XBUTTON
|
||||
XBUTTONDBLCLK
|
||||
XBUTTONDOWN
|
||||
XBUTTONUP
|
||||
XDOWN
|
||||
|
||||
|
||||
# MATH
|
||||
|
||||
artanh
|
||||
arsinh
|
||||
arcosh
|
||||
|
||||
137
.github/actions/spell-check/allow/names.txt
vendored
137
.github/actions/spell-check/allow/names.txt
vendored
@@ -1,57 +1,154 @@
|
||||
ABradley
|
||||
# POWERTOYS
|
||||
|
||||
alwaysontop
|
||||
colorpicker
|
||||
fancyzones
|
||||
imageresizer
|
||||
kbm
|
||||
keyboardmanager
|
||||
markdownpreviewhandler
|
||||
mwb
|
||||
oobe
|
||||
pasteplain
|
||||
poweraccent
|
||||
powerlauncher
|
||||
POWEROCR
|
||||
powerpreview
|
||||
powerrename
|
||||
powertoy
|
||||
powertoys
|
||||
previewpane
|
||||
ptrun
|
||||
registrypreview
|
||||
rooler
|
||||
scoobe
|
||||
shortcutguide
|
||||
videoconference
|
||||
|
||||
|
||||
# USERS
|
||||
|
||||
alekhyareddy
|
||||
Aleks
|
||||
angularsen
|
||||
arjunbalgovind
|
||||
Ashish
|
||||
azchohfi
|
||||
Baltazar
|
||||
Bao
|
||||
bdoserror
|
||||
betadele
|
||||
betsegaw
|
||||
bricelam
|
||||
Chinh
|
||||
chrdavis
|
||||
Chrzan
|
||||
clayton
|
||||
Coplen
|
||||
crutkas
|
||||
dependabot
|
||||
Deuchert
|
||||
damienleroy
|
||||
davidegiacometti
|
||||
debian
|
||||
Delimarsky
|
||||
Deondre
|
||||
ductdo
|
||||
edwinzap
|
||||
Essey
|
||||
frankychen
|
||||
gabime
|
||||
Galaxi
|
||||
Garside
|
||||
Gershaft
|
||||
Gokce
|
||||
Guo
|
||||
hallatore
|
||||
hanselman
|
||||
Harmath
|
||||
Heiko
|
||||
Hemmerlein
|
||||
hlaueriksson
|
||||
Horvalds
|
||||
htcfreek
|
||||
Huynh
|
||||
Jaswal
|
||||
jefflord
|
||||
jyuwono
|
||||
Kamra
|
||||
Kantarci
|
||||
Karthick
|
||||
kevinguo
|
||||
Krigun
|
||||
Lambson
|
||||
Laute
|
||||
laviusmotileng
|
||||
Luecking
|
||||
Mahalingam
|
||||
Markovic
|
||||
martinchrzan
|
||||
martinmoene
|
||||
Melman
|
||||
Mikhayelyan
|
||||
mshtang
|
||||
Myrvold
|
||||
naveensrinivasan
|
||||
nVidia
|
||||
Nemeth
|
||||
nielslaute
|
||||
oldnewthing
|
||||
palenshus
|
||||
pedrolamas
|
||||
peteblois
|
||||
phoboslab
|
||||
Ponten
|
||||
Pooja
|
||||
robmen
|
||||
randyrants
|
||||
ricardosantos
|
||||
robmikh
|
||||
Rutkas
|
||||
ryanbodrug
|
||||
saahmedm
|
||||
sachaple
|
||||
Santossio
|
||||
Schoen
|
||||
skycommand
|
||||
snickler
|
||||
sinclairinat
|
||||
streamjsonrpc
|
||||
Sekan
|
||||
Seraphima
|
||||
skttl
|
||||
somil
|
||||
Soref
|
||||
stefan
|
||||
Szablewski
|
||||
Tadele
|
||||
talynone
|
||||
TBM
|
||||
tilovell
|
||||
TheJoeFin
|
||||
Triet
|
||||
Vidia
|
||||
WEX
|
||||
WWL
|
||||
yifan
|
||||
ycv
|
||||
Yuniardi
|
||||
yuyoyuppe
|
||||
Zoltan
|
||||
Zykova
|
||||
|
||||
|
||||
# OTHERS
|
||||
|
||||
Controlz
|
||||
cortana
|
||||
fancymouse
|
||||
firefox
|
||||
Inkscape
|
||||
Markdig
|
||||
modernwpf
|
||||
Moq
|
||||
mozilla
|
||||
mspaint
|
||||
Newtonsoft
|
||||
onenote
|
||||
Quickime
|
||||
regedit
|
||||
roslyn
|
||||
Vanara
|
||||
WEX
|
||||
windowwalker
|
||||
winui
|
||||
winuiex
|
||||
wix
|
||||
wordpad
|
||||
WWL
|
||||
xamlstyler
|
||||
Xavalon
|
||||
Xbox
|
||||
Youdao
|
||||
|
||||
|
||||
11
.github/actions/spell-check/allow/temporary.txt
vendored
11
.github/actions/spell-check/allow/temporary.txt
vendored
@@ -1,11 +0,0 @@
|
||||
etw
|
||||
filetime
|
||||
flyouts
|
||||
lnks
|
||||
reparented
|
||||
screenshots
|
||||
SIDs
|
||||
subkeys
|
||||
TApp
|
||||
websites
|
||||
wmi
|
||||
17
.github/actions/spell-check/excludes.txt
vendored
17
.github/actions/spell-check/excludes.txt
vendored
@@ -2,18 +2,19 @@
|
||||
(?:^|/)(?i)COPYRIGHT
|
||||
(?:^|/)(?i)LICEN[CS]E
|
||||
(?:^|/)3rdparty/
|
||||
(?:^|/)go\.sum$
|
||||
(?:^|/)FilePreviewCommon/Assets/Monaco/customLanguages/
|
||||
(?:^|/)FilePreviewCommon/Assets/Monaco/generateLanguagesJson.html
|
||||
(?:^|/)FilePreviewCommon/Assets/Monaco/index.html
|
||||
(?:^|/)FilePreviewCommon/Assets/Monaco/monaco_languages.json
|
||||
(?:^|/)FilePreviewCommon/Assets/Monaco/monacoSpecialLanguages.js
|
||||
(?:^|/)go\.sum$
|
||||
(?:^|/)monacoSRC/
|
||||
(?:^|/)package(?:-lock|)\.json$
|
||||
(?:^|/)Pipfile$
|
||||
(?:^|/)power-rename-ui-flags$
|
||||
(?:^|/)pyproject.toml
|
||||
(?:^|/)requirements(?:-dev|-doc|-test|)\.txt$
|
||||
(?:^|/)sample\.qoi$
|
||||
(?:^|/)timezones\.json$
|
||||
(?:^|/)vendor/
|
||||
(?:^|/)WindowsSettings\.json$
|
||||
@@ -96,30 +97,30 @@
|
||||
^\.gitmodules$
|
||||
^\Q.github/workflows/spelling2.yml\E$
|
||||
^\Q.pipelines/ESRPSigning_core.json\E$
|
||||
^\Qinstaller/PowerToysSetup/Settings.wxs\E$
|
||||
^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$
|
||||
^\Q.pipelines/sdl.gdnbaselines\E$
|
||||
^\Qinstaller/PowerToysSetup/Settings.wxs\E$
|
||||
^\Qsrc/common/FilePreviewCommon/Assets/Monaco/monaco_languages.json\E$
|
||||
^\Qsrc/common/ManagedCommon/ColorFormatHelper.cs\E$
|
||||
^\Qsrc/common/notifications/BackgroundActivatorDLL/cpp.hint\E$
|
||||
^\Qsrc/modules/colorPicker/ColorPickerUI/Assets/ColorPicker/colorPicker.cur\E$
|
||||
^\Qsrc/modules/colorPicker/ColorPickerUI/Shaders/GridShader.cso\E$
|
||||
^\Qsrc/modules/MouseUtils/MouseJumpUI/MainForm.resx\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmAbout.cs\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/ModuleInterface/generateSecurityDescriptor.h\E$
|
||||
^\Qsrc/modules/MouseUtils/MouseJumpUI/NativeMethods/User32/UI/WindowsAndMessaging/User32.SYSTEM_METRICS_INDEX.cs\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmAbout.cs\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmInputCallback.resx\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmLogon.resx\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmMatrix.resx\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/App/Form/frmScreen.resx\E$
|
||||
^\Qsrc/modules/MouseWithoutBorders/ModuleInterface/generateSecurityDescriptor.h\E$
|
||||
^\Qsrc/modules/peek/Peek.Common/NativeMethods.txt\E$
|
||||
^\Qsrc/modules/previewpane/SvgPreviewHandler/SvgHTMLPreviewGenerator.cs\E$
|
||||
^\Qsrc/modules/previewpane/UnitTests-StlThumbnailProvider/HelperFiles/sample.stl\E$
|
||||
^\Qtools/project_template/ModuleTemplate/resource.h\E$
|
||||
^doc/devdocs/akaLinks\.md$
|
||||
^src/modules/MouseWithoutBorders/App/Form/.*\.resx$
|
||||
^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$
|
||||
^src/modules/MouseWithoutBorders/App/Helper/.*\.resx$
|
||||
^src/modules/MouseWithoutBorders/App/.*/NativeMethods\.cs$
|
||||
^src/modules/MouseWithoutBorders/App/Form/.*\.Designer\.cs$
|
||||
^src/modules/MouseWithoutBorders/App/Form/.*\.resx$
|
||||
^src/modules/MouseWithoutBorders/App/Helper/.*\.resx$
|
||||
^src/modules/previewpane/UnitTests-MarkdownPreviewHandler/HelperFiles/MarkdownWithHTMLImageTag.txt$
|
||||
^tools/Verification scripts/Check preview handler registration\.ps1$
|
||||
ignore$
|
||||
|
||||
532
.github/actions/spell-check/expect.txt
vendored
532
.github/actions/spell-check/expect.txt
vendored
File diff suppressed because it is too large
Load Diff
9
.github/policies/resourceManagement.yml
vendored
9
.github/policies/resourceManagement.yml
vendored
@@ -233,5 +233,14 @@ configuration:
|
||||
- addReply:
|
||||
reply: Hi! Thanks for making us aware of the problem. We raised the issue with our internal localization team. This issue should be fixed hopefully in the next version of PowerToys.
|
||||
description:
|
||||
- if:
|
||||
- payloadType: Issue_Comment
|
||||
- commentContains:
|
||||
pattern: 'I would [like|love] [to help|helping|to contribute|contributing|to implement|implementing|to fix|fixing]'
|
||||
isRegex: True
|
||||
then:
|
||||
- addReply:
|
||||
reply: Hi! Your last comment indicates to our system, that you might want to contribute to this feature/fix this bug. Thank you! Please make us aware on our ["Would you like to contribute to PowerToys?" thread](https://github.com/microsoft/PowerToys/issues/28769), as we don't see all the comments. <br /><br />_I'm a bot (beep!) so please excuse any mistakes I may make_
|
||||
description:
|
||||
onFailure:
|
||||
onSuccess:
|
||||
|
||||
47
.github/workflows/spelling2.yml
vendored
47
.github/workflows/spelling2.yml
vendored
@@ -107,31 +107,36 @@ jobs:
|
||||
use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}
|
||||
extra_dictionary_limit: 20
|
||||
extra_dictionaries:
|
||||
cspell:software-terms/dict/softwareTerms.txt
|
||||
cspell:cpp/src/stdlib-cpp.txt
|
||||
cspell:filetypes/filetypes.txt
|
||||
cspell:cpp/src/stdlib-c.txt
|
||||
cspell:python/src/python/python-lib.txt
|
||||
cspell:lorem-ipsum/dictionary.txt
|
||||
cspell:php/dict/php.txt
|
||||
cspell:typescript/dict/typescript.txt
|
||||
cspell:swift/src/swift.txt
|
||||
cspell:fullstack/dict/fullstack.txt
|
||||
cspell:node/dict/node.txt
|
||||
cspell:dotnet/dict/dotnet.txt
|
||||
cspell:django/dict/django.txt
|
||||
cspell:python/src/python/python.txt
|
||||
cspell:csharp/csharp.txt
|
||||
cspell:python/src/common/extra.txt
|
||||
cspell:cpp/src/compiler-msvc.txt
|
||||
cspell:aws/aws.txt
|
||||
cspell:golang/dict/go.txt
|
||||
cspell:java/src/java.txt
|
||||
cspell:html/dict/html.txt
|
||||
cspell:cpp/src/compiler-clang-attributes.txt
|
||||
cspell:cpp/src/compiler-msvc.txt
|
||||
cspell:cpp/src/lang-keywords.txt
|
||||
cspell:cpp/src/stdlib-c.txt
|
||||
cspell:cpp/src/stdlib-cmath.txt
|
||||
cspell:cpp/src/stdlib-cpp.txt
|
||||
cspell:csharp/csharp.txt
|
||||
cspell:css/dict/css.txt
|
||||
cspell:k8s/dict/k8s.txt
|
||||
cspell:django/dict/django.txt
|
||||
cspell:dotnet/dict/dotnet.txt
|
||||
cspell:filetypes/filetypes.txt
|
||||
cspell:fullstack/dict/fullstack.txt
|
||||
cspell:golang/dict/go.txt
|
||||
cspell:html/dict/html.txt
|
||||
cspell:java/src/java.txt
|
||||
cspell:java/src/java-terms.txt
|
||||
cspell:k8s/dict/k8s.txt
|
||||
cspell:lorem-ipsum/dictionary.txt
|
||||
cspell:monkeyc/src/monkeyc_keywords.txt
|
||||
cspell:node/dict/node.txt
|
||||
cspell:php/dict/php.txt
|
||||
cspell:powershell/dict/powershell.txt
|
||||
cspell:python/src/common/extra.txt
|
||||
cspell:python/src/python/python.txt
|
||||
cspell:python/src/python/python-lib.txt
|
||||
cspell:scala/dict/scala.txt
|
||||
cspell:software-terms/dict/softwareTerms.txt
|
||||
cspell:swift/src/swift.txt
|
||||
cspell:typescript/dict/typescript.txt
|
||||
|
||||
comment-push:
|
||||
name: Report (Push)
|
||||
|
||||
@@ -73,6 +73,12 @@
|
||||
"PowerToys.PdfThumbnailProviderCpp.dll",
|
||||
"PowerToys.powerpreview.dll",
|
||||
"PowerToys.PreviewHandlerCommon.dll",
|
||||
"PowerToys.QoiPreviewHandler.dll",
|
||||
"PowerToys.QoiPreviewHandler.exe",
|
||||
"PowerToys.QoiPreviewHandlerCpp.dll",
|
||||
"PowerToys.QoiThumbnailProvider.dll",
|
||||
"PowerToys.QoiThumbnailProvider.exe",
|
||||
"PowerToys.QoiThumbnailProviderCpp.dll",
|
||||
"PowerToys.StlThumbnailProvider.dll",
|
||||
"PowerToys.StlThumbnailProvider.exe",
|
||||
"PowerToys.StlThumbnailProviderCpp.dll",
|
||||
@@ -289,6 +295,7 @@
|
||||
"ColorCode.Core.dll",
|
||||
"ColorCode.UWP.dll",
|
||||
"UnitsNet.dll",
|
||||
"UtfUnknown.dll",
|
||||
"Wpf.Ui.dll"
|
||||
],
|
||||
"SigningInfo": {
|
||||
|
||||
@@ -39,7 +39,7 @@ param(
|
||||
Write-Output "Use 'Help .\applyXamlStyling.ps1' for more info or '-Main' to run against all files."
|
||||
Write-Output ""
|
||||
Write-Output "Restoring dotnet tools..."
|
||||
dotnet tool restore
|
||||
dotnet tool restore --disable-parallel --no-cache
|
||||
|
||||
if (-not $Passive)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/main/service-schema.json
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
@@ -9,21 +10,27 @@ trigger:
|
||||
- doc/*
|
||||
- temp/*
|
||||
- tools/*
|
||||
- '**.md'
|
||||
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable
|
||||
|
||||
paths:
|
||||
exclude:
|
||||
- '**.md'
|
||||
- doc
|
||||
|
||||
# 0.0.yyMM.dd##
|
||||
# 0.0.1904.0900
|
||||
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
|
||||
|
||||
jobs:
|
||||
- template: ./templates/build-powertoys-precheck.yml
|
||||
- template: ./templates/build-powertoys-ci.yml
|
||||
parameters:
|
||||
platform: x64
|
||||
platform: x64
|
||||
- template: ./templates/build-powertoys-ci.yml
|
||||
parameters:
|
||||
platform: arm64
|
||||
platform: arm64
|
||||
@@ -6,6 +6,8 @@ parameters:
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}${{ parameters.configuration }}
|
||||
displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }}
|
||||
dependsOn: Precheck
|
||||
condition: and(succeeded(),ne(dependencies.Precheck.outputs['verifyBuildRequest.skipBuild'], 'Yes'))
|
||||
variables:
|
||||
BuildConfiguration: ${{ parameters.configuration }}
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
@@ -29,4 +31,4 @@ jobs:
|
||||
# when we renamed our main branch.
|
||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||
displayName: 'Component Detection'
|
||||
condition: and(succeededOrFailed(), not(eq(variables['Build.Reason'], 'PullRequest')))
|
||||
condition: and(succeededOrFailed(), not(eq(variables['Build.Reason'], 'PullRequest')))
|
||||
38
.pipelines/ci/templates/build-powertoys-precheck.yml
Normal file
38
.pipelines/ci/templates/build-powertoys-precheck.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json
|
||||
jobs:
|
||||
- job: Precheck
|
||||
pool:
|
||||
demands: ImageOverride -equals SHINE-VS17-Latest
|
||||
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||
name: SHINE-OSS-L
|
||||
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
|
||||
name: SHINE-INT-L
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Build Request
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
try {
|
||||
# Try based on pull request first
|
||||
$pullRequestNumber = "$(system.pullRequest.pullRequestNumber)";
|
||||
$gitHubPullRequest = Invoke-RestMethod -Method Get "https://api.github.com/repos/microsoft/PowerToys/pulls/$pullRequestNumber/files"
|
||||
# If there are no files updated in the commit that are .md, set skipBuild variable
|
||||
if(([array]($gitHubPullRequest.filename) -notmatch ".md|.txt").Length -eq 0) {
|
||||
Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes'
|
||||
Write-Host 'Skipping Build'
|
||||
}
|
||||
}
|
||||
catch {
|
||||
# Fall back to the latest commit otherwise.
|
||||
$commit = "$(build.sourceVersion)";
|
||||
$gitHubCommit = Invoke-RestMethod -Method Get "https://api.github.com/repos/microsoft/PowerToys/commits/$commit"
|
||||
if(([array]($githubCommit.files.filename) -notmatch ".md|.txt").Length -eq 0) {
|
||||
Write-Host '##vso[task.setvariable variable=skipBuild;isOutput=true]Yes'
|
||||
Write-Host 'Skipping Build'
|
||||
}
|
||||
}
|
||||
pwsh: true
|
||||
name: verifyBuildRequest
|
||||
@@ -7,6 +7,12 @@ steps:
|
||||
submodules: true
|
||||
clean: true
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET 6 SDK'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: '6.x'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify XAML formatting
|
||||
inputs:
|
||||
@@ -56,11 +62,18 @@ steps:
|
||||
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify and set latest VCToolsVersion usage
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
|
||||
pwsh: true
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET 7 SDK'
|
||||
displayName: 'Use .NET 8 SDK'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: '7.x'
|
||||
version: '8.x'
|
||||
includePreviewVersions: true
|
||||
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
displayName: Ensure VSTest Platform
|
||||
@@ -195,8 +208,10 @@ steps:
|
||||
**\UnitTests-GcodeThumbnailProvider.dll
|
||||
**\UnitTests-StlThumbnailProvider.dll
|
||||
**\UnitTests-PdfThumbnailProvider.dll
|
||||
**\UnitTests-QoiThumbnailProvider.dll
|
||||
**\Settings.UI.UnitTests.dll
|
||||
**\UnitTests-GcodePreviewHandler.dll
|
||||
**\UnitTests-QoiPreviewHandler.dll
|
||||
**\UnitTests-FancyZonesEditor.dll
|
||||
**\UnitTests-PdfPreviewHandler.dll
|
||||
**\UnitTests-PreviewHandlerCommon.dll
|
||||
|
||||
@@ -88,10 +88,16 @@ extends:
|
||||
version: '6.x'
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET 7 SDK'
|
||||
displayName: 'Use .NET 8 SDK'
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: '7.x'
|
||||
version: '8.x'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify and set latest VCToolsVersion usage
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
|
||||
pwsh: true
|
||||
|
||||
- task: NuGetAuthenticate@1
|
||||
|
||||
|
||||
5
.pipelines/verifyAndSetLatestVCToolsVersion.ps1
Normal file
5
.pipelines/verifyAndSetLatestVCToolsVersion.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Redist.14.Latest" -and $_.chip -eq "x64" }).version;
|
||||
|
||||
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
|
||||
Write-Output "Updating VCToolsVersion environment variable for job"
|
||||
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"
|
||||
@@ -31,7 +31,7 @@ Upvote the original issue by clicking its [+😊] button and hitting 👍 (+1) i
|
||||
|
||||
## Contributing fixes / features
|
||||
|
||||
Please comment on an issue to let us know you're interested in working on something before you start the work. Not only does this avoid multiple people unexpectedly working on the same thing at the same time but it enables us to make sure everyone is clear on what should be done to implement any new functionality. It's less work for everyone, in the long run, to establish this up front.
|
||||
Please comment on [our "Would you like to contribute to PowerToys?" thread](https://github.com/microsoft/PowerToys/issues/28769) to let us know you're interested in working on something before you start the work. Not only does this avoid multiple people unexpectedly working on the same thing at the same time but it enables us to make sure everyone is clear on what should be done to implement any new functionality. It's less work for everyone, in the long run, to establish this up front.
|
||||
|
||||
### Localization issues
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<!-- CLR + CFG are not compatible >:{ -->
|
||||
<ControlFlowGuard Condition="'$(CLRSupport)' == ''">Guard</ControlFlowGuard>
|
||||
<DebugInformationFormat Condition="'%(ControlFlowGuard)' == 'Guard'">ProgramDatabase</DebugInformationFormat>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -77,7 +78,6 @@
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -88,7 +88,6 @@
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
@@ -113,6 +112,7 @@
|
||||
<PlatformToolset Condition="'$(OverridePlatformToolset)'!='True'">v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<DesktopCompatible>true</DesktopCompatible>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Debug/Release props -->
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<AnalysisMode>Recommended</AnalysisMode>
|
||||
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
|
||||
<PlatformTarget>$(Platform)</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -25,23 +25,23 @@
|
||||
<PackageVersion Include="LazyCache" Version="2.4.0" />
|
||||
<PackageVersion Include="Mages" Version="2.0.1" />
|
||||
<PackageVersion Include="Markdig.Signed" Version="0.27.0" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.3" />
|
||||
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.0" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
||||
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2088.41" />
|
||||
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.3" />
|
||||
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
|
||||
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
||||
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.3" />
|
||||
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
|
||||
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
|
||||
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
|
||||
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.230913002" />
|
||||
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
|
||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
||||
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
||||
@@ -57,26 +57,28 @@
|
||||
<PackageVersion Include="StreamJsonRpc" Version="2.14.24" />
|
||||
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
|
||||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
||||
<PackageVersion Include="System.ComponentModel.Composition" Version="7.0.0" />
|
||||
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Data.OleDb" Version="7.0.0" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" />
|
||||
<PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Data.OleDb" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="8.0.0" />
|
||||
<PackageVersion Include="System.IO.Abstractions" Version="17.2.3" />
|
||||
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
|
||||
<PackageVersion Include="System.Management" Version="7.0.2" />
|
||||
<PackageVersion Include="System.Management" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Reactive" Version="6.0.0-preview.9" />
|
||||
<PackageVersion Include="System.Runtime.Caching" Version="7.0.0" />
|
||||
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="7.0.1" />
|
||||
<PackageVersion Include="System.Runtime.Caching" Version="8.0.0" />
|
||||
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
|
||||
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
|
||||
<PackageVersion Include="UnitsNet" Version="4.145.0" />
|
||||
<PackageVersion Include="UTF.Unknown" Version="2.5.1" />
|
||||
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
|
||||
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
|
||||
<PackageVersion Include="WinUIEx" Version="2.2.0" />
|
||||
<PackageVersion Include="WPF-UI" Version="3.0.0-preview.4" />
|
||||
<PackageVersion Include="WPF-UI" Version="3.0.0-preview.11" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
||||
<!-- Additional dependencies used by experimentation -->
|
||||
<PackageVersion Include="Microsoft.VariantAssignment.Client" Version="2.4.17140001" />
|
||||
<PackageVersion Include="Microsoft.VariantAssignment.Contract" Version="3.0.16990001" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -538,7 +538,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CropAndLock", "src\modules\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CropAndLockModuleInterface", "src\modules\CropAndLock\CropAndLockModuleInterface\CropAndLockModuleInterface.vcxproj", "{3157FA75-86CF-4EE2-8F62-C43F776493C6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests-FancyZonesEditor", "src\modules\fancyzones\UnitTests-FancyZonesEditor\UnitTests-FancyZonesEditor.csproj", "{FC8EB78F-F061-4BD9-A3F6-507BEA965E2B}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-FancyZonesEditor", "src\modules\fancyzones\UnitTests-FancyZonesEditor\UnitTests-FancyZonesEditor.csproj", "{FC8EB78F-F061-4BD9-A3F6-507BEA965E2B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EnvironmentVariables", "EnvironmentVariables", "{538ED0BB-B863-4B20-98CC-BCDF7FA0B68A}"
|
||||
EndProject
|
||||
@@ -546,6 +546,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvironmentVariables", "src
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnvironmentVariablesModuleInterface", "src\modules\EnvironmentVariables\EnvironmentVariablesModuleInterface\EnvironmentVariablesModuleInterface.vcxproj", "{B9420661-B0E4-4241-ABD4-4A27A1F64250}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QoiThumbnailProviderCpp", "src\modules\previewpane\QoiThumbnailProviderCpp\QoiThumbnailProviderCpp.vcxproj", "{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QoiThumbnailProvider", "src\modules\previewpane\QoiThumbnailProvider\QoiThumbnailProvider.csproj", "{D949EC7D-48A9-4279-95D5-078E7FD1F048}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QoiPreviewHandlerCpp", "src\modules\previewpane\QoiPreviewHandlerCpp\QoiPreviewHandlerCpp.vcxproj", "{3BAF9C81-A194-4925-A035-5E24A5D1E542}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QoiPreviewHandler", "src\modules\previewpane\QoiPreviewHandler\QoiPreviewHandler.csproj", "{6B04803D-B418-4833-A67E-B0FC966636A5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-QoiPreviewHandler", "src\modules\previewpane\UnitTests-QoiPreviewHandler\UnitTests-QoiPreviewHandler.csproj", "{3940AD4D-F748-4BE4-9083-85769CD553EF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-QoiThumbnailProvider", "src\modules\previewpane\UnitTests-QoiThumbnailProvider\UnitTests-QoiThumbnailProvider.csproj", "{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
@@ -2352,6 +2364,78 @@ Global
|
||||
{B9420661-B0E4-4241-ABD4-4A27A1F64250}.Release|x64.Build.0 = Release|x64
|
||||
{B9420661-B0E4-4241-ABD4-4A27A1F64250}.Release|x86.ActiveCfg = Release|x64
|
||||
{B9420661-B0E4-4241-ABD4-4A27A1F64250}.Release|x86.Build.0 = Release|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|x64.Build.0 = Debug|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Debug|x86.Build.0 = Debug|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|x64.ActiveCfg = Release|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|x64.Build.0 = Release|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|x86.ActiveCfg = Release|x64
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7}.Release|x86.Build.0 = Release|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|x64.Build.0 = Debug|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Debug|x86.Build.0 = Debug|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|x64.ActiveCfg = Release|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|x64.Build.0 = Release|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|x86.ActiveCfg = Release|x64
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048}.Release|x86.Build.0 = Release|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|x64.Build.0 = Debug|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Debug|x86.Build.0 = Debug|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|x64.ActiveCfg = Release|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|x64.Build.0 = Release|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|x86.ActiveCfg = Release|x64
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542}.Release|x86.Build.0 = Release|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Debug|x86.Build.0 = Debug|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|x64.ActiveCfg = Release|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|x64.Build.0 = Release|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|x86.ActiveCfg = Release|x64
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5}.Release|x86.Build.0 = Release|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|x64.Build.0 = Debug|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Debug|x86.Build.0 = Debug|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|x64.ActiveCfg = Release|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|x64.Build.0 = Release|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|x86.ActiveCfg = Release|x64
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF}.Release|x86.Build.0 = Release|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|x64.Build.0 = Debug|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Debug|x86.Build.0 = Debug|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|x64.ActiveCfg = Release|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|x64.Build.0 = Release|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|x86.ActiveCfg = Release|x64
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -2550,6 +2634,12 @@ Global
|
||||
{538ED0BB-B863-4B20-98CC-BCDF7FA0B68A} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
|
||||
{51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA} = {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A}
|
||||
{B9420661-B0E4-4241-ABD4-4A27A1F64250} = {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A}
|
||||
{CCB5E44F-84D9-4203-83C6-1C9EC9302BC7} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
{D949EC7D-48A9-4279-95D5-078E7FD1F048} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
{3BAF9C81-A194-4925-A035-5E24A5D1E542} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
{6B04803D-B418-4833-A67E-B0FC966636A5} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
{3940AD4D-F748-4BE4-9083-85769CD553EF} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
{F8FFFC12-A31A-4AFA-B3DF-14DCF42B5E38} = {2F305555-C296-497E-AC20-5FA1B237996A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
|
||||
|
||||
@@ -52,7 +52,7 @@ The user can switch to the found windows, close them or kill their process.
|
||||
- It is responsible for updating the search text and performing a fuzzy search on all the open windows.
|
||||
|
||||
### [`Window.cs`](/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs)
|
||||
- The [`Window`](/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs) class represents a specific window and has functions to get the name of the window, the state of the window (whether it is visible or not), the `SwitchTowindow` function which switches the desktop focus to the selected window and the `CloseThisWindow` function which closes the window. The `SwitchTowindow` action is performed when the user clicks on a window walker plugin result.
|
||||
- The [`Window`](/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/Window.cs) class represents a specific window and has functions to get the name of the window, the state of the window (whether it is visible or not), the `SwitchToWindow` function which switches the desktop focus to the selected window and the `CloseThisWindow` function which closes the window. The `switchToWindow` action is performed when the user clicks on a window walker plugin result.
|
||||
- The `Window` class holds a static cache with the process information of all windows we know so far and each window instance has a property which holds its process information (name, file, ...). The process data in the cache and the window property are of the type `WindowProcess`.
|
||||
- To get the desktop information for a window, we use the common [`VirtualDesktopHelper`](/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VirtualDesktopHelper.cs) in `Wox.Plugin` project. The instance of `VirtualDesktopHelper` is cached in the [`Main`](/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Main.cs) class of the plugin at runtime. The desktop information is stored in a property of the type [`VDesktop`](/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VDesktop.cs).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#### [`main.cpp`](/src/runner/main.cpp)
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletones are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those marked as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://learn.microsoft.com/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
Contains the executable starting point, initialization code and the list of known PowerToys. All singletons are also initialized here at the start. Loads all the powertoys by scanning the `./modules` folder and `enable()`s those marked as enabled in `%LOCALAPPDATA%\Microsoft\PowerToys\settings.json` config. Then it runs [a message loop](https://learn.microsoft.com/windows/win32/winmsg/using-messages-and-message-queues) for the tray UI. Note that this message loop also [handles lowlevel_keyboard_hook events](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/lowlevel_keyboard_event.cpp#L24).
|
||||
|
||||
#### [`powertoy_module.h`](/src/runner/powertoy_module.h) and [`powertoy_module.cpp`](/src/runner/powertoy_module.cpp)
|
||||
Contains code for initializing and managing the PowerToy modules. `PowertoyModule` is a RAII-style holder for the `PowertoyModuleIface` pointer, which we got by [invoking module DLL's `powertoy_create` function](https://github.com/microsoft/PowerToys/blob/1760af50c8803588cb575167baae0439af38a9c1/src/runner/powertoy_module.cpp#L13-L24).
|
||||
|
||||
@@ -4,7 +4,7 @@ The Settings v2 process uses two way IPC to communicate with the runner process.
|
||||
|
||||
## Initialization
|
||||
- On the settings' side, the two way IPC delegates are contained with the [`ShellPage.xaml.cs`](/src/settings-ui/Settings.UI/Views/ShellPage.xaml.cs) file. The delegates are static and the views for all the powerToys send the ipc information to the viewmodels as `ShellPage.DefaultSndMSGCallBack`.
|
||||
- These delegates are initialized within the [`Mainwindow.xaml.cs`](/src/settings-ui/Settings.UI/MainWindow.xaml.cs) file in the `Settings.Runner` project.
|
||||
- These delegates are initialized within the [`MainWindow.xaml.cs`](/src/settings-ui/Settings.UI/MainWindow.xaml.cs) file in the `Settings.Runner` project.
|
||||
|
||||
|
||||
## Types of IPC delegates
|
||||
|
||||
@@ -22,5 +22,5 @@ The viewmodels are located within the [`Settings.UI.Library`](/src/settings-ui/S
|
||||
- Some viewmodels expect the runner to create the file instead of creating the file themselves, like in keyboard manager.
|
||||
- The colorpicker powertoy creates the `settings.json` within the module. This must be taken care of when encapsulated within the settingsRepository.
|
||||
- Currently, all modules use the `SettingsRepository` to access the General Settings config.
|
||||
- However, only Fancyzones, ShortcutGuide and PowerPreview use the `SettingsRepository` to access the module properties.
|
||||
- However, only FancyZones, ShortcutGuide and PowerPreview use the `SettingsRepository` to access the module properties.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# [FancyZone hit test tool](/tools/FancyZone_HitTest/)
|
||||
|
||||

|
||||

|
||||
|
||||
This tool tests the FancyZones layout selection logic. It displays a window with 5 zones. By hovering the mouse over the zones, the zone under the mouse cursor is highlighted. The sidebar shows different metrics that are used to determine which zone is under the mouse cursor.
|
||||
@@ -11,7 +11,7 @@ Following tools are currently available:
|
||||
* [BugReportTool](bug-report-tool.md) - A tool to collect logs and system information for bug reports.
|
||||
* [Build tools](build-tools.md) - A set of scripts that help building PowerToys.
|
||||
* [Clean up tool](clean-up-tool.md) - A tool to clean up the PowerToys installation.
|
||||
* [FancyZones hit test](fancyzone-hit-test.md) - A tool to test FancyZones layout selection logic.
|
||||
* [FancyZones hit test](fancyzones-hit-test.md) - A tool to test FancyZones layout selection logic.
|
||||
* [FancyZones draw layout test](fancyzones-draw-layout-test.md) - A tool to test FancyZones layout drawing logic.
|
||||
* [FancyZones zonable tester](fancyzones-zonable-tester.md) - A tool to test if a window is zonable.
|
||||
* [Monitor info report](monitor-info-report.md) - A small diagnostic tool which helps identifying WinAPI bugs related to the physical monitor detection.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -2,7 +2,6 @@
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
|
||||
<Import Project="..\..\src\Version.props" />
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)' == 'x64'">
|
||||
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
||||
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
||||
@@ -10,7 +9,7 @@
|
||||
using a specific profile. If you're doing local installer builds, this will
|
||||
simulate the build pipeline doing that for you. -->
|
||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
|
||||
SET PTRoot=$(SolutionDir)\..
|
||||
call "..\..\..\publish.cmd" x64
|
||||
)
|
||||
@@ -21,7 +20,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
||||
<PropertyGroup Condition="'$(Platform)' != 'x64'">
|
||||
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
|
||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
|
||||
SET PTRoot=$(SolutionDir)\..
|
||||
call "..\..\..\publish.cmd" arm64
|
||||
)
|
||||
@@ -194,5 +193,4 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
|
||||
SuppressRegistry="false"
|
||||
SuppressRootDirectory="true"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -138,6 +138,9 @@
|
||||
<Custom Action="CheckGPO" After="InstallInitialize">
|
||||
NOT Installed
|
||||
</Custom>
|
||||
<Custom Action="CheckAdministratorConstraints" After="InstallInitialize">
|
||||
NOT Installed
|
||||
</Custom>
|
||||
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles">
|
||||
NOT Installed
|
||||
</Custom>
|
||||
@@ -347,6 +350,13 @@
|
||||
DllEntry="CheckGPOCA"
|
||||
/>
|
||||
|
||||
<CustomAction Id="CheckAdministratorConstraints"
|
||||
Return="check"
|
||||
Impersonate="yes"
|
||||
BinaryKey="PTCustomActions"
|
||||
DllEntry="CheckAdministratorConstraintsCA"
|
||||
/>
|
||||
|
||||
<!-- Close 'PowerToys.exe' before uninstall-->
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown" />
|
||||
<Property Id="MSIFASTINSTALL" Value="DisableShutdown" />
|
||||
|
||||
@@ -402,6 +402,33 @@
|
||||
</RegistryKey>
|
||||
<File Id="Launcher_ValueGenerator_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)RunPlugins\ValueGenerator\$(var.Language)\Community.PowerToys.Run.Plugin.ValueGenerator.resources.dll" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="QoiPreviewHandler_$(var.IdSafeLanguage)_Component"
|
||||
Directory="Resource$(var.IdSafeLanguage)INSTALLFOLDER"
|
||||
Guid="$(var.CompGUIDPrefix)1E">
|
||||
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||
<RegistryValue Type="string" Name="QoiPreviewHandler_$(var.IdSafeLanguage)_Component" Value="" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
<File Id="QoiPreviewHandler_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)\$(var.Language)\PowerToys.QoiPreviewHandler.resources.dll" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="Awake_$(var.IdSafeLanguage)_Component"
|
||||
Directory="Resource$(var.IdSafeLanguage)INSTALLFOLDER"
|
||||
Guid="$(var.CompGUIDPrefix)1F">
|
||||
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||
<RegistryValue Type="string" Name="Awake_$(var.IdSafeLanguage)_Component" Value="" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
<File Id="Awake_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)\$(var.Language)\PowerToys.Awake.resources.dll" />
|
||||
</Component>
|
||||
<Component
|
||||
Id="PowerOCR_$(var.IdSafeLanguage)_Component"
|
||||
Directory="Resource$(var.IdSafeLanguage)INSTALLFOLDER"
|
||||
Guid="$(var.CompGUIDPrefix)20">
|
||||
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
|
||||
<RegistryValue Type="string" Name="PowerOCR_$(var.IdSafeLanguage)_Component" Value="" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
<File Id="PowerOCR_$(var.IdSafeLanguage)_File" Source="$(var.BinDir)\$(var.Language)\PowerToys.PowerOCR.resources.dll" />
|
||||
</Component>
|
||||
<?undef IdSafeLanguage?>
|
||||
<?undef CompGUIDPrefix?>
|
||||
<?endforeach?>
|
||||
|
||||
@@ -4,13 +4,10 @@ IF NOT DEFINED PTRoot (SET PTRoot=..\..)
|
||||
|
||||
SET PlatformArg=%1
|
||||
IF NOT DEFINED PlatformArg (SET PlatformArg=x64)
|
||||
SET VCToolsVersion=!VCToolsVersion!
|
||||
SET ClearDevCommandPromptEnvVars=false
|
||||
|
||||
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
||||
msbuild !PTRoot!\src\settings-ui\Settings.UI\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:PowerToysRoot=!PTRoot! -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
||||
msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\previewpane\MonacoPreviewHandler\MonacoPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\previewpane\MarkdownPreviewHandler\MarkdownPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
@@ -18,5 +15,3 @@ msbuild !PTRoot!\src\modules\previewpane\MarkdownPreviewHandler\MarkdownPreviewH
|
||||
msbuild !PTRoot!\src\modules\previewpane\SvgPreviewHandler\SvgPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\previewpane\SvgThumbnailProvider\SvgThumbnailProvider.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
msbuild !PTRoot!\src\modules\FileLocksmith\FileLocksmithUI\FileLocksmithUI.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Management.Deployment.h>
|
||||
|
||||
#include <wtsapi32.h>
|
||||
#include <processthreadsapi.h>
|
||||
#include <sddl.h>
|
||||
#include <UserEnv.h>
|
||||
#include <winnt.h>
|
||||
#include <wtsapi32.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -93,6 +94,65 @@ BOOL IsLocalSystem()
|
||||
return bSystem;
|
||||
}
|
||||
|
||||
bool GetUserSid(const wchar_t* username, PSID& sid)
|
||||
{
|
||||
DWORD sidSize = 0;
|
||||
DWORD domainNameSize = 0;
|
||||
SID_NAME_USE sidNameUse;
|
||||
|
||||
LookupAccountName(nullptr, username, nullptr, &sidSize, nullptr, &domainNameSize, &sidNameUse);
|
||||
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
Logger::error("Failed to get buffer sizes");
|
||||
return false;
|
||||
}
|
||||
|
||||
sid = LocalAlloc(LPTR, sidSize);
|
||||
LPWSTR domainName = static_cast<LPWSTR>(LocalAlloc(LPTR, domainNameSize * sizeof(wchar_t)));
|
||||
|
||||
if (!LookupAccountNameW(nullptr, username, sid, &sidSize, domainName, &domainNameSize, &sidNameUse))
|
||||
{
|
||||
Logger::error("Failed to lookup account name");
|
||||
LocalFree(sid);
|
||||
LocalFree(domainName);
|
||||
return false;
|
||||
}
|
||||
|
||||
LocalFree(domainName);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::wstring GetCurrentUserSid()
|
||||
{
|
||||
wchar_t username[UNLEN + 1];
|
||||
DWORD usernameSize = UNLEN + 1;
|
||||
|
||||
std::wstring result;
|
||||
if (!GetUserNameW(username, &usernameSize))
|
||||
{
|
||||
Logger::error("Failed to get the current user name");
|
||||
return result;
|
||||
}
|
||||
|
||||
PSID sid;
|
||||
if (GetUserSid(username, sid))
|
||||
{
|
||||
LPWSTR sidString;
|
||||
if (ConvertSidToStringSid(sid, &sidString))
|
||||
{
|
||||
result = sidString;
|
||||
LocalFree(sidString);
|
||||
}
|
||||
LocalFree(sid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::error(L"Failed to get SID for user \"");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL ImpersonateLoggedInUserAndDoSomething(std::function<bool(HANDLE userToken)> action)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
@@ -262,6 +322,29 @@ LExit:
|
||||
return WcaFinalize(er);
|
||||
}
|
||||
|
||||
UINT __stdcall CheckAdministratorConstraintsCA(MSIHANDLE hInstall)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
std::wstring asd;
|
||||
|
||||
hr = WcaInitialize(hInstall, "CheckAdministratorConstraintsCA");
|
||||
ExitOnFailure(hr, "Failed to initialize");
|
||||
|
||||
LPWSTR currentScope = nullptr;
|
||||
hr = WcaGetProperty(L"InstallScope", ¤tScope);
|
||||
|
||||
if (std::wstring{ currentScope } == L"perUser")
|
||||
{
|
||||
}
|
||||
|
||||
asd = GetCurrentUserSid();
|
||||
MessageBox(NULL, asd.c_str(), asd.c_str(), NULL);
|
||||
|
||||
LExit:
|
||||
UINT er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
|
||||
return WcaFinalize(er);
|
||||
}
|
||||
|
||||
UINT __stdcall ApplyModulesRegistryChangeSetsCA(MSIHANDLE hInstall)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
@@ -1005,7 +1088,7 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
||||
}
|
||||
processes.resize(bytes / sizeof(processes[0]));
|
||||
|
||||
std::array<std::wstring_view, 29> processesToTerminate = {
|
||||
std::array<std::wstring_view, 31> processesToTerminate = {
|
||||
L"PowerToys.PowerLauncher.exe",
|
||||
L"PowerToys.Settings.exe",
|
||||
L"PowerToys.Awake.exe",
|
||||
@@ -1026,7 +1109,9 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall)
|
||||
L"PowerToys.StlThumbnailProvider.exe",
|
||||
L"PowerToys.SvgThumbnailProvider.exe",
|
||||
L"PowerToys.GcodePreviewHandler.exe",
|
||||
L"PowerToys.QoiPreviewHandler.exe",
|
||||
L"PowerToys.PdfPreviewHandler.exe",
|
||||
L"PowerToys.QoiThumbnailProvider.exe",
|
||||
L"PowerToys.SvgPreviewHandler.exe",
|
||||
L"PowerToys.Peek.UI.exe",
|
||||
L"PowerToys.MouseWithoutBorders.exe",
|
||||
|
||||
@@ -3,6 +3,7 @@ LIBRARY "PowerToysSetupCustomActions"
|
||||
EXPORTS
|
||||
LaunchPowerToysCA
|
||||
CheckGPOCA
|
||||
CheckAdministratorConstraintsCA
|
||||
ApplyModulesRegistryChangeSetsCA
|
||||
DetectPrevInstallPathCA
|
||||
RemoveScheduledTasksCA
|
||||
|
||||
@@ -97,3 +97,48 @@ dotnet_diagnostic.IDE0065.severity = none
|
||||
|
||||
# IDE0009: Add this or Me qualification
|
||||
dotnet_diagnostic.IDE0009.severity = none
|
||||
|
||||
# CA1859: Change type for improved performance
|
||||
dotnet_diagnostic.CA1859.severity = none
|
||||
|
||||
# CA1716: Identifiers should not match keywords
|
||||
dotnet_diagnostic.CA1716.severity = none
|
||||
|
||||
# SYSLIB1096: Convert to 'GeneratedComInterface'
|
||||
dotnet_diagnostic.SYSLIB1096.severity = silent
|
||||
|
||||
# CA1309: Use ordinal StringComparison
|
||||
dotnet_diagnostic.CA1309.severity = suggestion
|
||||
|
||||
# CS1615: Argument may not be passed with the ref keyword
|
||||
dotnet_diagnostic.CS1615.severity = none
|
||||
|
||||
# CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
|
||||
dotnet_diagnostic.CA1854.severity = suggestion
|
||||
|
||||
# CA1860: Avoid using 'Enumerable.Any()' extension method
|
||||
dotnet_diagnostic.CA1860.severity = suggestion
|
||||
|
||||
# CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array
|
||||
dotnet_diagnostic.CA1861.severity = suggestion
|
||||
|
||||
# CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons
|
||||
dotnet_diagnostic.CA1862.severity = suggestion
|
||||
|
||||
# CA1863: Cache a CompositeFormat for repeated use in this formatting operation
|
||||
dotnet_diagnostic.CA1863.severity = none
|
||||
|
||||
# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
|
||||
dotnet_diagnostic.CA1864.severity = suggestion
|
||||
|
||||
# CA1865: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
|
||||
dotnet_diagnostic.CA1865.severity = suggestion
|
||||
|
||||
# CA1869: Cache and reuse 'JsonSerializerOptions' instances
|
||||
dotnet_diagnostic.CA1869.severity = none
|
||||
|
||||
# CA2208: Instantiate argument exceptions correctly
|
||||
dotnet_diagnostic.CA2208.severity = none
|
||||
|
||||
# CS9191: The 'ref' modifier for argument corresponding to 'in' is equivalent to 'in'. Consider using 'in' instead.
|
||||
dotnet_diagnostic.CS9191.severity = none
|
||||
|
||||
@@ -3,5 +3,8 @@
|
||||
<PropertyGroup>
|
||||
<Version>0.0.1</Version>
|
||||
<DevEnvironment>Local</DevEnvironment>
|
||||
|
||||
<!-- Forcing for every DLL on by default -->
|
||||
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
@@ -76,9 +76,10 @@ namespace AllExperiments
|
||||
|
||||
if (jsonDictionary != null)
|
||||
{
|
||||
if (!jsonDictionary.ContainsKey("dataversion"))
|
||||
if (!jsonDictionary.TryGetValue("dataversion", out object? value))
|
||||
{
|
||||
jsonDictionary.Add("dataversion", dataVersion);
|
||||
value = dataVersion;
|
||||
jsonDictionary.Add("dataversion", value);
|
||||
}
|
||||
|
||||
if (!jsonDictionary.ContainsKey("variantassignment"))
|
||||
@@ -87,7 +88,7 @@ namespace AllExperiments
|
||||
}
|
||||
else
|
||||
{
|
||||
var jsonDataVersion = jsonDictionary["dataversion"].ToString();
|
||||
var jsonDataVersion = value.ToString();
|
||||
if (jsonDataVersion != null && int.Parse(jsonDataVersion, CultureInfo.InvariantCulture) < dataVersion)
|
||||
{
|
||||
jsonDictionary["dataversion"] = dataVersion;
|
||||
@@ -116,9 +117,9 @@ namespace AllExperiments
|
||||
|
||||
if (jsonDictionary != null)
|
||||
{
|
||||
if (jsonDictionary.ContainsKey("variantassignment"))
|
||||
if (jsonDictionary.TryGetValue("variantassignment", out object? value))
|
||||
{
|
||||
if (jsonDictionary["variantassignment"].ToString() == "alternate" && AssignmentUnit != string.Empty)
|
||||
if (value.ToString() == "alternate" && AssignmentUnit != string.Empty)
|
||||
{
|
||||
IsExperiment = true;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyName>PowerToys.Common.UI</AssemblyName>
|
||||
|
||||
16
src/common/Common.UI/OSVersionHelper.cs
Normal file
16
src/common/Common.UI/OSVersionHelper.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// 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;
|
||||
|
||||
namespace Common.UI
|
||||
{
|
||||
public static class OSVersionHelper
|
||||
{
|
||||
public static bool IsWindows11()
|
||||
{
|
||||
return Environment.OSVersion.Version.Major >= 10 && Environment.OSVersion.Version.Build >= 22000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<Import Project="..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<Version>$(Version).0</Version>
|
||||
<Authors>Microsoft Corporation</Authors>
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig.Signed" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||
<PackageReference Include="UTF.Unknown" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace Microsoft.PowerToys.FilePreviewCommon
|
||||
public static string ReadIndexHtml()
|
||||
{
|
||||
string html;
|
||||
|
||||
using (StreamReader htmlFileReader = new StreamReader(new FileStream(MonacoDirectory + "\\index.html", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
|
||||
{
|
||||
html = htmlFileReader.ReadToEnd();
|
||||
|
||||
@@ -152,4 +152,12 @@ namespace winrt::PowerToys::GPOWrapper::implementation
|
||||
{
|
||||
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredEnvironmentVariablesEnabledValue());
|
||||
}
|
||||
GpoRuleConfigured GPOWrapper::GetConfiguredQoiPreviewEnabledValue()
|
||||
{
|
||||
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQoiPreviewEnabledValue());
|
||||
}
|
||||
GpoRuleConfigured GPOWrapper::GetConfiguredQoiThumbnailsEnabledValue()
|
||||
{
|
||||
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace winrt::PowerToys::GPOWrapper::implementation
|
||||
static GpoRuleConfigured GetAllowExperimentationValue();
|
||||
static GpoRuleConfigured GetRunPluginEnabledValue(winrt::hstring const& pluginID);
|
||||
static GpoRuleConfigured GetConfiguredEnvironmentVariablesEnabledValue();
|
||||
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
|
||||
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ namespace PowerToys
|
||||
static GpoRuleConfigured GetAllowExperimentationValue();
|
||||
static GpoRuleConfigured GetRunPluginEnabledValue(String pluginID);
|
||||
static GpoRuleConfigured GetConfiguredEnvironmentVariablesEnabledValue();
|
||||
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
|
||||
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
@@ -328,13 +328,13 @@ namespace ManagedCommon
|
||||
char paramFormat;
|
||||
string paramType = formatString.Substring(formatterPosition + 1, 2);
|
||||
int paramCount = 3;
|
||||
if (DefaultFormatTypes.ContainsKey(paramType))
|
||||
if (DefaultFormatTypes.TryGetValue(paramType, out char value))
|
||||
{
|
||||
// check the next char, which could be a formatter
|
||||
if (formatterPosition >= formatString.Length - 3)
|
||||
{
|
||||
// not enough characters, end of string, no formatter, use the default one
|
||||
paramFormat = DefaultFormatTypes[paramType];
|
||||
paramFormat = value;
|
||||
paramCount = 2;
|
||||
}
|
||||
else
|
||||
@@ -344,7 +344,7 @@ namespace ManagedCommon
|
||||
// check if it a valid formatter
|
||||
if (!FormatTypeToStringFormatters.ContainsKey(paramFormat))
|
||||
{
|
||||
paramFormat = DefaultFormatTypes[paramType];
|
||||
paramFormat = value;
|
||||
paramCount = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<Import Project="..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<Version>$(Version).0</Version>
|
||||
<Authors>Microsoft Corporation</Authors>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<Version>$(Version).0</Version>
|
||||
<Authors>Microsoft Corporation</Authors>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<ProjectGuid>{F055103B-F80B-4D0C-BF48-057C55620033}</ProjectGuid>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>PowerToysInterop</RootNamespace>
|
||||
<ProjectName>PowerToys.Interop</ProjectName>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
|
||||
@@ -235,6 +235,10 @@ public
|
||||
return gcnew String(CommonSharedConstants::GCODE_PREVIEW_RESIZE_EVENT);
|
||||
}
|
||||
|
||||
static String ^ QoiPreviewResizeEvent() {
|
||||
return gcnew String(CommonSharedConstants::QOI_PREVIEW_RESIZE_EVENT);
|
||||
}
|
||||
|
||||
static String ^ DevFilesPreviewResizeEvent() {
|
||||
return gcnew String(CommonSharedConstants::DEV_FILES_PREVIEW_RESIZE_EVENT);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@ namespace CommonSharedConstants
|
||||
// Path to the event used by GcodePreviewHandler
|
||||
const wchar_t GCODE_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysGcodePreviewResizeEvent-6ff1f9bd-ccbd-4b24-a79f-40a34fb0317d";
|
||||
|
||||
// Path to the event used by QoiPreviewHandler
|
||||
const wchar_t QOI_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysQoiPreviewResizeEvent-579518d1-8c8b-494f-8143-04f43d761ead";
|
||||
|
||||
// Path to the event used by DevFilesPreviewHandler
|
||||
const wchar_t DEV_FILES_PREVIEW_RESIZE_EVENT[] = L"Local\\PowerToysDevFilesPreviewResizeEvent-5707a22c-2cac-4ea2-82f0-27c03ef0b5f3";
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ struct LogSettings
|
||||
inline const static std::wstring pdfPrevLogPath = L"logs\\FileExplorer_localLow\\PdfPrevHandler\\pdf-prev-handler-log.txt";
|
||||
inline const static std::string pdfThumbLoggerName = "PdfThumbnailProvider";
|
||||
inline const static std::wstring pdfThumbLogPath = L"logs\\FileExplorer_localLow\\PdfThumbnailProvider\\pdf-thumbnail-provider-log.txt";
|
||||
inline const static std::string qoiPrevLoggerName = "QoiPrevHandler";
|
||||
inline const static std::wstring qoiPrevLogPath = L"logs\\FileExplorer_localLow\\QoiPreviewHandler\\qoi-prev-handler-log.txt";
|
||||
inline const static std::string qoiThumbLoggerName = "QoiThumbnailProvider";
|
||||
inline const static std::wstring qoiThumbLogPath = L"logs\\FileExplorer_localLow\\QoiThumbnailProvider\\qoi-thumbnail-provider-log.txt";
|
||||
inline const static std::string stlThumbLoggerName = "StlThumbnailProvider";
|
||||
inline const static std::wstring stlThumbLogPath = L"logs\\FileExplorer_localLow\\StlThumbnailProvider\\stl-thumbnail-provider-log.txt";
|
||||
inline const static std::string svgPrevLoggerName = "SvgPrevHandler";
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 5205)
|
||||
#include <winrt/base.h>
|
||||
#pragma warning(default : 5205)
|
||||
#pragma warning(pop)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
|
||||
@@ -56,6 +56,8 @@ namespace powertoys_gpo {
|
||||
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_WITHOUT_BORDERS = L"ConfigureEnabledUtilityMouseWithoutBorders";
|
||||
const std::wstring POLICY_CONFIGURE_ENABLED_PEEK = L"ConfigureEnabledUtilityPeek";
|
||||
const std::wstring POLICY_CONFIGURE_ENABLED_ENVIRONMENT_VARIABLES = L"ConfigureEnabledUtilityEnvironmentVariables";
|
||||
const std::wstring POLICY_CONFIGURE_ENABLED_QOI_PREVIEW = L"ConfigureEnabledUtilityFileExplorerQOIPreview";
|
||||
const std::wstring POLICY_CONFIGURE_ENABLED_QOI_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerQOIThumbnails";
|
||||
|
||||
// The registry value names for PowerToys installer and update policies.
|
||||
const std::wstring POLICY_DISABLE_PER_USER_INSTALLATION = L"PerUserInstallationDisabled";
|
||||
@@ -366,7 +368,7 @@ namespace powertoys_gpo {
|
||||
{
|
||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_MOUSE_WITHOUT_BORDERS);
|
||||
}
|
||||
|
||||
|
||||
inline gpo_rule_configured_t getConfiguredPeekEnabledValue()
|
||||
{
|
||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_PEEK);
|
||||
@@ -446,4 +448,14 @@ namespace powertoys_gpo {
|
||||
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS);
|
||||
}
|
||||
}
|
||||
|
||||
inline gpo_rule_configured_t getConfiguredQoiPreviewEnabledValue()
|
||||
{
|
||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_QOI_PREVIEW);
|
||||
}
|
||||
|
||||
inline gpo_rule_configured_t getConfiguredQoiThumbnailsEnabledValue()
|
||||
{
|
||||
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_QOI_THUMBNAILS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace NonLocalizable
|
||||
const static std::vector<std::wstring> ExtPDF = { L".pdf" };
|
||||
const static std::vector<std::wstring> ExtGCode = { L".gcode" };
|
||||
const static std::vector<std::wstring> ExtSTL = { L".stl" };
|
||||
const static std::vector<std::wstring> ExtNoNoNo = {
|
||||
const static std::vector<std::wstring> ExtQOI = { L".qoi" };
|
||||
const static std::vector<std::wstring> ExtNoNoNo = {
|
||||
L".svgz" //Monaco cannot handle this file type at all; it's a binary file.
|
||||
};
|
||||
}
|
||||
@@ -145,6 +146,19 @@ inline registry::ChangeSet getGcodePreviewHandlerChangeSet(const std::wstring in
|
||||
NonLocalizable::ExtGCode);
|
||||
}
|
||||
|
||||
inline registry::ChangeSet getQoiPreviewHandlerChangeSet(const std::wstring installationDir, const bool perUser)
|
||||
{
|
||||
using namespace registry::shellex;
|
||||
return generatePreviewHandler(PreviewHandlerType::preview,
|
||||
perUser,
|
||||
L"{729B72CD-B72E-4FE9-BCBF-E954B33FE699}",
|
||||
get_std_product_version(),
|
||||
(fs::path{ installationDir } / LR"d(PowerToys.QoiPreviewHandlerCpp.dll)d").wstring(),
|
||||
L"QoiPreviewHandler",
|
||||
L"Qoi Preview Handler",
|
||||
NonLocalizable::ExtQOI);
|
||||
}
|
||||
|
||||
inline registry::ChangeSet getSvgThumbnailHandlerChangeSet(const std::wstring installationDir, const bool perUser)
|
||||
{
|
||||
using namespace registry::shellex;
|
||||
@@ -156,6 +170,7 @@ inline registry::ChangeSet getSvgThumbnailHandlerChangeSet(const std::wstring in
|
||||
L"SvgThumbnailProvider",
|
||||
L"Svg Thumbnail Provider",
|
||||
NonLocalizable::ExtSVG,
|
||||
L"image",
|
||||
L"Picture");
|
||||
}
|
||||
|
||||
@@ -198,6 +213,21 @@ inline registry::ChangeSet getStlThumbnailHandlerChangeSet(const std::wstring in
|
||||
NonLocalizable::ExtSTL);
|
||||
}
|
||||
|
||||
inline registry::ChangeSet getQoiThumbnailHandlerChangeSet(const std::wstring installationDir, const bool perUser)
|
||||
{
|
||||
using namespace registry::shellex;
|
||||
return generatePreviewHandler(PreviewHandlerType::thumbnail,
|
||||
perUser,
|
||||
L"{AD856B15-D25E-4008-AFB7-AFAA55586188}",
|
||||
get_std_product_version(),
|
||||
(fs::path{ installationDir } / LR"d(PowerToys.QoiThumbnailProviderCpp.dll)d").wstring(),
|
||||
L"QoiThumbnailProvider",
|
||||
L"Qoi Thumbnail Provider",
|
||||
NonLocalizable::ExtQOI,
|
||||
L"image",
|
||||
L"Picture");
|
||||
}
|
||||
|
||||
inline registry::ChangeSet getRegistryPreviewSetDefaultAppChangeSet(const std::wstring installationDir, const bool perUser)
|
||||
{
|
||||
const HKEY scope = perUser ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
|
||||
@@ -245,9 +275,11 @@ inline std::vector<registry::ChangeSet> getAllOnByDefaultModulesChangeSets(const
|
||||
getMdPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getMonacoPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getGcodePreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getQoiPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getSvgThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getGcodeThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getStlThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getQoiThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getRegistryPreviewChangeSet(installationDir, PER_USER) };
|
||||
}
|
||||
|
||||
@@ -259,10 +291,12 @@ inline std::vector<registry::ChangeSet> getAllModulesChangeSets(const std::wstri
|
||||
getMonacoPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getPdfPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getGcodePreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getQoiPreviewHandlerChangeSet(installationDir, PER_USER),
|
||||
getSvgThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getPdfThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getGcodeThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getStlThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getQoiThumbnailHandlerChangeSet(installationDir, PER_USER),
|
||||
getRegistryPreviewChangeSet(installationDir, PER_USER),
|
||||
getRegistryPreviewSetDefaultAppChangeSet(installationDir, PER_USER) };
|
||||
}
|
||||
|
||||
@@ -395,6 +395,7 @@ namespace registry
|
||||
std::wstring className,
|
||||
std::wstring displayName,
|
||||
std::vector<std::wstring> fileTypes,
|
||||
std::wstring perceivedType = L"",
|
||||
std::wstring fileKindType = L"")
|
||||
{
|
||||
const HKEY scope = perUser ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
|
||||
@@ -436,9 +437,8 @@ namespace registry
|
||||
|
||||
for (const auto& fileType : fileTypes)
|
||||
{
|
||||
std::wstring fileAssociationPath = L"Software\\Classes\\";
|
||||
fileAssociationPath += fileType;
|
||||
fileAssociationPath += L"\\shellex\\";
|
||||
std::wstring fileTypePath = L"Software\\Classes\\" + fileType;
|
||||
std::wstring fileAssociationPath = fileTypePath + L"\\shellex\\";
|
||||
fileAssociationPath += handlerType == PreviewHandlerType::preview ? IPREVIEW_HANDLER_CLSID : ITHUMBNAIL_PROVIDER_CLSID;
|
||||
changes.push_back({ scope, fileAssociationPath, std::nullopt, handlerClsid });
|
||||
if (!fileKindType.empty())
|
||||
@@ -448,6 +448,10 @@ namespace registry
|
||||
std::wstring kindMapPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\KindMap";
|
||||
changes.push_back({ HKEY_LOCAL_MACHINE, kindMapPath, fileType, fileKindType, false});
|
||||
}
|
||||
if (!perceivedType.empty())
|
||||
{
|
||||
changes.push_back({ scope, fileTypePath, L"PerceivedType", perceivedType });
|
||||
}
|
||||
if (handlerType == PreviewHandlerType::preview && fileType == L".reg")
|
||||
{
|
||||
// this regfile registry key has precedence over Software\Classes\.reg for .reg files
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<policyNamespaces>
|
||||
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
|
||||
</policyNamespaces>
|
||||
<resources minRequiredRevision="1.5"/><!-- Last changed with PowerToys v0.75.1 -->
|
||||
<resources minRequiredRevision="1.6"/><!-- Last changed with PowerToys v0.76.0 -->
|
||||
<supportedOn>
|
||||
<definitions>
|
||||
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
|
||||
@@ -14,6 +14,7 @@
|
||||
<definition name="SUPPORTED_POWERTOYS_0_70_0" displayName="$(string.SUPPORTED_POWERTOYS_0_70_0)"/>
|
||||
<definition name="SUPPORTED_POWERTOYS_0_73_0" displayName="$(string.SUPPORTED_POWERTOYS_0_73_0)"/>
|
||||
<definition name="SUPPORTED_POWERTOYS_0_75_0" displayName="$(string.SUPPORTED_POWERTOYS_0_75_0)"/>
|
||||
<definition name="SUPPORTED_POWERTOYS_0_76_0" displayName="$(string.SUPPORTED_POWERTOYS_0_76_0)"/>
|
||||
</definitions>
|
||||
</supportedOn>
|
||||
<categories>
|
||||
@@ -188,6 +189,26 @@
|
||||
<decimal value="0" />
|
||||
</disabledValue>
|
||||
</policy>
|
||||
<policy name="ConfigureEnabledUtilityFileExplorerQOIPreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerQOIPreview)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerQOIPreview">
|
||||
<parentCategory ref="PowerToys" />
|
||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_76_0" />
|
||||
<enabledValue>
|
||||
<decimal value="1" />
|
||||
</enabledValue>
|
||||
<disabledValue>
|
||||
<decimal value="0" />
|
||||
</disabledValue>
|
||||
</policy>
|
||||
<policy name="ConfigureEnabledUtilityFileExplorerQOIThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerQOIThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerQOIThumbnails">
|
||||
<parentCategory ref="PowerToys" />
|
||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_76_0" />
|
||||
<enabledValue>
|
||||
<decimal value="1" />
|
||||
</enabledValue>
|
||||
<disabledValue>
|
||||
<decimal value="0" />
|
||||
</disabledValue>
|
||||
</policy>
|
||||
<policy name="ConfigureEnabledUtilityFileExplorerSTLThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerSTLThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerSTLThumbnails">
|
||||
<parentCategory ref="PowerToys" />
|
||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) Microsoft Corporation.
|
||||
Licensed under the MIT License. -->
|
||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.5" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.6" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
|
||||
<displayName>PowerToys</displayName>
|
||||
<description>PowerToys</description>
|
||||
<resources>
|
||||
@@ -16,6 +16,7 @@
|
||||
<string id="SUPPORTED_POWERTOYS_0_70_0">PowerToys version 0.70.0 or later</string>
|
||||
<string id="SUPPORTED_POWERTOYS_0_73_0">PowerToys version 0.73.0 or later</string>
|
||||
<string id="SUPPORTED_POWERTOYS_0_75_0">PowerToys version 0.75.0 or later</string>
|
||||
<string id="SUPPORTED_POWERTOYS_0_76_0">PowerToys version 0.76.0 or later</string>
|
||||
|
||||
<string id="ConfigureGlobalUtilityEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
|
||||
|
||||
@@ -23,7 +24,7 @@ If you enable this setting, all utilities will be always enabled and the user wo
|
||||
|
||||
If you disable this setting, all utilities will be always disabled and the user won't be able to enable it.
|
||||
|
||||
If you don't configure this setting, users are able to disable or enable the utilities.
|
||||
If you don't configure this setting, users are able to enable or disable the utilities.
|
||||
|
||||
The individual enabled state policies for the utilities will override this policy.
|
||||
</string>
|
||||
@@ -34,7 +35,7 @@ If you enable this setting, the utility will be always enabled and the user won'
|
||||
|
||||
If you disable this setting, the utility will be always disabled and the user won't be able to enable it.
|
||||
|
||||
If you don't configure this setting, users are able to disable or enable the utility.
|
||||
If you don't configure this setting, users are able to enable or disable the utility.
|
||||
|
||||
This policy has a higher priority than the policy "Configure global utility enabled state" and overrides it.
|
||||
</string>
|
||||
@@ -46,7 +47,7 @@ If you enable this setting, the utility will be always enabled and the user won'
|
||||
|
||||
If you disable this setting, the utility will be always disabled and the user won't be able to enable it.
|
||||
|
||||
If you don't configure this setting, users are able to disable or enable the utility.
|
||||
If you don't configure this setting, users are able to enable or disable the utility.
|
||||
|
||||
This policy has a higher priority than the policy "Configure global utility enabled state" and overrides it.
|
||||
</string>
|
||||
@@ -78,7 +79,7 @@ If disabled or not configured, the automatic update checks are enabled.
|
||||
</string>
|
||||
<string id="AllowExperimentationDescription">This policy configures whether PowerToys experimentation is allowed. With experimentation allowed the user sees the new features being experimented if it gets selected as part of the test group. (Experimentation will only happen on Windows Insider builds.)
|
||||
|
||||
If this setting is not configured or enabled, the user can control experimentation in the PowerToys settings menu.
|
||||
If this setting is enabled or not configured, the user can control experimentation in the PowerToys settings menu.
|
||||
|
||||
If this setting is disabled, experimentation is not allowed.
|
||||
</string>
|
||||
@@ -88,22 +89,22 @@ If you enable this setting, the plugins will be always enabled and the user won'
|
||||
|
||||
If you disable this setting, the plugins will be always disabled and the user won't be able to enable it.
|
||||
|
||||
If you don't configure this setting, users are able to disable or enable the plugins.
|
||||
If you don't configure this setting, users are able to enable or disable the plugins.
|
||||
|
||||
You can override this policy for individual plugins using the policy "Configure enabled state for individual plugins".
|
||||
|
||||
Note: Changes require a restart of PowerToys Run.
|
||||
</string>
|
||||
<string id="PowerToysRunIndividualPluginEnabledStateDescription">With this policy you can configures an individual enabled state for each PowerToys Run plugin that you add to the list.
|
||||
<string id="PowerToysRunIndividualPluginEnabledStateDescription">With this policy you can configure an individual enabled state for each PowerToys Run plugin that you add to the list.
|
||||
|
||||
If you enable this setting, you can define the list of plugins and their enabled states:
|
||||
- The value name (first column) is the plugin ID. You will find it in the plugin.json which is located in the plugin folder.
|
||||
- The value name (first column) is the plugin ID. You will find it in the plugin.json file which is located in the plugin folder.
|
||||
- The value (second column) is a numeric value: 0 for disabled, 1 for enabled and 2 for user takes control.
|
||||
- Example to disable the Program plugin: 791FC278BA414111B8D1886DFE447410 | 0
|
||||
|
||||
If you disable or don't configure this policy, either the user or the policy "Configure enabled state for all plugins" takes control over the enabled state of the plugins.
|
||||
|
||||
You can set the enabled state for all plugins not listed here using the policy "Configure enabled state for all plugins".
|
||||
You can set the enabled state for all plugins not configured by this policy using the policy "Configure enabled state for all plugins".
|
||||
|
||||
Note: Changes require a restart of PowerToys Run.
|
||||
</string>
|
||||
@@ -149,6 +150,8 @@ Note: Changes require a restart of PowerToys Run.
|
||||
<string id="AllowExperimentation">Allow Experimentation</string>
|
||||
<string id="PowerToysRunAllPluginsEnabledState">Configure enabled state for all plugins</string>
|
||||
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
|
||||
<string id="ConfigureEnabledUtilityFileExplorerQOIPreview">QOI file preview: Configure enabled state</string>
|
||||
<string id="ConfigureEnabledUtilityFileExplorerQOIThumbnails">QOI file thumbnail: Configure enabled state</string>
|
||||
</stringTable>
|
||||
|
||||
<presentationTable>
|
||||
|
||||
@@ -188,7 +188,7 @@ int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR lpCmdLine, _I
|
||||
m_reparent_event_handle = CreateEventW(nullptr, false, false, CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT);
|
||||
m_thumbnail_event_handle = CreateEventW(nullptr, false, false, CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT);
|
||||
m_exit_event_handle = CreateEventW(nullptr, false, false, CommonSharedConstants::CROP_AND_LOCK_EXIT_EVENT);
|
||||
if (!m_reparent_event_handle || !m_reparent_event_handle || !m_exit_event_handle)
|
||||
if (!m_reparent_event_handle || !m_thumbnail_event_handle || !m_exit_event_handle)
|
||||
{
|
||||
Logger::warn(L"Failed to create events. {}", get_last_error_or_default(GetLastError()));
|
||||
return 1;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<RootNamespace>EnvironmentVariables</RootNamespace>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
//contains the non localized key of the powertoy
|
||||
std::wstring app_key;
|
||||
|
||||
HANDLE m_hProcess;
|
||||
HANDLE m_hProcess = nullptr;
|
||||
|
||||
HANDLE m_hShowEvent;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{c604b37e-9d0e-4484-8778-e8b31b0e1b3a}</ProjectGuid>
|
||||
<RootNamespace>FileLocksmithLibInterop</RootNamespace>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
|
||||
<TargetName>PowerToys.FileLocksmithLib.Interop</TargetName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -309,9 +309,8 @@ std::wstring NtdllExtensions::pid_to_user(DWORD pid)
|
||||
}
|
||||
|
||||
DWORD token_size = 0;
|
||||
GetTokenInformation(token, TokenUser, nullptr, 0, &token_size);
|
||||
|
||||
if (token_size < 0)
|
||||
const bool ok = GetTokenInformation(token, TokenUser, nullptr, 0, &token_size);
|
||||
if ((!ok && GetLastError() != ERROR_INSUFFICIENT_BUFFER) || !token_size)
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<AssemblyTitle>PowerToys.FileLocksmith</AssemblyTitle>
|
||||
<AssemblyDescription>PowerToys File Locksmith</AssemblyDescription>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
|
||||
<RootNamespace>PowerToys.FileLocksmithUI</RootNamespace>
|
||||
<AssemblyName>PowerToys.FileLocksmithUI</AssemblyName>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -5,11 +5,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps</PublishDir>
|
||||
<RuntimeIdentifier>win10-$(Platform)</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<IsPackable>false</IsPackable>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<RootNamespace>Hosts</RootNamespace>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
|
||||
<WindowsPackageType>None</WindowsPackageType>
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace Hosts.ViewModels
|
||||
Entries.RefreshFilter();
|
||||
}
|
||||
|
||||
// Ping and duplicate should't trigger a file save
|
||||
// Ping and duplicate should not trigger a file save
|
||||
if (e.PropertyName == nameof(Entry.Ping)
|
||||
|| e.PropertyName == nameof(Entry.Pinging)
|
||||
|| e.PropertyName == nameof(Entry.Duplicate))
|
||||
|
||||
@@ -51,9 +51,9 @@ private:
|
||||
|
||||
HANDLE m_hProcess = nullptr;
|
||||
|
||||
HANDLE m_hShowEvent;
|
||||
HANDLE m_hShowEvent{};
|
||||
|
||||
HANDLE m_hShowAdminEvent;
|
||||
HANDLE m_hShowAdminEvent{};
|
||||
|
||||
bool is_process_running()
|
||||
{
|
||||
|
||||
@@ -32,8 +32,6 @@ namespace
|
||||
winrt::com_ptr<ID2D1Bitmap> ConvertID3D11Texture2DToD2D1Bitmap(winrt::com_ptr<ID2D1RenderTarget> rt,
|
||||
const MappedTextureView* capturedScreenTexture)
|
||||
{
|
||||
capturedScreenTexture->view.pixels;
|
||||
|
||||
D2D1_BITMAP_PROPERTIES props = { .pixelFormat = rt->GetPixelFormat() };
|
||||
rt->GetDpi(&props.dpiX, &props.dpiY);
|
||||
const auto sizeF = rt->GetSize();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.props" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.props" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.props')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.props')" />
|
||||
<PropertyGroup Label="Globals">
|
||||
@@ -147,7 +147,7 @@
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220914.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220914.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.targets" Condition="Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.targets')" />
|
||||
<Import Project="..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
@@ -158,7 +158,7 @@
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.221104.6\build\native\Microsoft.Windows.CppWinRT.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.755\build\Microsoft.Windows.SDK.BuildTools.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.230913002\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.WindowsAppSDK.1.4.231115000\build\native\Microsoft.WindowsAppSDK.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -3,5 +3,5 @@
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.221104.6" targetFramework="native" />
|
||||
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
|
||||
<package id="Microsoft.Windows.SDK.BuildTools" version="10.0.22621.755" targetFramework="native" />
|
||||
<package id="Microsoft.WindowsAppSDK" version="1.4.230913002" targetFramework="native" />
|
||||
<package id="Microsoft.WindowsAppSDK" version="1.4.231115000" targetFramework="native" />
|
||||
</packages>
|
||||
@@ -5,14 +5,14 @@
|
||||
<AssemblyTitle>PowerToys.MeasureTool</AssemblyTitle>
|
||||
<AssemblyDescription>PowerToys MeasureTool</AssemblyDescription>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
|
||||
<RootNamespace>PowerToys.MeasureToolUI</RootNamespace>
|
||||
<AssemblyName>PowerToys.MeasureToolUI</AssemblyName>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ProjectGuid>{D9C5DE64-6849-4278-91AD-9660AECF2876}</ProjectGuid>
|
||||
|
||||
@@ -16,10 +16,7 @@ internal static class LayoutHelper
|
||||
public static LayoutInfo CalculateLayoutInfo(
|
||||
LayoutConfig layoutConfig)
|
||||
{
|
||||
if (layoutConfig is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(layoutConfig));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(layoutConfig);
|
||||
|
||||
var builder = new LayoutInfo.Builder
|
||||
{
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -32,7 +32,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>MouseJumpUI</RootNamespace>
|
||||
<AssemblyName>PowerToys.MouseJumpUI</AssemblyName>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace MouseWithoutBorders
|
||||
byte[] rv;
|
||||
string myKey = Common.MyKey;
|
||||
|
||||
if (!LegalKeyDictionary.ContainsKey(myKey))
|
||||
if (!LegalKeyDictionary.TryGetValue(myKey, out byte[] value))
|
||||
{
|
||||
Rfc2898DeriveBytes key = new(
|
||||
myKey,
|
||||
@@ -127,7 +127,7 @@ namespace MouseWithoutBorders
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = LegalKeyDictionary[myKey];
|
||||
rv = value;
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
@@ -85,28 +85,6 @@ namespace MouseWithoutBorders
|
||||
return stack;
|
||||
}
|
||||
|
||||
internal static void SuspendAllThreadsBut(int threadId)
|
||||
{
|
||||
lock (ThreadsLock)
|
||||
{
|
||||
#pragma warning disable 618 // Temporary
|
||||
threads.Where(t => t.IsAlive && t.ManagedThreadId != threadId).ToList().ForEach(
|
||||
t =>
|
||||
{
|
||||
try
|
||||
{
|
||||
t.Suspend();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// This method is suspending every thread so that it can kill the process right after restarting.
|
||||
// Makes no sense to crash on a thread suspension fail, since we're killing the process afterwards, anyway.
|
||||
}
|
||||
});
|
||||
#pragma warning restore 618
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetApartmentState(ApartmentState apartmentState)
|
||||
{
|
||||
thread.SetApartmentState(apartmentState);
|
||||
|
||||
@@ -349,8 +349,6 @@ namespace MouseWithoutBorders
|
||||
_ = Process.Start(Application.ExecutablePath, desktop);
|
||||
LogDebug($"Started on desktop {desktop}");
|
||||
|
||||
Thread.SuspendAllThreadsBut(Thread.CurrentThread.ManagedThreadId);
|
||||
|
||||
Process.GetCurrentProcess().KillProcess(true);
|
||||
},
|
||||
$"{actionName} watchdog").Start();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<OutputType>WinExe</OutputType>
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<OutputType>WinExe</OutputType>
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<DefineConstants>TRACE;DEBUG;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN</DefineConstants>
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ui:ThemesDictionary Theme="Dark" />
|
||||
<ui:ControlsDictionary />
|
||||
<ResourceDictionary Source="/Styles/Colors.xaml" />
|
||||
<ResourceDictionary Source="/Styles/ButtonStyles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
@@ -220,9 +220,6 @@ public class WrappingStream : Stream
|
||||
private void ThrowIfDisposed()
|
||||
{
|
||||
// throws an ObjectDisposedException if this object has been disposed
|
||||
if (_streamBase == null)
|
||||
{
|
||||
throw new ObjectDisposedException(GetType().Name);
|
||||
}
|
||||
ObjectDisposedException.ThrowIf(_streamBase == null, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:PowerOCR"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:p="clr-namespace:PowerOCR.Properties"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="TextExtractor"
|
||||
Width="200"
|
||||
Height="200"
|
||||
ui:Design.Background="Transparent"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Loaded="Window_Loaded"
|
||||
@@ -23,19 +24,22 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Window.Resources>
|
||||
<Style x:Key="SymbolTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Style BasedOn="{StaticResource DefaultToggleButtonStyle}" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Margin" Value="4,0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Margin" Value="2,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="Width" Value="30" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
|
||||
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}">
|
||||
<Setter Property="Margin" Value="4,0" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
@@ -70,23 +74,23 @@
|
||||
<MenuItem
|
||||
Name="SingleLineMenuItem"
|
||||
Click="SingleLineMenuItem_Click"
|
||||
Header="Make Result Text Single Line"
|
||||
Header="{x:Static p:Resources.ResultTextSingleLine}"
|
||||
IsCheckable="True" />
|
||||
<MenuItem
|
||||
Name="TableMenuItem"
|
||||
Click="TableToggleButton_Click"
|
||||
Header="OCR text as a table"
|
||||
Header="{x:Static p:Resources.ResultTextTable}"
|
||||
IsCheckable="True" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
Name="SettingsMenuItem"
|
||||
Click="SettingsMenuItem_Click"
|
||||
Header="Settings" />
|
||||
Header="{x:Static p:Resources.Settings}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
Name="CancelMenuItem"
|
||||
Click="CancelMenuItem_Click"
|
||||
Header="Cancel" />
|
||||
Header="{x:Static p:Resources.Cancel}" />
|
||||
</ContextMenu>
|
||||
</Canvas.ContextMenu>
|
||||
</Canvas>
|
||||
@@ -96,7 +100,6 @@
|
||||
Padding="4,8,12,8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
d:Background="White"
|
||||
d:Visibility="Visible"
|
||||
Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
CornerRadius="8"
|
||||
@@ -104,75 +107,60 @@
|
||||
<Border.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="32"
|
||||
Direction="-90"
|
||||
Opacity="0.6"
|
||||
RenderingBias="Performance" />
|
||||
Opacity="0.28"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="1" />
|
||||
</Border.Effect>
|
||||
|
||||
<StackPanel
|
||||
Margin="2,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="LanguagesComboBox"
|
||||
Margin="2,0"
|
||||
Padding="4,2,0,2"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Height="32"
|
||||
Margin="4,0"
|
||||
AutomationProperties.Name="{x:Static p:Resources.SelectedLang}"
|
||||
SelectionChanged="LanguagesComboBox_SelectionChanged">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Segoe UI"
|
||||
Style="{StaticResource SymbolTextStyle}"
|
||||
Text="{Binding NativeName}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ToggleButton
|
||||
x:Name="SingleLineToggleButton"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Margin="2,0"
|
||||
d:IsChecked="True"
|
||||
AutomationProperties.Name="{x:Static p:Resources.ResultTextSingleLine}"
|
||||
Click="SingleLineMenuItem_Click"
|
||||
IsChecked="{Binding IsChecked, ElementName=SingleLineMenuItem, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSymbolButton}"
|
||||
ToolTip="(S) Make result a single line">
|
||||
<TextBlock Style="{StaticResource SymbolTextStyle}" Text="" />
|
||||
ToolTip="{x:Static p:Resources.ResultTextSingleLineShortcut}">
|
||||
<ui:SymbolIcon FontSize="18" Symbol="SubtractSquare24" />
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
x:Name="TableToggleButton"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Margin="2,0"
|
||||
d:IsChecked="True"
|
||||
AutomationProperties.Name="{x:Static p:Resources.ResultTextTable}"
|
||||
Click="TableToggleButton_Click"
|
||||
IsChecked="{Binding IsChecked, ElementName=TableMenuItem, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSymbolButton}"
|
||||
ToolTip="(T) OCR text as a table">
|
||||
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" />
|
||||
ToolTip="{x:Static p:Resources.ResultTextTableShortcut}">
|
||||
<ui:SymbolIcon FontSize="18" Symbol="Table24" />
|
||||
</ToggleButton>
|
||||
<Button
|
||||
x:Name="SettingsButton"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Margin="2,0"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Settings}"
|
||||
Click="SettingsMenuItem_Click"
|
||||
Style="{StaticResource SymbolButton}"
|
||||
ToolTip="Settings">
|
||||
<TextBlock Style="{StaticResource SymbolTextStyle}" Text="" />
|
||||
ToolTip="{x:Static p:Resources.Settings}">
|
||||
<ui:SymbolIcon FontSize="18" Symbol="Settings24" />
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="CancelButton"
|
||||
Width="34"
|
||||
Height="34"
|
||||
Margin="2,0,0,0"
|
||||
Click="CancelMenuItem_Click"
|
||||
Style="{StaticResource SymbolButton}"
|
||||
ToolTip="(Esc) Cancel">
|
||||
<TextBlock Style="{StaticResource SymbolTextStyle}" Text="" />
|
||||
ToolTip="{x:Static p:Resources.CancelShortcut}">
|
||||
<ui:SymbolIcon FontSize="18" Symbol="Dismiss24" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -49,7 +49,7 @@ public partial class OCROverlay : Window
|
||||
Top = screenRectangle.Top >= 0 ? screenRectangle.Top : screenRectangle.Top + (screenRectangle.Height / 2);
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, Wpf.Ui.Controls.WindowBackdropType.None);
|
||||
PopulateLanguageMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -28,7 +28,7 @@
|
||||
<PackageIcon>PowerOCRLogo.png</PackageIcon>
|
||||
<RootNamespace>PowerOCR</RootNamespace>
|
||||
<AssemblyName>PowerToys.PowerOCR</AssemblyName>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<ProjectTypeGuids>{2150E333-8FDC-42A3-9474-1A3956D46DE8}</ProjectTypeGuids>
|
||||
@@ -61,4 +61,20 @@
|
||||
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
|
||||
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
135
src/modules/PowerOCR/PowerOCR/Properties/Resources.Designer.cs
generated
Normal file
135
src/modules/PowerOCR/PowerOCR/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,135 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace PowerOCR.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PowerOCR.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
public static string Cancel {
|
||||
get {
|
||||
return ResourceManager.GetString("Cancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel (Esc).
|
||||
/// </summary>
|
||||
public static string CancelShortcut {
|
||||
get {
|
||||
return ResourceManager.GetString("CancelShortcut", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format result as a single line.
|
||||
/// </summary>
|
||||
public static string ResultTextSingleLine {
|
||||
get {
|
||||
return ResourceManager.GetString("ResultTextSingleLine", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format result as a single line (S).
|
||||
/// </summary>
|
||||
public static string ResultTextSingleLineShortcut {
|
||||
get {
|
||||
return ResourceManager.GetString("ResultTextSingleLineShortcut", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format result as a table.
|
||||
/// </summary>
|
||||
public static string ResultTextTable {
|
||||
get {
|
||||
return ResourceManager.GetString("ResultTextTable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format result as a table (T).
|
||||
/// </summary>
|
||||
public static string ResultTextTableShortcut {
|
||||
get {
|
||||
return ResourceManager.GetString("ResultTextTableShortcut", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Selected language.
|
||||
/// </summary>
|
||||
public static string SelectedLang {
|
||||
get {
|
||||
return ResourceManager.GetString("SelectedLang", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Settings.
|
||||
/// </summary>
|
||||
public static string Settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
147
src/modules/PowerOCR/PowerOCR/Properties/Resources.resx
Normal file
147
src/modules/PowerOCR/PowerOCR/Properties/Resources.resx
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="CancelShortcut" xml:space="preserve">
|
||||
<value>Cancel (Esc)</value>
|
||||
<comment>(Esc) indicates the keyboard shortcut</comment>
|
||||
</data>
|
||||
<data name="ResultTextSingleLine" xml:space="preserve">
|
||||
<value>Format result as a single line</value>
|
||||
</data>
|
||||
<data name="ResultTextSingleLineShortcut" xml:space="preserve">
|
||||
<value>Format result as a single line (S)</value>
|
||||
<comment>(S) indicates the keyboard shortcut</comment>
|
||||
</data>
|
||||
<data name="ResultTextTable" xml:space="preserve">
|
||||
<value>Format result as a table</value>
|
||||
</data>
|
||||
<data name="ResultTextTableShortcut" xml:space="preserve">
|
||||
<value>Format result as a table (T)</value>
|
||||
<comment>(T) indicates the keyboard shortcut</comment>
|
||||
</data>
|
||||
<data name="SelectedLang" xml:space="preserve">
|
||||
<value>Selected language</value>
|
||||
</data>
|
||||
<data name="Settings" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,695 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="Menu.Static.Background" Color="{DynamicResource SolidBackgroundFillColorSecondaryBrush}" />
|
||||
<SolidColorBrush x:Key="Menu.Static.Border" Color="{DynamicResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="Menu.Static.Foreground" Color="White" />
|
||||
<SolidColorBrush x:Key="Menu.Static.Separator" Color="{DynamicResource SystemAccentColorSecondary}" />
|
||||
<SolidColorBrush x:Key="Menu.Disabled.Foreground" Color="#FF707070" />
|
||||
<SolidColorBrush x:Key="MenuItem.Selected.Background" Color="#3D26A0DA" />
|
||||
<SolidColorBrush x:Key="MenuItem.Selected.Border" Color="{DynamicResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="MenuItem.Highlight.Background" Color="#3D26A0DA" />
|
||||
<SolidColorBrush x:Key="MenuItem.Highlight.Border" Color="{DynamicResource SystemAccentColor}" />
|
||||
<SolidColorBrush x:Key="MenuItem.Highlight.Disabled.Background" Color="#0A000000" />
|
||||
<SolidColorBrush x:Key="MenuItem.Highlight.Disabled.Border" Color="#21000000" />
|
||||
<MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter" />
|
||||
<Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
|
||||
<Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
|
||||
<Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
|
||||
<Geometry x:Key="Checkmark">F1 M 10.0,1.2 L 4.7,9.1 L 4.5,9.1 L 0,5.2 L 1.3,3.5 L 4.3,6.1L 8.3,0 L 10.0,1.2 Z</Geometry>
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle
|
||||
Margin="2"
|
||||
SnapsToDevicePixels="true"
|
||||
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
||||
StrokeDashArray="1 2"
|
||||
StrokeThickness="1" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#071818" />
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#071818" />
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383" />
|
||||
|
||||
|
||||
<Style x:Key="ToggleSymbolButton" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
x:Name="contentPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SystemAccentColorBrush}" />
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" />
|
||||
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" />
|
||||
<Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="MenuScrollButton"
|
||||
BasedOn="{x:Null}"
|
||||
TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="ClickMode" Value="Hover" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border
|
||||
x:Name="templateRoot"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="1"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
Margin="6"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
|
||||
<Border
|
||||
x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter
|
||||
x:Name="Icon"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Icon"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Path
|
||||
x:Name="GlyphPanel"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Data="{StaticResource Checkmark}"
|
||||
Fill="{StaticResource Menu.Static.Foreground}"
|
||||
FlowDirection="LeftToRight"
|
||||
Visibility="Collapsed" />
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Background}" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
<Setter TargetName="GlyphPanel" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsHighlighted" Value="True" />
|
||||
<Condition Property="IsEnabled" Value="False" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Disabled.Background}" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Disabled.Border}" />
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
|
||||
<Border
|
||||
x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter
|
||||
x:Name="Icon"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Icon"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Path
|
||||
x:Name="GlyphPanel"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Data="{StaticResource Checkmark}"
|
||||
Fill="{TemplateBinding Foreground}"
|
||||
FlowDirection="LeftToRight"
|
||||
Visibility="Collapsed" />
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Popup
|
||||
x:Name="PART_Popup"
|
||||
AllowsTransparency="true"
|
||||
Focusable="false"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Placement="Bottom"
|
||||
PlacementTarget="{Binding ElementName=templateRoot}"
|
||||
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
|
||||
<Border
|
||||
x:Name="SubMenuBorder"
|
||||
Padding="2"
|
||||
Background="{StaticResource Menu.Static.Background}"
|
||||
BorderBrush="{StaticResource Menu.Static.Border}"
|
||||
BorderThickness="1">
|
||||
<ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
||||
<Grid RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas
|
||||
Width="0"
|
||||
Height="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<Rectangle
|
||||
x:Name="OpaqueRect"
|
||||
Width="{Binding ActualWidth, ElementName=SubMenuBorder}"
|
||||
Height="{Binding ActualHeight, ElementName=SubMenuBorder}"
|
||||
Fill="{Binding Background, ElementName=SubMenuBorder}" />
|
||||
</Canvas>
|
||||
<Rectangle
|
||||
Width="1"
|
||||
Margin="29,2,0,2"
|
||||
HorizontalAlignment="Left"
|
||||
Fill="{StaticResource Menu.Static.Separator}" />
|
||||
<ItemsPresenter
|
||||
x:Name="ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="true"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"
|
||||
KeyboardNavigation.TabNavigation="Cycle"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
||||
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Background}" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
<Setter TargetName="GlyphPanel" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
</Trigger>
|
||||
<Trigger SourceName="SubMenuScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
|
||||
<Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=SubMenuScrollViewer}" />
|
||||
<Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=SubMenuScrollViewer}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
|
||||
<Border
|
||||
x:Name="templateRoot"
|
||||
Height="22"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid Margin="-1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition
|
||||
Width="Auto"
|
||||
MinWidth="22"
|
||||
SharedSizeGroup="MenuItemIconColumnGroup" />
|
||||
<ColumnDefinition Width="13" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
|
||||
<ColumnDefinition Width="20" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter
|
||||
x:Name="Icon"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Icon"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Border
|
||||
x:Name="GlyphPanel"
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="-1,0,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Background="{StaticResource MenuItem.Selected.Background}"
|
||||
BorderBrush="{StaticResource MenuItem.Selected.Border}"
|
||||
BorderThickness="1"
|
||||
ClipToBounds="False"
|
||||
Visibility="Hidden">
|
||||
<Path
|
||||
x:Name="Glyph"
|
||||
Width="10"
|
||||
Height="11"
|
||||
Data="{StaticResource Checkmark}"
|
||||
Fill="{StaticResource Menu.Static.Foreground}"
|
||||
FlowDirection="LeftToRight" />
|
||||
</Border>
|
||||
<ContentPresenter
|
||||
x:Name="menuHeaderContainer"
|
||||
Grid.Column="2"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<TextBlock
|
||||
x:Name="menuGestureText"
|
||||
Grid.Column="4"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
VerticalAlignment="Center"
|
||||
Opacity="0.7"
|
||||
Text="{TemplateBinding InputGestureText}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Background}" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
<Setter TargetName="Glyph" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsHighlighted" Value="True" />
|
||||
<Condition Property="IsEnabled" Value="False" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Disabled.Background}" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Disabled.Border}" />
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
|
||||
<Border
|
||||
x:Name="templateRoot"
|
||||
Height="22"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid Margin="-1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition
|
||||
Width="Auto"
|
||||
MinWidth="22"
|
||||
SharedSizeGroup="MenuItemIconColumnGroup" />
|
||||
<ColumnDefinition Width="13" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
|
||||
<ColumnDefinition Width="20" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter
|
||||
x:Name="Icon"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Icon"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Border
|
||||
x:Name="GlyphPanel"
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="-1,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Background="{StaticResource MenuItem.Highlight.Background}"
|
||||
BorderBrush="{StaticResource MenuItem.Highlight.Border}"
|
||||
BorderThickness="1"
|
||||
Visibility="Hidden">
|
||||
<Path
|
||||
x:Name="Glyph"
|
||||
Width="9"
|
||||
Height="11"
|
||||
Data="{DynamicResource Checkmark}"
|
||||
Fill="{StaticResource Menu.Static.Foreground}"
|
||||
FlowDirection="LeftToRight" />
|
||||
</Border>
|
||||
<ContentPresenter
|
||||
Grid.Column="2"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<TextBlock
|
||||
Grid.Column="4"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
VerticalAlignment="Center"
|
||||
Opacity="0.7"
|
||||
Text="{TemplateBinding InputGestureText}" />
|
||||
<Path
|
||||
x:Name="RightArrow"
|
||||
Grid.Column="5"
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Data="{StaticResource RightArrow}"
|
||||
Fill="{StaticResource Menu.Static.Foreground}" />
|
||||
<Popup
|
||||
x:Name="PART_Popup"
|
||||
AllowsTransparency="true"
|
||||
Focusable="false"
|
||||
HorizontalOffset="-2"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Placement="Right"
|
||||
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
|
||||
VerticalOffset="-3">
|
||||
<Border
|
||||
x:Name="SubMenuBorder"
|
||||
Padding="2"
|
||||
Background="{StaticResource Menu.Static.Background}"
|
||||
BorderBrush="{StaticResource Menu.Static.Border}"
|
||||
BorderThickness="1">
|
||||
<ScrollViewer x:Name="SubMenuScrollViewer" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
||||
<Grid RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas
|
||||
Width="0"
|
||||
Height="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<Rectangle
|
||||
x:Name="OpaqueRect"
|
||||
Width="{Binding ActualWidth, ElementName=SubMenuBorder}"
|
||||
Height="{Binding ActualHeight, ElementName=SubMenuBorder}"
|
||||
Fill="{Binding Background, ElementName=SubMenuBorder}" />
|
||||
</Canvas>
|
||||
<Rectangle
|
||||
Width="1"
|
||||
Margin="29,2,0,2"
|
||||
HorizontalAlignment="Left"
|
||||
Fill="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
|
||||
<ItemsPresenter
|
||||
x:Name="ItemsPresenter"
|
||||
Grid.IsSharedSizeScope="true"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"
|
||||
KeyboardNavigation.TabNavigation="Cycle"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
||||
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="templateRoot" Property="Background" Value="Transparent" />
|
||||
<Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
<Setter TargetName="Glyph" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
<Setter TargetName="RightArrow" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" />
|
||||
</Trigger>
|
||||
<Trigger SourceName="SubMenuScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
|
||||
<Setter TargetName="OpaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=SubMenuScrollViewer}" />
|
||||
<Setter TargetName="OpaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=SubMenuScrollViewer}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="DarkMenuItemStyle" TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Role" Value="TopLevelHeader">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Menu.Static.Foreground}" />
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="TopLevelItem">
|
||||
<Setter Property="Background" Value="{StaticResource Menu.Static.Background}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Menu.Static.Border}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Menu.Static.Foreground}" />
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="SubmenuHeader">
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TitleBarCloseButtonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
BorderThickness="0"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
x:Name="contentPresenter"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="Red" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="DarkRed" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="TitleBarButtonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
BorderThickness="0"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
x:Name="contentPresenter"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource Menu.Static.Border}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource Menu.Static.Separator}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TealColor" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="Background" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
x:Name="contentPresenter"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#071818" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="SymbolButton" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Padding" Value="6" />
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border
|
||||
x:Name="border"
|
||||
CornerRadius="4"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter
|
||||
x:Name="contentPresenter"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="border" Property="Background" Value="#071818" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColorSecondaryBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.3" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="DarkBackground" Color="{DynamicResource ApplicationBackgroundColor}" />
|
||||
<SolidColorBrush x:Key="DarkControlBackground" Color="{DynamicResource SolidBackgroundFillColorQuarternaryBrushColor}" />
|
||||
<SolidColorBrush x:Key="DarkTeal" Color="{DynamicResource SystemAccentColorSecondary}" />
|
||||
<SolidColorBrush x:Key="Teal" Color="{DynamicResource SystemAccentColor}" />
|
||||
</ResourceDictionary>
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <common/interop/shared_constants.h>
|
||||
#include <common/utils/logger_helper.h>
|
||||
#include <common/utils/winapi_error.h>
|
||||
#include <common/utils/package.h>
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE /*hModule*/,
|
||||
DWORD ul_reason_for_call,
|
||||
@@ -293,6 +294,13 @@ public:
|
||||
{
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
// Returns whether the PowerToys should be enabled by default
|
||||
virtual bool is_enabled_by_default() const override
|
||||
{
|
||||
// disabled by default for Windows 11 and enabled by default on Windows 10
|
||||
return !package::IsWin11OrGreater();
|
||||
}
|
||||
};
|
||||
|
||||
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\..\Version.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
|
||||
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
||||
@@ -79,6 +79,11 @@
|
||||
<Compile Update="Program.cs">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -87,11 +92,17 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -11,15 +11,9 @@ namespace Awake.Core
|
||||
{
|
||||
public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(target);
|
||||
|
||||
if (source == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(source));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(source);
|
||||
|
||||
foreach (var element in source)
|
||||
{
|
||||
|
||||
@@ -6,12 +6,14 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reactive.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Awake.Core.Models;
|
||||
using Awake.Core.Native;
|
||||
using Awake.Properties;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.Win32;
|
||||
@@ -274,9 +276,9 @@ namespace Awake.Core
|
||||
{
|
||||
Dictionary<string, int> optionsList = new Dictionary<string, int>
|
||||
{
|
||||
{ "30 minutes", 1800 },
|
||||
{ "1 hour", 3600 },
|
||||
{ "2 hours", 7200 },
|
||||
{ string.Format(CultureInfo.InvariantCulture, Resources.AWAKE_MINUTES, 30), 1800 },
|
||||
{ Resources.AWAKE_1_HOUR, 3600 },
|
||||
{ string.Format(CultureInfo.InvariantCulture, Resources.AWAKE_HOURS, 2), 7200 },
|
||||
};
|
||||
return optionsList;
|
||||
}
|
||||
|
||||
@@ -6,11 +6,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Awake.Core.Models;
|
||||
using Awake.Core.Native;
|
||||
using Awake.Properties;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
|
||||
@@ -115,11 +117,11 @@ namespace Awake.Core
|
||||
if (!startedFromPowerToys)
|
||||
{
|
||||
// If Awake is started from PowerToys, the correct way to exit it is disabling it from Settings.
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING, (uint)TrayCommands.TC_EXIT, "Exit");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING, (uint)TrayCommands.TC_EXIT, Resources.AWAKE_EXIT);
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_SEPARATOR, 0, string.Empty);
|
||||
}
|
||||
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (keepDisplayOn ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED) | (mode == AwakeMode.PASSIVE ? Native.Constants.MF_DISABLED : Native.Constants.MF_ENABLED), (uint)TrayCommands.TC_DISPLAY_SETTING, "Keep screen on");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (keepDisplayOn ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED) | (mode == AwakeMode.PASSIVE ? Native.Constants.MF_DISABLED : Native.Constants.MF_ENABLED), (uint)TrayCommands.TC_DISPLAY_SETTING, Resources.AWAKE_KEEP_SCREEN_ON);
|
||||
}
|
||||
|
||||
// In case there are no tray shortcuts defined for the application default to a
|
||||
@@ -137,10 +139,10 @@ namespace Awake.Core
|
||||
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_SEPARATOR, 0, string.Empty);
|
||||
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (mode == AwakeMode.PASSIVE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_PASSIVE, "Off (keep using the selected power plan)");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (mode == AwakeMode.INDEFINITE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_INDEFINITE, "Keep awake indefinitely");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_POPUP | (mode == AwakeMode.TIMED ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)awakeTimeMenu, "Keep awake on interval");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | Native.Constants.MF_DISABLED | (mode == AwakeMode.EXPIRABLE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_EXPIRABLE, "Keep awake until expiration date and time");
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (mode == AwakeMode.PASSIVE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_PASSIVE, Resources.AWAKE_OFF);
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | (mode == AwakeMode.INDEFINITE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_INDEFINITE, Resources.AWAKE_KEEP_INDEFINITELY);
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_POPUP | (mode == AwakeMode.TIMED ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)awakeTimeMenu, Resources.AWAKE_KEEP_ON_INTERVAL);
|
||||
Bridge.InsertMenu(TrayMenu, 0, Native.Constants.MF_BYPOSITION | Native.Constants.MF_STRING | Native.Constants.MF_DISABLED | (mode == AwakeMode.EXPIRABLE ? Native.Constants.MF_CHECKED : Native.Constants.MF_UNCHECKED), (uint)TrayCommands.TC_MODE_EXPIRABLE, Resources.AWAKE_KEEP_UNTIL_EXPIRATION);
|
||||
|
||||
TrayIcon.Text = text;
|
||||
}
|
||||
@@ -157,7 +159,7 @@ namespace Awake.Core
|
||||
|
||||
public override AccessibleRole Role => AccessibleRole.CheckButton;
|
||||
|
||||
public override string Name => _menuItem.Text + ", " + Role + ", " + (_menuItem.Checked ? "Checked" : "Unchecked");
|
||||
public override string Name => _menuItem.Text + ", " + Role + ", " + (_menuItem.Checked ? Resources.AWAKE_CHECKED : Resources.AWAKE_UNCHECKED);
|
||||
}
|
||||
|
||||
private sealed class CheckButtonToolStripMenuItem : ToolStripMenuItem
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user