From a1f7c97c5933bf99f1af30a4e520cee1ba3475e2 Mon Sep 17 00:00:00 2001
From: Kyaw Thant <48363984+kythant@users.noreply.github.com>
Date: Tue, 10 Mar 2026 23:52:36 -0700
Subject: [PATCH] Revert "The Test App for Microsoft.Windows.Storage.Pickers
(#6195)"
This reverts commit 6c48c726d3e0e33b7782bc4ce2b9c70a64ba4919.
---
WindowsAppRuntime.sln | 27 -
test/TestApps/StoragePickersTestApp/App.xaml | 16 -
.../StoragePickersTestApp/App.xaml.cpp | 42 -
.../TestApps/StoragePickersTestApp/App.xaml.h | 19 -
.../Assets/LockScreenLogo.scale-200.png | Bin 432 -> 0 bytes
.../Assets/SplashScreen.scale-200.png | Bin 5372 -> 0 bytes
.../Assets/Square150x150Logo.scale-200.png | Bin 1755 -> 0 bytes
.../Assets/Square44x44Logo.scale-200.png | Bin 637 -> 0 bytes
...x44Logo.targetsize-24_altform-unplated.png | Bin 283 -> 0 bytes
.../Assets/StoreLogo.png | Bin 456 -> 0 bytes
.../Assets/Wide310x150Logo.scale-200.png | Bin 2097 -> 0 bytes
.../Directory.Build.props | 10 -
.../Directory.Build.targets | 8 -
.../StoragePickersTestApp/MainWindow.idl | 11 -
.../StoragePickersTestApp/MainWindow.xaml | 271 ------
.../StoragePickersTestApp/MainWindow.xaml.cpp | 797 ------------------
.../StoragePickersTestApp/MainWindow.xaml.h | 65 --
.../Package.appxmanifest | 51 --
.../StoragePickersTestApp.exe.manifest | 29 -
.../StoragePickersTestApp.vcxproj | 285 -------
.../StoragePickersTestApp.vcxproj.filters | 59 --
.../StoragePickersTestApp/app.manifest | 16 -
test/TestApps/StoragePickersTestApp/main.cpp | 21 -
.../StoragePickersTestApp/packages.config | 8 -
test/TestApps/StoragePickersTestApp/pch.cpp | 4 -
test/TestApps/StoragePickersTestApp/pch.h | 37 -
26 files changed, 1776 deletions(-)
delete mode 100644 test/TestApps/StoragePickersTestApp/App.xaml
delete mode 100644 test/TestApps/StoragePickersTestApp/App.xaml.cpp
delete mode 100644 test/TestApps/StoragePickersTestApp/App.xaml.h
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/LockScreenLogo.scale-200.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/SplashScreen.scale-200.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/Square150x150Logo.scale-200.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/Square44x44Logo.scale-200.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/StoreLogo.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Assets/Wide310x150Logo.scale-200.png
delete mode 100644 test/TestApps/StoragePickersTestApp/Directory.Build.props
delete mode 100644 test/TestApps/StoragePickersTestApp/Directory.Build.targets
delete mode 100644 test/TestApps/StoragePickersTestApp/MainWindow.idl
delete mode 100644 test/TestApps/StoragePickersTestApp/MainWindow.xaml
delete mode 100644 test/TestApps/StoragePickersTestApp/MainWindow.xaml.cpp
delete mode 100644 test/TestApps/StoragePickersTestApp/MainWindow.xaml.h
delete mode 100644 test/TestApps/StoragePickersTestApp/Package.appxmanifest
delete mode 100644 test/TestApps/StoragePickersTestApp/StoragePickersTestApp.exe.manifest
delete mode 100644 test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj
delete mode 100644 test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj.filters
delete mode 100644 test/TestApps/StoragePickersTestApp/app.manifest
delete mode 100644 test/TestApps/StoragePickersTestApp/main.cpp
delete mode 100644 test/TestApps/StoragePickersTestApp/packages.config
delete mode 100644 test/TestApps/StoragePickersTestApp/pch.cpp
delete mode 100644 test/TestApps/StoragePickersTestApp/pch.h
diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln
index 30cd8eb7d5..d36b1388a6 100644
--- a/WindowsAppRuntime.sln
+++ b/WindowsAppRuntime.sln
@@ -755,8 +755,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Deployment.WindowsAppRuntim
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Deployment.WindowsAppRuntime.Test.SingletonLowerVersion", "test\Deployment\data\WindowsAppRuntime.Test.SingletonLowerVersion\WindowsAppRuntime.Test.SingletonLowerVersion.vcxproj", "{7A3C8F5D-9B2E-4A1F-8D6C-3E9F7B4A2C1D}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StoragePickersTestApp", "test\TestApps\StoragePickersTestApp\StoragePickersTestApp.vcxproj", "{D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -2667,30 +2665,6 @@ Global
{7A3C8F5D-9B2E-4A1F-8D6C-3E9F7B4A2C1D}.Release|x64.Build.0 = Release|x64
{7A3C8F5D-9B2E-4A1F-8D6C-3E9F7B4A2C1D}.Release|x86.ActiveCfg = Release|Win32
{7A3C8F5D-9B2E-4A1F-8D6C-3E9F7B4A2C1D}.Release|x86.Build.0 = Release|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|Any CPU.ActiveCfg = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|Any CPU.Build.0 = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|Any CPU.Deploy.0 = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|ARM64.Build.0 = Debug|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x64.ActiveCfg = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x64.Build.0 = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x64.Deploy.0 = Debug|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x86.ActiveCfg = Debug|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x86.Build.0 = Debug|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Debug|x86.Deploy.0 = Debug|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|Any CPU.ActiveCfg = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|Any CPU.Build.0 = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|Any CPU.Deploy.0 = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|ARM64.ActiveCfg = Release|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|ARM64.Build.0 = Release|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|ARM64.Deploy.0 = Release|ARM64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x64.ActiveCfg = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x64.Build.0 = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x64.Deploy.0 = Release|x64
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x86.ActiveCfg = Release|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x86.Build.0 = Release|Win32
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2919,7 +2893,6 @@ Global
{06AA7FD7-36BE-41AC-9008-56919D1612C6} = {3B706C5C-55E0-4B76-BF59-89E20FE46795}
{462CF10A-E6B5-4005-8E25-132D1DE589B7} = {2B653A15-2482-40E5-9509-C531E69D0749}
{7A3C8F5D-9B2E-4A1F-8D6C-3E9F7B4A2C1D} = {2B653A15-2482-40E5-9509-C531E69D0749}
- {D1310DE7-70EC-4B6A-8A78-2A31BCFA037F} = {AC5FFC80-92FE-4933-BED2-EC5519AC4440}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4B3D7591-CFEC-4762-9A07-ABE99938FB77}
diff --git a/test/TestApps/StoragePickersTestApp/App.xaml b/test/TestApps/StoragePickersTestApp/App.xaml
deleted file mode 100644
index 400df8963b..0000000000
--- a/test/TestApps/StoragePickersTestApp/App.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/App.xaml.cpp b/test/TestApps/StoragePickersTestApp/App.xaml.cpp
deleted file mode 100644
index 6c5316458a..0000000000
--- a/test/TestApps/StoragePickersTestApp/App.xaml.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#include "pch.h"
-#include "App.xaml.h"
-#include "MainWindow.xaml.h"
-
-#include
-#include
-
-using namespace winrt;
-using namespace Microsoft::UI::Xaml;
-
-namespace winrt::StoragePickersTestApp::implementation
-{
- App::App()
- {
-#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
- UnhandledException([](IInspectable const&, UnhandledExceptionEventArgs const& e)
- {
- if (IsDebuggerPresent())
- {
- auto errorMessage = e.Message();
- __debugbreak();
- }
- });
-#endif
- }
-
- void App::OnLaunched([[maybe_unused]] LaunchActivatedEventArgs const& e)
- {
- window = make();
- window.as()->InitializeDefaults();
-
- if (auto appWindow = window.AppWindow())
- {
- appWindow.Resize(winrt::Windows::Graphics::SizeInt32{ 1800, 1220 });
- }
-
- window.Activate();
- }
-}
diff --git a/test/TestApps/StoragePickersTestApp/App.xaml.h b/test/TestApps/StoragePickersTestApp/App.xaml.h
deleted file mode 100644
index b8ddc37cb9..0000000000
--- a/test/TestApps/StoragePickersTestApp/App.xaml.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#pragma once
-
-#include "App.xaml.g.h"
-
-namespace winrt::StoragePickersTestApp::implementation
-{
- struct App : AppT
- {
- App();
-
- void OnLaunched(Microsoft::UI::Xaml::LaunchActivatedEventArgs const&);
-
- private:
- winrt::Microsoft::UI::Xaml::Window window{ nullptr };
- };
-}
diff --git a/test/TestApps/StoragePickersTestApp/Assets/LockScreenLogo.scale-200.png b/test/TestApps/StoragePickersTestApp/Assets/LockScreenLogo.scale-200.png
deleted file mode 100644
index 7440f0d4bf7c7e26e4e36328738c68e624ee851e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 432
zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezr3(FqV6|IEGZ*x-#9g>~Mkr+x6^F
zy~CDX2QIMs&Gcs3RnRBoxBA!*(Mfw0KTCYuYk0WlEIV>qBmPl!
zq4ukrvfADX@#p8fbLY(H47N+k`FZ(FZh?cDro7>{8mkBO3>^oaIx`3!Jl)Qq)HI!+
z(S=1{o~eT)&W^=Ea8C`-17(Jv5(nHFJ{dOjGdxLVkY_y6&S1whfuFI4MM0kF0f&cO
zPDVpV%nz;Id$>+0Ga5e9625-JcI)oq=#Pa3p^>8BB}21BUw@eN!-6@w%X+^`+Vn?!
zryu|3T>kVWNBYyBc=7Y6H#s1Ah!OI_nezW
zXTqOdkv2Az6KKBV=$yHdF^R3Fqw(TZEoNSZX>reXJ#bwX42%f|Pgg&ebxsLQ010xn
AssI20
diff --git a/test/TestApps/StoragePickersTestApp/Assets/SplashScreen.scale-200.png b/test/TestApps/StoragePickersTestApp/Assets/SplashScreen.scale-200.png
deleted file mode 100644
index 32f486a86792a5e34cd9a8261b394c49b48f86be..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5372
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
diff --git a/test/TestApps/StoragePickersTestApp/Assets/Square44x44Logo.scale-200.png b/test/TestApps/StoragePickersTestApp/Assets/Square44x44Logo.scale-200.png
deleted file mode 100644
index f713bba67f551ef91020b75716a4dc8ebd744b1c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 637
zcmeAS@N?(olHy`uVBq!ia0vp^5g^RL1|$oo8kjIJFu8cTIEGZ*dUI*J;2{SImxtDO
zm%3!R$UazoY}x{$j0P5ABYXWr(l=jxJ6ps1W{tV=^>{Dl><3nv3A}sm=EZ)#l3`NR
zpZda3^rNox*D1%NC98Z~L*6zipLw~Gxn&(Y-;KmJ+aR6eLabU-L#y8HW%7P-E_-VlLqIabbHPHKT*)fT@9iWJ7iWgOT9%0}Lrj>lztPxWq6sPw3pi
z#-<=#$jjrP_DD*i!RLsn0mIA=>4~N)IMYWIf=j%-zuKCdMG%tHYot70D1|
zvWa0wMhauW#S>1CnI_;>!1Q3zMA17@DOVq{MQ+{U7^a&yA+%dMCG;WNPV0i;w$tu;
zX^b}UKziPM)(<;)ruW;-`)bBN+rQNM*Zs_>?n$|FVFo-e*PZb*@U7VAd+tHb4e?=Blc~}S6K)wL}r*Gf`BM#QB
z+y>N$mCswb4d{^{S9v_!eQj4fTRMOwOCi?lSk9%<=vAz}jM-*PQtH@Odn1LZcd^j#o>
hW$4xn+CT+ep9lJ{OAO?njobhL002ovPDHLkV1nYebbkN<
diff --git a/test/TestApps/StoragePickersTestApp/Assets/StoreLogo.png b/test/TestApps/StoragePickersTestApp/Assets/StoreLogo.png
deleted file mode 100644
index a4586f26bdf7841cad10f39cdffe2aca3af252c1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 456
zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2o;fF!p=8IEGZ*dUM0H=rDtTTVkd2
z(%lbKn@VS_lUaADVB&;Z6F#LM+mPsa?e>FnHo;HND^!P`-lX%BH~FOg%y&x+t*x!?
zg$#_1A1kgsSvO(fw`bOmo;lrJX8byO1j^gf7qohR%mmt
z@L)WX;>gqgK|tWJvQ5j;4;=gt4HXVKSMYRv5RhY5vS~TqfK_NAP*r{h!!g^BZ;w4r
z7CGdsai)y;fJQc`7{Zc2b==h%o`Op$|bg6a&nL{*m7-=0>k4M4-PXlU;G-?%*(*g>iFt^
U$m#7DfHB12>FVdQ&MBb@0G`#n8vpc0sq%A~kJcD9FY~qQRMt?ZR3YyDZt}Od;|mgpc{2dv9AHF){kXU%k({
z=Y8JidEayHTkG@twPZ|U3_^%3ct-OgLSiFAqDN!|tbCX@c@?4P`2x*TMK!+Q4b?k0
ziW7!!KF6dPWcF<%I|iznM~`QJ_V7sHGV_D`dhgpA9Vd@&X}ErK+j~_rdv;Bp?OA@a
zFXOk7eWOJe5NcK;6h$FaM&7JxNc#-@QTwzW6x#d_zmQNkz5)
zPI;kh;3d;5UCJU+9a(cOxX(|edWoOiAEdGU#kPJ&xnc2||3vDbuhBCkj-pb0as$Zl
z5;}4n=**n6(1g`JEtSy;SG6X;#-F~Oz3lESG2b5`j@wAwY4Yp<=4Xeb>iH=6aicF?DxD&q{`!&}ct
zBI)aycwuobQAf&678Uf+Mmh-@9RUhyH~>?w0dixO0#jZjEc9R^=5NZw=|a(kcB?9^
zfnTiEFXp-q#B;Tn>(O%$A*ud^Rg&eVH6Y_5Y%!E39RR&s?XpG`gKwU!6FE1
z7X)DC7)*(5g}lh`4`{i~DZcWupZI`K)_4P)VE{@gc7@Xsd^86zl~_mOYH?I4!aGeX
z^E(_=L6?PgveDQ+r%P@UISEXrkn`LHJZ##+!-anV>6h)IkKp;E@p8+3&(5%kS2)ld*J*rJccZM0iyaAx7+F~GW1UWFK&3X$PE1^}NH
zgAG9ck5(B)~qL97!mF)lK!{07OwU@j@Do>TbH=CDEo#4m0cEyAuXy_<&jlzJVcKweSJ5
z&=q~iIn18$w8yb=rmEmHxVEUA^?RwnB?6Qlp1os8@*dWTGL2bhzZ!s*xqScR?EPL`
zo(JwNdKUUYy7GtvZ3asXm)cgFvCx9EmAi;|w=a0iGiv%%VYKh`P0Wma4y`Xyx|T~(
zAmfGbgbEEC7)j8b@WA@+5W3a61HJXC1dX@6_T|Czk0I0zBk%tnW~()VWITGI!`$c<
gARL?UBrYYkwoDw4eo*CrzXGTrZ@;GF>596)00d&n@&Et;
diff --git a/test/TestApps/StoragePickersTestApp/Directory.Build.props b/test/TestApps/StoragePickersTestApp/Directory.Build.props
deleted file mode 100644
index d68fb6cd6c..0000000000
--- a/test/TestApps/StoragePickersTestApp/Directory.Build.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/Directory.Build.targets b/test/TestApps/StoragePickersTestApp/Directory.Build.targets
deleted file mode 100644
index 69059f309f..0000000000
--- a/test/TestApps/StoragePickersTestApp/Directory.Build.targets
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/MainWindow.idl b/test/TestApps/StoragePickersTestApp/MainWindow.idl
deleted file mode 100644
index bf53253266..0000000000
--- a/test/TestApps/StoragePickersTestApp/MainWindow.idl
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-namespace StoragePickersTestApp
-{
- [default_interface]
- runtimeclass MainWindow : Microsoft.UI.Xaml.Window
- {
- MainWindow();
- }
-}
diff --git a/test/TestApps/StoragePickersTestApp/MainWindow.xaml b/test/TestApps/StoragePickersTestApp/MainWindow.xaml
deleted file mode 100644
index 8e211b041c..0000000000
--- a/test/TestApps/StoragePickersTestApp/MainWindow.xaml
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/MainWindow.xaml.cpp b/test/TestApps/StoragePickersTestApp/MainWindow.xaml.cpp
deleted file mode 100644
index 4e829d868e..0000000000
--- a/test/TestApps/StoragePickersTestApp/MainWindow.xaml.cpp
+++ /dev/null
@@ -1,797 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#include "pch.h"
-#include "MainWindow.xaml.h"
-#if __has_include("MainWindow.g.cpp")
-#include "MainWindow.g.cpp"
-#endif
-
-#include
-
-using namespace winrt;
-using namespace Microsoft::UI::Xaml;
-using namespace winrt::Microsoft::Windows::Storage::Pickers;
-
-namespace winrt::StoragePickersTestApp::implementation
-{
- // ==========================================================================
- // Helper Methods
- // ==========================================================================
-
- void MainWindow::LogResult(hstring const& message)
- {
- // Add timestamp
- auto now = std::chrono::system_clock::now();
- auto time = std::chrono::system_clock::to_time_t(now);
- std::tm localTime;
- localtime_s(&localTime, &time);
-
- std::wstringstream timestamp;
- timestamp << L"[" << std::put_time(&localTime, L"%H:%M:%S") << L"] ";
-
- hstring currentText = ResultsTextBlock().Text();
- ResultsTextBlock().Text(timestamp.str() + message + L"\n" + currentText);
- }
-
- HWND MainWindow::GetWindowHandle()
- {
- HWND hwnd = nullptr;
- auto windowNative = this->m_inner.as();
- if (windowNative)
- {
- check_hresult(windowNative->get_WindowHandle(&hwnd));
- }
- return hwnd;
- }
-
- winrt::Windows::Storage::Pickers::PickerLocationId MainWindow::GetUwpLocationId()
- {
- switch (StartLocationComboBox().SelectedIndex())
- {
- case 0: return winrt::Windows::Storage::Pickers::PickerLocationId::DocumentsLibrary;
- case 1: return winrt::Windows::Storage::Pickers::PickerLocationId::ComputerFolder;
- case 2: return winrt::Windows::Storage::Pickers::PickerLocationId::Desktop;
- case 3: return winrt::Windows::Storage::Pickers::PickerLocationId::Downloads;
- case 4: return winrt::Windows::Storage::Pickers::PickerLocationId::HomeGroup;
- case 5: return winrt::Windows::Storage::Pickers::PickerLocationId::MusicLibrary;
- case 6: return winrt::Windows::Storage::Pickers::PickerLocationId::PicturesLibrary;
- case 7: return winrt::Windows::Storage::Pickers::PickerLocationId::VideosLibrary;
- case 8: return winrt::Windows::Storage::Pickers::PickerLocationId::Objects3D;
- default: return winrt::Windows::Storage::Pickers::PickerLocationId::Unspecified;
- }
- }
-
- winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId MainWindow::GetNewLocationId()
- {
- switch (StartLocationComboBox().SelectedIndex())
- {
- case 0: return PickerLocationId::DocumentsLibrary;
- case 1: return PickerLocationId::ComputerFolder;
- case 2: return PickerLocationId::Desktop;
- case 3: return PickerLocationId::Downloads;
- // case 4: HomeGroup is not supported in new API - will throw at runtime
- case 5: return PickerLocationId::MusicLibrary;
- case 6: return PickerLocationId::PicturesLibrary;
- case 7: return PickerLocationId::VideosLibrary;
- case 8: return PickerLocationId::Objects3D;
- default: return PickerLocationId::Unspecified;
- }
- }
-
- winrt::Windows::Storage::Pickers::PickerViewMode MainWindow::GetUwpViewMode()
- {
- return ViewModeComboBox().SelectedIndex() == 0
- ? winrt::Windows::Storage::Pickers::PickerViewMode::List
- : winrt::Windows::Storage::Pickers::PickerViewMode::Thumbnail;
- }
-
- winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode MainWindow::GetNewViewMode()
- {
- return ViewModeComboBox().SelectedIndex() == 0
- ? PickerViewMode::List
- : PickerViewMode::Thumbnail;
- }
-
- std::vector MainWindow::ParseFileTypeFilter()
- {
- std::vector filters;
- hstring input = FileTypeFilterInput().Text();
-
- if (input.empty())
- {
- filters.push_back(L"*");
- return filters;
- }
-
- std::wstring inputStr{ input };
- std::wstringstream ss(inputStr);
- std::wstring filter;
- while (std::getline(ss, filter, L','))
- {
- // Trim whitespace
- filter.erase(0, filter.find_first_not_of(L' '));
- filter.erase(filter.find_last_not_of(L' ') + 1);
- if (!filter.empty())
- {
- filters.push_back(hstring{ filter });
- }
- }
-
- if (filters.empty())
- {
- filters.push_back(L"*");
- }
- return filters;
- }
-
- std::vector>> MainWindow::ParseFileTypeChoices(hstring const& json)
- {
- std::vector>> choices;
- if (json.empty()) return choices;
-
- std::wstring jsonStr{ json };
-
- // Find opening and closing braces
- size_t start = jsonStr.find(L'{');
- size_t end = jsonStr.rfind(L'}');
- if (start == std::wstring::npos || end == std::wstring::npos || start >= end)
- return choices;
-
- jsonStr = jsonStr.substr(start + 1, end - start - 1);
-
- // Parse key-value pairs (simple JSON parser)
- size_t pos = 0;
- int bracketDepth = 0;
- size_t lastPos = 0;
-
- auto processPair = [&](const std::wstring& pair) {
- size_t colonPos = pair.find(L':');
- if (colonPos == std::wstring::npos) return;
-
- std::wstring key = pair.substr(0, colonPos);
- std::wstring valueStr = pair.substr(colonPos + 1);
-
- // Clean key
- key.erase(0, key.find_first_not_of(L" \t\n\r\""));
- key.erase(key.find_last_not_of(L" \t\n\r\"") + 1);
-
- // Parse array
- std::vector values;
- size_t arrStart = valueStr.find(L'[');
- size_t arrEnd = valueStr.rfind(L']');
- if (arrStart != std::wstring::npos && arrEnd != std::wstring::npos && arrStart < arrEnd)
- {
- std::wstring arrayContent = valueStr.substr(arrStart + 1, arrEnd - arrStart - 1);
- std::wstringstream ss(arrayContent);
- std::wstring item;
- while (std::getline(ss, item, L','))
- {
- item.erase(0, item.find_first_not_of(L" \t\n\r\""));
- item.erase(item.find_last_not_of(L" \t\n\r\"") + 1);
- if (!item.empty())
- {
- values.push_back(item);
- }
- }
- }
-
- if (!key.empty())
- {
- choices.emplace_back(key, values);
- }
- };
-
- while (pos < jsonStr.length())
- {
- wchar_t ch = jsonStr[pos];
- if (ch == L'[') bracketDepth++;
- else if (ch == L']') bracketDepth--;
- else if (ch == L',' && bracketDepth == 0)
- {
- processPair(jsonStr.substr(lastPos, pos - lastPos));
- lastPos = pos + 1;
- }
- pos++;
- }
-
- // Process last pair
- if (lastPos < jsonStr.length())
- {
- processPair(jsonStr.substr(lastPos));
- }
-
- return choices;
- }
-
- void MainWindow::ClearLog_Click(Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- ResultsTextBlock().Text(L"");
- }
-
- // ==========================================================================
- // FileOpenPicker - UWP
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::UwpPickSingleFile_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- winrt::Windows::Storage::Pickers::FileOpenPicker picker;
-
- // Initialize with window handle (required for desktop apps)
- auto initializeWithWindow = picker.as<::IInitializeWithWindow>();
- initializeWithWindow->Initialize(GetWindowHandle());
-
- // Apply settings
- if (FileTypeFilterCheckBox().IsChecked().Value())
- {
- for (const auto& filter : ParseFileTypeFilter())
- {
- picker.FileTypeFilter().Append(filter);
- }
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetUwpLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetUwpViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
-
- auto file = co_await picker.PickSingleFileAsync();
-
- if (file)
- {
- std::wstringstream ss;
- ss << L"[UWP] PickSingleFileAsync:\n File: " << file.Name().c_str()
- << L"\n Path: " << file.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[UWP] PickSingleFileAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[UWP] Error: " + ex.message());
- }
- }
-
- // ==========================================================================
- // FileOpenPicker - New API
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::NewPickSingleFile_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- auto picker = FileOpenPicker{ this->AppWindow().Id() };
-
- // Apply settings
- if (FileTypeFilterCheckBox().IsChecked().Value())
- {
- for (const auto& filter : ParseFileTypeFilter())
- {
- picker.FileTypeFilter().Append(filter);
- }
- }
-
- if (OpenPickerFileTypeChoicesCheckBox().IsChecked().Value())
- {
- auto choices = ParseFileTypeChoices(OpenPickerFileTypeChoicesInput().Text());
- for (const auto& choice : choices)
- {
- auto extensions = winrt::single_threaded_vector();
- for (const auto& ext : choice.second)
- {
- extensions.Append(hstring{ ext });
- }
- picker.FileTypeChoices().Insert(hstring{ choice.first }, extensions);
- }
- }
-
- if (OpenInitialFileTypeIndexCheckBox().IsChecked().Value())
- {
- try
- {
- std::wstring indexText{ OpenInitialFileTypeIndexInput().Text() };
- int index = std::stoi(indexText);
- picker.InitialFileTypeIndex(index);
- }
- catch (...)
- {
- LogResult(L"[NEW] InitialFileTypeIndex (open) parse error; using default");
- }
- }
-
- if (SuggestedFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedFolder(SuggestedFolderInput().Text());
- }
-
- if (SuggestedStartFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedStartFolder(SuggestedStartFolderInput().Text());
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetNewLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetNewViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
- if (TitleCheckBox().IsChecked().Value())
- picker.Title(TitleInput().Text());
-
- auto result = co_await picker.PickSingleFileAsync();
-
- if (result)
- {
- std::wstringstream ss;
- ss << L"[NEW] PickSingleFileAsync:\n File: "
- << std::filesystem::path(result.Path().c_str()).filename().c_str()
- << L"\n Path: " << result.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[NEW] PickSingleFileAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[NEW] Error: " + ex.message());
- }
- }
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::UwpPickMultipleFiles_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- winrt::Windows::Storage::Pickers::FileOpenPicker picker;
- auto initializeWithWindow = picker.as<::IInitializeWithWindow>();
- initializeWithWindow->Initialize(GetWindowHandle());
-
- if (FileTypeFilterCheckBox().IsChecked().Value())
- {
- for (const auto& filter : ParseFileTypeFilter())
- {
- picker.FileTypeFilter().Append(filter);
- }
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetUwpLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetUwpViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
-
- auto files = co_await picker.PickMultipleFilesAsync();
-
- if (files && files.Size() > 0)
- {
- std::wstringstream ss;
- ss << L"[UWP] PickMultipleFilesAsync: " << files.Size() << L" files\n";
- for (const auto& file : files)
- {
- ss << L" - " << file.Name().c_str() << L"\n";
- }
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[UWP] PickMultipleFilesAsync: Cancelled or no files");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[UWP] Error: " + ex.message());
- }
- }
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::NewPickMultipleFiles_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- auto picker = FileOpenPicker{ this->AppWindow().Id() };
-
- if (FileTypeFilterCheckBox().IsChecked().Value())
- {
- for (const auto& filter : ParseFileTypeFilter())
- {
- picker.FileTypeFilter().Append(filter);
- }
- }
-
- if (OpenPickerFileTypeChoicesCheckBox().IsChecked().Value())
- {
- auto choices = ParseFileTypeChoices(OpenPickerFileTypeChoicesInput().Text());
- for (const auto& choice : choices)
- {
- auto extensions = winrt::single_threaded_vector();
- for (const auto& ext : choice.second)
- {
- extensions.Append(hstring{ ext });
- }
- picker.FileTypeChoices().Insert(hstring{ choice.first }, extensions);
- }
- }
-
- if (OpenInitialFileTypeIndexCheckBox().IsChecked().Value())
- {
- try
- {
- std::wstring indexText{ OpenInitialFileTypeIndexInput().Text() };
- int index = std::stoi(indexText);
- picker.InitialFileTypeIndex(index);
- }
- catch (...)
- {
- LogResult(L"[NEW] InitialFileTypeIndex (open multi) parse error; using default");
- }
- }
-
- if (SuggestedFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedFolder(SuggestedFolderInput().Text());
- }
-
- if (SuggestedStartFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedStartFolder(SuggestedStartFolderInput().Text());
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetNewLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetNewViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
- if (TitleCheckBox().IsChecked().Value())
- picker.Title(TitleInput().Text());
-
- auto results = co_await picker.PickMultipleFilesAsync();
-
- if (results && results.Size() > 0)
- {
- std::wstringstream ss;
- ss << L"[NEW] PickMultipleFilesAsync: " << results.Size() << L" files\n";
- for (const auto& result : results)
- {
- ss << L" - " << std::filesystem::path(result.Path().c_str()).filename().c_str() << L"\n";
- }
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[NEW] PickMultipleFilesAsync: Cancelled or no files");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[NEW] Error: " + ex.message());
- }
- }
-
- // ==========================================================================
- // FileSavePicker - UWP
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::UwpPickSaveFile_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- winrt::Windows::Storage::Pickers::FileSavePicker picker;
- auto initializeWithWindow = picker.as<::IInitializeWithWindow>();
- initializeWithWindow->Initialize(GetWindowHandle());
-
- if (SuggestedFileNameCheckBox().IsChecked().Value())
- picker.SuggestedFileName(SuggestedFileNameInput().Text());
- if (DefaultFileExtensionCheckBox().IsChecked().Value())
- picker.DefaultFileExtension(DefaultFileExtensionInput().Text());
-
- if (SavePickerFileTypeChoicesCheckBox().IsChecked().Value())
- {
- auto choices = ParseFileTypeChoices(SavePickerFileTypeChoicesInput().Text());
- for (const auto& choice : choices)
- {
- auto extensions = winrt::single_threaded_vector();
- for (const auto& ext : choice.second)
- {
- extensions.Append(hstring{ ext });
- }
- picker.FileTypeChoices().Insert(hstring{ choice.first }, extensions);
- }
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetUwpLocationId());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
-
- auto file = co_await picker.PickSaveFileAsync();
-
- if (file)
- {
- std::wstringstream ss;
- ss << L"[UWP] PickSaveFileAsync:\n File: " << file.Name().c_str()
- << L"\n Path: " << file.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[UWP] PickSaveFileAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[UWP] Error: " + ex.message());
- }
- }
-
- // ==========================================================================
- // FileSavePicker - New API
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::NewPickSaveFile_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- auto picker = FileSavePicker{ this->AppWindow().Id() };
-
- if (SuggestedFileNameCheckBox().IsChecked().Value())
- picker.SuggestedFileName(SuggestedFileNameInput().Text());
- if (DefaultFileExtensionCheckBox().IsChecked().Value())
- picker.DefaultFileExtension(DefaultFileExtensionInput().Text());
-
- if (SavePickerFileTypeChoicesCheckBox().IsChecked().Value())
- {
- auto choices = ParseFileTypeChoices(SavePickerFileTypeChoicesInput().Text());
- for (const auto& choice : choices)
- {
- auto extensions = winrt::single_threaded_vector();
- for (const auto& ext : choice.second)
- {
- extensions.Append(hstring{ ext });
- }
- picker.FileTypeChoices().Insert(hstring{ choice.first }, extensions);
- }
- }
-
- if (SaveInitialFileTypeIndexCheckBox().IsChecked().Value())
- {
- try
- {
- std::wstring indexText{ SaveInitialFileTypeIndexInput().Text() };
- int index = std::stoi(indexText);
- picker.InitialFileTypeIndex(index);
- }
- catch (...)
- {
- LogResult(L"[NEW] InitialFileTypeIndex parse error; using default");
- }
- }
-
- if (ShowOverwritePromptCheckBox().IsChecked().Value())
- {
- bool overwrite = ShowOverwritePromptComboBox().SelectedIndex() == 0;
- picker.ShowOverwritePrompt(overwrite);
- }
-
- if (SuggestedFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedFolder(SuggestedFolderInput().Text());
- }
-
- if (SuggestedStartFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedStartFolder(SuggestedStartFolderInput().Text());
- }
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetNewLocationId());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
- if (TitleCheckBox().IsChecked().Value())
- picker.Title(TitleInput().Text());
-
- auto result = co_await picker.PickSaveFileAsync();
-
- if (result)
- {
- std::wstringstream ss;
- ss << L"[NEW] PickSaveFileAsync:\n File: "
- << std::filesystem::path(result.Path().c_str()).filename().c_str()
- << L"\n Path: " << result.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[NEW] PickSaveFileAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[NEW] Error: " + ex.message());
- }
- }
-
- // ==========================================================================
- // FolderPicker - UWP
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::UwpPickFolder_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- winrt::Windows::Storage::Pickers::FolderPicker picker;
- auto initializeWithWindow = picker.as<::IInitializeWithWindow>();
- initializeWithWindow->Initialize(GetWindowHandle());
-
- // FolderPicker requires at least one filter
- picker.FileTypeFilter().Append(L"*");
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetUwpLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetUwpViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
-
- auto folder = co_await picker.PickSingleFolderAsync();
-
- if (folder)
- {
- std::wstringstream ss;
- ss << L"[UWP] PickSingleFolderAsync:\n Folder: " << folder.Name().c_str()
- << L"\n Path: " << folder.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[UWP] PickSingleFolderAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[UWP] Error: " + ex.message());
- }
- }
-
- // ==========================================================================
- // FolderPicker - New API
- // ==========================================================================
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::NewPickFolder_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- auto picker = FolderPicker{ this->AppWindow().Id() };
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetNewLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetNewViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
- if (TitleCheckBox().IsChecked().Value())
- picker.Title(TitleInput().Text());
-
- if (SuggestedFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedFolder(SuggestedFolderInput().Text());
- }
-
- if (SuggestedStartFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedStartFolder(SuggestedStartFolderInput().Text());
- }
-
- auto result = co_await picker.PickSingleFolderAsync();
-
- if (result)
- {
- std::wstringstream ss;
- ss << L"[NEW] PickSingleFolderAsync:\n Folder: "
- << std::filesystem::path(result.Path().c_str()).filename().c_str()
- << L"\n Path: " << result.Path().c_str();
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[NEW] PickSingleFolderAsync: Cancelled");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[NEW] Error: " + ex.message());
- }
- }
-
- winrt::Windows::Foundation::IAsyncAction MainWindow::NewPickMultipleFolders_Click(
- Windows::Foundation::IInspectable const&, RoutedEventArgs const&)
- {
- auto lifetime = get_strong();
- try
- {
- auto picker = FolderPicker{ this->AppWindow().Id() };
-
- if (SuggestedStartLocationCheckBox().IsChecked().Value())
- picker.SuggestedStartLocation(GetNewLocationId());
- if (ViewModeCheckBox().IsChecked().Value())
- picker.ViewMode(GetNewViewMode());
- if (CommitButtonCheckBox().IsChecked().Value())
- picker.CommitButtonText(CommitButtonTextInput().Text());
- if (SettingsIdCheckBox().IsChecked().Value())
- picker.SettingsIdentifier(SettingsIdInput().Text());
- if (TitleCheckBox().IsChecked().Value())
- picker.Title(TitleInput().Text());
-
- if (SuggestedFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedFolder(SuggestedFolderInput().Text());
- }
-
- if (SuggestedStartFolderCheckBox().IsChecked().Value())
- {
- picker.SuggestedStartFolder(SuggestedStartFolderInput().Text());
- }
-
- auto results = co_await picker.PickMultipleFoldersAsync();
-
- if (results && results.Size() > 0)
- {
- std::wstringstream ss;
- ss << L"[NEW] PickMultipleFoldersAsync: " << results.Size() << L" folders\n";
- for (const auto& result : results)
- {
- ss << L" - " << std::filesystem::path(result.Path().c_str()).filename().c_str() << L"\n";
- }
- LogResult(hstring{ ss.str() });
- }
- else
- {
- LogResult(L"[NEW] PickMultipleFoldersAsync: Cancelled or no folders");
- }
- }
- catch (hresult_error const& ex)
- {
- LogResult(L"[NEW] Error: " + ex.message());
- }
- }
-}
diff --git a/test/TestApps/StoragePickersTestApp/MainWindow.xaml.h b/test/TestApps/StoragePickersTestApp/MainWindow.xaml.h
deleted file mode 100644
index ef1fff1e44..0000000000
--- a/test/TestApps/StoragePickersTestApp/MainWindow.xaml.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#pragma once
-
-#include "MainWindow.g.h"
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace winrt::StoragePickersTestApp::implementation
-{
- struct MainWindow : MainWindowT
- {
- MainWindow()
- {
- }
-
- void InitializeDefaults()
- {
- OpenPickerFileTypeChoicesInput().Text(LR"({"Documents": [".txt", ".doc"], "Images": [".png", ".jpg"]})");
- SavePickerFileTypeChoicesInput().Text(LR"({"Documents": [".txt", ".doc"], "All Files": ["*"]})");
- }
-
- // Helper methods
- void LogResult(hstring const& message);
- HWND GetWindowHandle();
- winrt::Windows::Storage::Pickers::PickerLocationId GetUwpLocationId();
- winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId GetNewLocationId();
- winrt::Windows::Storage::Pickers::PickerViewMode GetUwpViewMode();
- winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode GetNewViewMode();
- std::vector ParseFileTypeFilter();
- std::vector>> ParseFileTypeChoices(hstring const& json);
-
- // FileOpenPicker handlers
- winrt::Windows::Foundation::IAsyncAction UwpPickSingleFile_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction NewPickSingleFile_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction UwpPickMultipleFiles_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction NewPickMultipleFiles_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
-
- // FileSavePicker handlers
- winrt::Windows::Foundation::IAsyncAction UwpPickSaveFile_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction NewPickSaveFile_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
-
- // FolderPicker handlers
- winrt::Windows::Foundation::IAsyncAction UwpPickFolder_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction NewPickFolder_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- winrt::Windows::Foundation::IAsyncAction NewPickMultipleFolders_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
-
- // Utility handlers
- void ClearLog_Click(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& args);
- };
-}
-
-namespace winrt::StoragePickersTestApp::factory_implementation
-{
- struct MainWindow : MainWindowT
- {
- };
-}
diff --git a/test/TestApps/StoragePickersTestApp/Package.appxmanifest b/test/TestApps/StoragePickersTestApp/Package.appxmanifest
deleted file mode 100644
index aa23d6090d..0000000000
--- a/test/TestApps/StoragePickersTestApp/Package.appxmanifest
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
- StoragePickersTestApp
- xiaomgao
- Assets\StoreLogo.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.exe.manifest b/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.exe.manifest
deleted file mode 100644
index 68d1e330e7..0000000000
--- a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.exe.manifest
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj b/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj
deleted file mode 100644
index 5962499ebe..0000000000
--- a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj
+++ /dev/null
@@ -1,285 +0,0 @@
-
-
-
-
-
-
- $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'WindowsAppRuntime.sln'))\
- $(RepoRoot)packages\
- $(RepoRoot)BuildOutput\$(Configuration)\$(Platform)\StoragePickersTestApp\
- $(RepoRoot)obj\$(Configuration)\$(Platform)\StoragePickersTestApp\
- $(BaseOutputPath)
-
-
-
-
-
-
-
-
- true
- true
- true
- {d1310de7-70ec-4b6a-8a78-2a31bcfa037f}
- StoragePickersTestApp
- StoragePickersTestApp
- $(RootNamespace)
- en-US
- 16.0
- false
- Windows Store
- 10.0
- 10.0
- 10.0.17763.0
- true
- true
-
- None
- true
- false
-
-
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Debug
- ARM64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
- Release
- ARM64
-
-
-
-
- Application
- v143
- Unicode
- true
-
-
-
- true
- true
-
-
-
- false
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Use
- pch.h
- $(IntDir)pch.pch
- Level4
- %(AdditionalOptions) /bigobj
- DISABLE_XAML_GENERATED_MAIN;%(PreprocessorDefinitions)
-
-
-
-
-
- _DEBUG;%(PreprocessorDefinitions)
-
-
-
-
-
- NDEBUG;%(PreprocessorDefinitions)
-
-
- true
- true
-
-
-
-
-
-
-
-
-
-
-
- App.xaml
-
-
- MainWindow.xaml
-
-
-
-
-
-
-
-
-
-
- Create
-
-
- App.xaml
-
-
- MainWindow.xaml
-
-
- NotUsing
-
-
-
-
-
-
- Code
- MainWindow.xaml
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(RepoRoot)BuildOutput\$(Configuration)\$(Platform)\WindowsAppRuntime_DLL\Microsoft.Windows.Storage.Pickers.winmd
- true
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_WindowsAppRuntimeDll>$(RepoRoot)BuildOutput\$(Configuration)\$(Platform)\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.dll
- <_WindowsAppRuntimeWinmd>$(RepoRoot)BuildOutput\$(Configuration)\$(Platform)\WindowsAppRuntime_DLL\Microsoft.Windows.Storage.Pickers.winmd
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj.filters b/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj.filters
deleted file mode 100644
index 6e2b122dc8..0000000000
--- a/test/TestApps/StoragePickersTestApp/StoragePickersTestApp.vcxproj.filters
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
-
-
- {d1310de7-70ec-4b6a-8a78-2a31bcfa037f}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/TestApps/StoragePickersTestApp/app.manifest b/test/TestApps/StoragePickersTestApp/app.manifest
deleted file mode 100644
index 23ad088136..0000000000
--- a/test/TestApps/StoragePickersTestApp/app.manifest
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- PerMonitorV2
-
-
-
\ No newline at end of file
diff --git a/test/TestApps/StoragePickersTestApp/main.cpp b/test/TestApps/StoragePickersTestApp/main.cpp
deleted file mode 100644
index a0c0bfcb44..0000000000
--- a/test/TestApps/StoragePickersTestApp/main.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-// Custom entry point for StoragePickersTestApp.
-// This replaces the auto-generated wWinMain (disabled via DISABLE_XAML_GENERATED_MAIN).
-
-#include "pch.h"
-#include "App.xaml.h"
-
-int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
-{
- winrt::init_apartment(winrt::apartment_type::single_threaded);
-
- ::winrt::Microsoft::UI::Xaml::Application::Start(
- [](auto&&)
- {
- ::winrt::make<::winrt::StoragePickersTestApp::implementation::App>();
- });
-
- return 0;
-}
diff --git a/test/TestApps/StoragePickersTestApp/packages.config b/test/TestApps/StoragePickersTestApp/packages.config
deleted file mode 100644
index d95f39ee9d..0000000000
--- a/test/TestApps/StoragePickersTestApp/packages.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/test/TestApps/StoragePickersTestApp/pch.cpp b/test/TestApps/StoragePickersTestApp/pch.cpp
deleted file mode 100644
index fdc2d78817..0000000000
--- a/test/TestApps/StoragePickersTestApp/pch.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#include "pch.h"
diff --git a/test/TestApps/StoragePickersTestApp/pch.h b/test/TestApps/StoragePickersTestApp/pch.h
deleted file mode 100644
index 4f7f19f197..0000000000
--- a/test/TestApps/StoragePickersTestApp/pch.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
-// Licensed under the MIT License. See LICENSE in the project root for license information.
-
-#pragma once
-#include
-#include
-#include
-#include
-
-// Undefine GetCurrentTime macro to prevent
-// conflict with Storyboard::GetCurrentTime
-#undef GetCurrentTime
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// For legacy UWP pickers:
-#include
-#include
-// For IInitializeWithWindow (required for UWP pickers in desktop apps)
-#include