Compare commits
94 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32a48c5e41 | ||
|
|
ed0920b21b | ||
|
|
5378e3d54b | ||
|
|
87beb7af51 | ||
|
|
4993fd9968 | ||
|
|
1df420c437 | ||
|
|
994a53a00b | ||
|
|
179ae49d20 | ||
|
|
c0dac1ac7f | ||
|
|
687e18b80c | ||
|
|
598007f177 | ||
|
|
7552ffed35 | ||
|
|
8227689e6a | ||
|
|
d170a9196d | ||
|
|
f5edaf2f23 | ||
|
|
1ef31d54c8 | ||
|
|
0cabf43e17 | ||
|
|
f98c57ef3a | ||
|
|
84f89f3464 | ||
|
|
f36351c009 | ||
|
|
f44589009c | ||
|
|
868fb8b3e8 | ||
|
|
e1d89a022e | ||
|
|
10aa419e98 | ||
|
|
db20b3bc4e | ||
|
|
de33c438b6 | ||
|
|
1f9635255e | ||
|
|
3329058840 | ||
|
|
ee5854c5a1 | ||
|
|
471ce85cdf | ||
|
|
f28e3fe24c | ||
|
|
169815e88a | ||
|
|
2c6391804e | ||
|
|
fa65d40f3e | ||
|
|
2fd73eab85 | ||
|
|
9111c019ff | ||
|
|
200262d3ca | ||
|
|
0f7c4be17e | ||
|
|
ded9ea9293 | ||
|
|
b131251a3b | ||
|
|
f563f97f12 | ||
|
|
19757502ae | ||
|
|
c28c09973e | ||
|
|
8dd01a67e9 | ||
|
|
84a28db8cf | ||
|
|
b315782df6 | ||
|
|
9ba3b875da | ||
|
|
9ae2e886bd | ||
|
|
0926da3f27 | ||
|
|
4355ce4d13 | ||
|
|
90d16151f4 | ||
|
|
4bddb96052 | ||
|
|
368efeb2f0 | ||
|
|
8e8a0453c4 | ||
|
|
e58b47926c | ||
|
|
6d40668c1a | ||
|
|
71c8d76593 | ||
|
|
76ce97370f | ||
|
|
c4eaa4ad45 | ||
|
|
9edccede4e | ||
|
|
1d7359ebdd | ||
|
|
fafff1bc5c | ||
|
|
be599991b8 | ||
|
|
48954e5206 | ||
|
|
a7c22adc05 | ||
|
|
be643a9935 | ||
|
|
64f3958d7f | ||
|
|
b562d5b5ba | ||
|
|
bf54d5a531 | ||
|
|
f9f4db3f6c | ||
|
|
880a834296 | ||
|
|
e47813765a | ||
|
|
2f0d1dc27f | ||
|
|
3c35a8acaa | ||
|
|
27e604892d | ||
|
|
1c05d8a379 | ||
|
|
43983a2c87 | ||
|
|
df0d14e282 | ||
|
|
419498bef8 | ||
|
|
4118efa4b6 | ||
|
|
300b1ba55a | ||
|
|
ecde1c8d80 | ||
|
|
79674b639b | ||
|
|
0073da9c8e | ||
|
|
a472ddba73 | ||
|
|
b2633b37e5 | ||
|
|
fe6a9a186b | ||
|
|
2e45bb1cd9 | ||
|
|
ccf6cfd66c | ||
|
|
34895b9edd | ||
|
|
745a89fa9c | ||
|
|
a3ff273405 | ||
|
|
ca0b7dbcbb | ||
|
|
e49f9db426 |
6
.gitignore
vendored
@@ -245,4 +245,8 @@ ModelManifest.xml
|
||||
[Gg]enerated/
|
||||
|
||||
# Setup Build Files
|
||||
[Oo]thers/
|
||||
[Oo]thers/
|
||||
|
||||
# Arm Build Files
|
||||
package.zip
|
||||
ArmPackage.zip
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.37012.4 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkgread", "pkgread\pkgread.vcxproj", "{A7753282-AA16-43D9-8ACA-7065239DD702}"
|
||||
EndProject
|
||||
@@ -15,10 +15,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "certmgr", "certmgr\certmgr.
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "appinstaller", "appinstaller\appinstaller.vcxproj", "{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126} = {798ED492-EECE-457D-8FD8-129DA93CE126}
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C} = {B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0} = {E04CCAB9-35DB-495C-A279-5B483C707CD0}
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D}
|
||||
EndProjectSection
|
||||
@@ -26,6 +27,7 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings\settings.vcxproj", "{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00} = {3AE2A022-ED83-41F1-948A-12A7593CBD00}
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C} = {B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reslib", "reslib\reslib.vcxproj", "{3AE2A022-ED83-41F1-948A-12A7593CBD00}"
|
||||
@@ -48,8 +50,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PrivateInit", "PrivateInit\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppxPackage", "AppxPackage\AppxPackage.csproj", "{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D}
|
||||
EndProjectSection
|
||||
@@ -71,244 +73,221 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernNotice", "ModernNotic
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launch", "Launch\Launch.csproj", "{F0288B24-7B84-42A5-9A92-2E16A012E4DE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reader", "Reader\Reader.csproj", "{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pugixml", "pugixml\pugixml.vcxproj", "{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PkgCLI", "PkgCLI\PkgCLI.csproj", "{8D333AF6-E901-4301-B3EE-923088E81062}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|ARM = Release|ARM
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x64.Build.0 = Debug|x64
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x64.ActiveCfg = Release|x64
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x64.Build.0 = Release|x64
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|ARM.Build.0 = Release|ARM
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.Build.0 = Release|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Debug|x86.Build.0 = Debug|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|ARM.Build.0 = Release|ARM
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.ActiveCfg = Release|Win32
|
||||
{8EAC0230-4990-4E41-8E0F-D641D1561396}.Release|x86.Build.0 = Release|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Debug|x86.Build.0 = Debug|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x64.ActiveCfg = Release|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|ARM.Build.0 = Release|ARM
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.ActiveCfg = Release|Win32
|
||||
{798ED492-EECE-457D-8FD8-129DA93CE126}.Release|x86.Build.0 = Release|Win32
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x64.Build.0 = Debug|x64
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Debug|x86.Build.0 = Debug|x86
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.ActiveCfg = Release|x86
|
||||
{EF4012D4-EF08-499C-B803-177739350B2D}.Release|x86.Build.0 = Release|x86
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x64.ActiveCfg = Release|x64
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x64.Build.0 = Release|x64
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|ARM.Build.0 = Release|ARM
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E04CCAB9-35DB-495C-A279-5B483C707CD0}.Release|x86.Build.0 = Release|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x64.Build.0 = Debug|x64
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x64.ActiveCfg = Release|x64
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x64.Build.0 = Release|x64
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|ARM.Build.0 = Release|ARM
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F0C84812-0CDF-4AA0-A0F8-F37AC833F39B}.Release|x86.Build.0 = Release|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x64.Build.0 = Debug|x64
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Debug|x86.Build.0 = Debug|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x64.ActiveCfg = Release|x64
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x64.Build.0 = Release|x64
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|ARM.Build.0 = Release|ARM
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.ActiveCfg = Release|Win32
|
||||
{AD25497F-A15F-4DFF-AC7A-B8ABF5F411D6}.Release|x86.Build.0 = Release|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x64.Build.0 = Debug|x64
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Debug|x86.Build.0 = Debug|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x64.ActiveCfg = Release|x64
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x64.Build.0 = Release|x64
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|ARM.Build.0 = Release|ARM
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.ActiveCfg = Release|Win32
|
||||
{3AE2A022-ED83-41F1-948A-12A7593CBD00}.Release|x86.Build.0 = Release|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x64.Build.0 = Debug|x64
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Debug|x86.Build.0 = Debug|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x64.ActiveCfg = Release|x64
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x64.Build.0 = Release|x64
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|ARM.Build.0 = Release|ARM
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.ActiveCfg = Release|Win32
|
||||
{18E0189B-F3F1-4CB2-A3AF-5606ADD5E279}.Release|x86.Build.0 = Release|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x64.Build.0 = Debug|x64
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Debug|x86.Build.0 = Debug|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x64.ActiveCfg = Release|x64
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x64.Build.0 = Release|x64
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|ARM.Build.0 = Release|ARM
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.ActiveCfg = Release|Win32
|
||||
{7A05E943-6E0A-4F57-8BD7-BE90F44DCAD7}.Release|x86.Build.0 = Release|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.Build.0 = Debug|x64
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x86.Build.0 = Debug|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x64.ActiveCfg = Release|x64
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x64.Build.0 = Release|x64
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|ARM.Build.0 = Release|ARM
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.ActiveCfg = Release|Win32
|
||||
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.Build.0 = Release|Win32
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.Build.0 = Debug|x86
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.ActiveCfg = Release|x86
|
||||
{512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.Build.0 = Release|x86
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Debug|x86.Build.0 = Debug|x86
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.ActiveCfg = Release|x86
|
||||
{8E708D9A-6325-4AA9-B5A5-D1B5ECA8EEF7}.Release|x86.Build.0 = Release|x86
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Debug|x86.Build.0 = Debug|x86
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.ActiveCfg = Release|x86
|
||||
{BD681A4F-EB60-4BB8-90B5-65968FC7DA59}.Release|x86.Build.0 = Release|x86
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x64.Build.0 = Debug|x64
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Debug|x86.Build.0 = Debug|x86
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.ActiveCfg = Release|x86
|
||||
{FFD3FD52-37A8-4F43-883C-DE8D996CB0E0}.Release|x86.Build.0 = Release|x86
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Debug|x86.Build.0 = Debug|x86
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.ActiveCfg = Release|x86
|
||||
{3C2F5446-33F0-41D5-813A-64A94AA474AF}.Release|x86.Build.0 = Release|x86
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Debug|x86.Build.0 = Debug|x86
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.ActiveCfg = Release|x86
|
||||
{4EC16578-EFBF-41E6-8D7F-976E3646DD1D}.Release|x86.Build.0 = Release|x86
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Debug|x86.Build.0 = Debug|x86
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.ActiveCfg = Release|x86
|
||||
{DC074727-72E4-43C5-BAAF-E0D548104797}.Release|x86.Build.0 = Release|x86
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x64.ActiveCfg = Release|x64
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x64.Build.0 = Release|x64
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|ARM.Build.0 = Release|ARM
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}.Release|x86.Build.0 = Release|Win32
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.Build.0 = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Debug|x86.Build.0 = Debug|x86
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.ActiveCfg = Release|x86
|
||||
{C5587B6E-19C4-4484-AA97-5C20FBB07E43}.Release|x86.Build.0 = Release|x86
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Debug|x86.Build.0 = Debug|x86
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.Build.0 = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.ActiveCfg = Release|x86
|
||||
{F0288B24-7B84-42A5-9A92-2E16A012E4DE}.Release|x86.Build.0 = Release|x86
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Debug|x86.Build.0 = Debug|x86
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.ActiveCfg = Release|x86
|
||||
{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}.Release|x86.Build.0 = Release|x86
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|ARM.Build.0 = Release|ARM
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B1DF139F-CEF1-404F-8255-31EF4BF0EC4C}.Release|x86.Build.0 = Release|Win32
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Debug|x86.Build.0 = Debug|x86
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|x86.ActiveCfg = Release|x86
|
||||
{8D333AF6-E901-4301-B3EE-923088E81062}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5FAD9D1A-D291-492A-956A-94422761AA8E}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -70,6 +74,7 @@
|
||||
<Compile Include="PriFileNative.cs" />
|
||||
<Compile Include="PriReader.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataUtils\DataUtils.csproj">
|
||||
|
||||
@@ -348,8 +348,18 @@ namespace AppxPackage
|
||||
{
|
||||
get
|
||||
{
|
||||
string value;
|
||||
if (!TryGetValue (key, out value))
|
||||
string value = null;
|
||||
var isfind = false;
|
||||
foreach (var kv in this)
|
||||
{
|
||||
if (kv.Key?.Trim ()?.ToLowerInvariant () == key?.Trim ()?.ToLowerInvariant ())
|
||||
{
|
||||
value = kv.Value;
|
||||
isfind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isfind)
|
||||
{
|
||||
value = string.Empty;
|
||||
base [key] = value;
|
||||
@@ -370,8 +380,18 @@ namespace AppxPackage
|
||||
}
|
||||
public string At (string key)
|
||||
{
|
||||
string value;
|
||||
if (!TryGetValue (key, out value)) throw new KeyNotFoundException ($"PRBaseApplication.At: key \"{key}\" not found");
|
||||
string value = null;
|
||||
var isfind = false;
|
||||
foreach (var kv in this)
|
||||
{
|
||||
if (kv.Key?.Trim ()?.ToLowerInvariant () == key?.Trim ()?.ToLowerInvariant ())
|
||||
{
|
||||
value = kv.Value;
|
||||
isfind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isfind) throw new KeyNotFoundException ($"MRApplication: cannot find key \"{key}\"");
|
||||
if (!EnablePri ()) return value;
|
||||
if (PriFileHelper.IsMsResourcePrefix (value))
|
||||
{
|
||||
@@ -383,8 +403,18 @@ namespace AppxPackage
|
||||
}
|
||||
public string NewAt (string key, bool toPriString)
|
||||
{
|
||||
string value;
|
||||
if (!TryGetValue (key, out value))
|
||||
string value = null;
|
||||
var isfind = false;
|
||||
foreach (var kv in this)
|
||||
{
|
||||
if (kv.Key?.Trim ()?.ToLowerInvariant () == key?.Trim ()?.ToLowerInvariant ())
|
||||
{
|
||||
value = kv.Value;
|
||||
isfind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isfind)
|
||||
{
|
||||
value = string.Empty;
|
||||
base [key] = value;
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace NativeWrappers
|
||||
using UINT64 = System.UInt64;
|
||||
using HRESULT = System.Int32;
|
||||
using ULONG = System.UInt32;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public static class PackageReadHelper
|
||||
{
|
||||
@@ -304,6 +306,7 @@ namespace NativeWrappers
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// ================= Manifest Reader =================
|
||||
|
||||
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
|
||||
@@ -404,5 +407,160 @@ namespace NativeWrappers
|
||||
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
|
||||
public static extern IntPtr GetManifestPrerequistieSystemVersionName (IntPtr hReader, string lpName);
|
||||
|
||||
// ========== Appx Bundle Resource Packages ==========
|
||||
[DllImport (DllName, CallingConvention = CallConv)]
|
||||
private static extern IntPtr GetAppxBundleAllResourcePackageFileNames (IntPtr hReader);
|
||||
|
||||
[DllImport (DllName, CallingConvention = CallConv)]
|
||||
private static extern void FreeAppxBundlePayloadsFileNameList (IntPtr hStringList);
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Bundle 包中所有资源包的文件名列表。
|
||||
/// </summary>
|
||||
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
|
||||
/// <returns>资源包文件名数组,若无资源包或非 bundle 类型则返回空数组</returns>
|
||||
public static string [] GetAppxBundleAllResourcePackageFileNameList (IntPtr hReader)
|
||||
{
|
||||
IntPtr hList = GetAppxBundleAllResourcePackageFileNames (hReader);
|
||||
if (hList == IntPtr.Zero)
|
||||
return new string [0];
|
||||
|
||||
try
|
||||
{
|
||||
return ReadWStringList (hList);
|
||||
}
|
||||
finally
|
||||
{
|
||||
FreeAppxBundlePayloadsFileNameList (hList);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport (DllName, CallingConvention = CallConv)]
|
||||
private static extern IntPtr GetAppxBundleAllLocaleResourcePackageFileNames (IntPtr hReader);
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Bundle 包中所有区域设置资源包的文件名列表。
|
||||
/// </summary>
|
||||
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
|
||||
/// <returns>区域设置资源包文件名数组,若无则返回空数组</returns>
|
||||
public static string [] GetAppxBundleAllLocaleResourcePackageFileNameList (IntPtr hReader)
|
||||
{
|
||||
IntPtr hList = GetAppxBundleAllLocaleResourcePackageFileNames (hReader);
|
||||
if (hList == IntPtr.Zero)
|
||||
return new string [0];
|
||||
|
||||
try
|
||||
{
|
||||
return ReadWStringList (hList);
|
||||
}
|
||||
finally
|
||||
{
|
||||
FreeAppxBundlePayloadsFileNameList (hList);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport (DllName, CallingConvention = CallConv)]
|
||||
private static extern IntPtr GetAppxBundleAllFileResourcePackageFileNames (IntPtr hReader);
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Bundle 包中所有文件资源包的文件名列表。
|
||||
/// </summary>
|
||||
/// <param name="hReader">由 CreatePackageReader 创建的读取器句柄</param>
|
||||
/// <returns>文件资源包文件名数组,若无则返回空数组</returns>
|
||||
public static string [] GetAppxBundleAllFileResourcePackageFileNameList (IntPtr hReader)
|
||||
{
|
||||
IntPtr hList = GetAppxBundleAllFileResourcePackageFileNames (hReader);
|
||||
if (hList == IntPtr.Zero)
|
||||
return new string [0];
|
||||
|
||||
try
|
||||
{
|
||||
return ReadWStringList (hList);
|
||||
}
|
||||
finally
|
||||
{
|
||||
FreeAppxBundlePayloadsFileNameList (hList);
|
||||
}
|
||||
}
|
||||
|
||||
// 用于更新应用项名称列表(设置要查询的项)
|
||||
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
|
||||
public static extern void UpdatePackageApplicationItemGetName (
|
||||
[In] IntPtr [] lpNames, // 传入一个 IntPtr 数组,每个元素指向一个 Unicode 字符串
|
||||
uint dwArrLen
|
||||
);
|
||||
|
||||
// 回调委托声明
|
||||
[UnmanagedFunctionPointer (CallConv)]
|
||||
public delegate void IterWStringCallback ([MarshalAs (UnmanagedType.LPWStr)] string lpString);
|
||||
|
||||
// 枚举当前列表中的项(通过回调逐个返回)
|
||||
[DllImport (DllName, CallingConvention = CallConv, CharSet = CharSet.Unicode)]
|
||||
public static extern void GetPackageApplicationItemGetNameList (
|
||||
IterWStringCallback pfCallback // 回调函数指针
|
||||
);
|
||||
/// <summary>
|
||||
/// 更新内部的应用项名称列表(设置要查询的项)
|
||||
/// </summary>
|
||||
/// <param name="names">要设置的项名称集合</param>
|
||||
public static void SetApplicationItemNames (IEnumerable<string> names)
|
||||
{
|
||||
if (names == null)
|
||||
{
|
||||
// 传入空数组,清空列表
|
||||
UpdatePackageApplicationItemGetName (new IntPtr [0], 0);
|
||||
return;
|
||||
}
|
||||
|
||||
var nameList = names.ToList ();
|
||||
if (nameList.Count == 0)
|
||||
{
|
||||
UpdatePackageApplicationItemGetName (new IntPtr [0], 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// 为每个字符串分配非托管内存
|
||||
IntPtr [] ptrs = new IntPtr [nameList.Count];
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < nameList.Count; i++)
|
||||
{
|
||||
ptrs [i] = Marshal.StringToHGlobalUni (nameList [i]);
|
||||
}
|
||||
|
||||
UpdatePackageApplicationItemGetName (ptrs, (uint)nameList.Count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 释放分配的内存
|
||||
foreach (var ptr in ptrs)
|
||||
{
|
||||
if (ptr != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前内部的应用项名称列表(通过回调收集所有项)
|
||||
/// </summary>
|
||||
/// <returns>应用项名称数组</returns>
|
||||
public static string [] GetApplicationItemNames ()
|
||||
{
|
||||
var result = new List<string> ();
|
||||
|
||||
// 定义回调:将收到的字符串添加到列表
|
||||
IterWStringCallback callback = (str) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty (str))
|
||||
result.Add (str);
|
||||
};
|
||||
|
||||
// 调用本机函数,传入委托
|
||||
GetPackageApplicationItemGetNameList (callback);
|
||||
|
||||
// 注意:GC 需要保持 callback 的存活直到本机调用结束,这里通过局部变量引用即可,
|
||||
// 因为本机函数是同步调用的,不会在函数返回后继续使用回调。
|
||||
return result.ToArray ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,6 +168,46 @@ namespace AppxPackage
|
||||
|
||||
return result;
|
||||
}
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal struct WSTRWSTRPAIR
|
||||
{
|
||||
public IntPtr lpKey; // LPWSTR
|
||||
public IntPtr lpValue; // LPWSTR
|
||||
}
|
||||
[DllImport (DLL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr GetPriLocaleResourceAllValuesList (
|
||||
PCSPRIFILE pFilePri,
|
||||
[MarshalAs (UnmanagedType.LPWStr)] string lpResName);
|
||||
[DllImport (DLL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void DestroyLocaleResourceAllValuesList (IntPtr list);
|
||||
[DllImport (DLL, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr GetPriFileResourceAllValuesList (
|
||||
PCSPRIFILE pFilePri,
|
||||
[MarshalAs (UnmanagedType.LPWStr)] string lpResName);
|
||||
/// <summary>
|
||||
/// 将 HWSWSPAIRLIST 解析为 Dictionary<string, string>(语言代码 → 字符串值)
|
||||
/// </summary>
|
||||
public static Dictionary<string, string> ParseWSWSPAIRLIST (IntPtr ptr)
|
||||
{
|
||||
if (ptr == IntPtr.Zero) return null;
|
||||
|
||||
uint count = (uint)Marshal.ReadInt32 (ptr); // dwLength
|
||||
IntPtr pFirst = IntPtr.Add (ptr, sizeof (uint)); // 跳过 dwLength
|
||||
int elementSize = Marshal.SizeOf (typeof (WSTRWSTRPAIR));
|
||||
|
||||
var dict = new Dictionary<string, string> ((int)count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
IntPtr pItem = IntPtr.Add (pFirst, i * elementSize);
|
||||
var item = (WSTRWSTRPAIR)Marshal.PtrToStructure (pItem, typeof (WSTRWSTRPAIR));
|
||||
|
||||
string key = item.lpKey != IntPtr.Zero ? Marshal.PtrToStringUni (item.lpKey) : null;
|
||||
string value = item.lpValue != IntPtr.Zero ? Marshal.PtrToStringUni (item.lpValue) : null;
|
||||
if (key != null)
|
||||
dict [key] = value;
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
public static class LpcwstrListHelper
|
||||
{
|
||||
|
||||
@@ -239,6 +239,69 @@ namespace AppxPackage
|
||||
|
||||
return task.Result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取指定字符串资源的所有语言变体(语言代码 → 字符串值)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> LocaleResourceAllValue (string resName)
|
||||
{
|
||||
var task = Task.Factory.StartNew (() =>
|
||||
{
|
||||
IntPtr ptr = IntPtr.Zero;
|
||||
try
|
||||
{
|
||||
// 修正:第一个参数应为 m_hPriFile,而不是 ptr
|
||||
ptr = PriFileHelper.GetPriLocaleResourceAllValuesList (m_hPriFile, resName);
|
||||
if (ptr == IntPtr.Zero)
|
||||
return new Dictionary<string, string> ();
|
||||
|
||||
// 解析 HWSWSPAIRLIST 为 Dictionary<string, string>
|
||||
var raw = PriFileHelper.ParseWSWSPAIRLIST (ptr);
|
||||
return raw ?? new Dictionary<string, string> ();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (ptr != IntPtr.Zero)
|
||||
PriFileHelper.DestroyLocaleResourceAllValuesList (ptr);
|
||||
}
|
||||
});
|
||||
return task.Result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取指定文件资源的所有缩放/对比度/目标大小变体(PriResourceKey → 文件路径)
|
||||
/// </summary>
|
||||
public Dictionary<PriResourceKey, string> PathResourceAllValue (string resName)
|
||||
{
|
||||
var task = Task.Factory.StartNew (() =>
|
||||
{
|
||||
IntPtr ptr = IntPtr.Zero;
|
||||
try
|
||||
{
|
||||
ptr = PriFileHelper.GetPriFileResourceAllValuesList (m_hPriFile, resName);
|
||||
if (ptr == IntPtr.Zero)
|
||||
return new Dictionary<PriResourceKey, string> ();
|
||||
|
||||
// 解析 HDWSPAIRLIST 为 Dictionary<uint, string>
|
||||
var raw = PriFileHelper.ParseDWSPAIRLIST (ptr);
|
||||
if (raw == null)
|
||||
return new Dictionary<PriResourceKey, string> ();
|
||||
|
||||
// 将 uint 键转换为 PriResourceKey
|
||||
var result = new Dictionary<PriResourceKey, string> ();
|
||||
foreach (var kv in raw)
|
||||
{
|
||||
var key = new PriResourceKey (kv.Key);
|
||||
result [key] = kv.Value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (ptr != IntPtr.Zero)
|
||||
PriFileHelper.DestroyPriResourceAllValueList (ptr); // 注意:使用对应的释放函数
|
||||
}
|
||||
});
|
||||
return task.Result;
|
||||
}
|
||||
}
|
||||
public class PriReaderBundle: IDisposable
|
||||
{
|
||||
|
||||
67
AppxPackage/Utils.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
internal static class Utils
|
||||
{
|
||||
public static string PascalToCamel (string pascalCase)
|
||||
{
|
||||
if (string.IsNullOrEmpty (pascalCase))
|
||||
return pascalCase;
|
||||
|
||||
// 已经是小驼峰或首字母小写,直接返回
|
||||
if (char.IsLower (pascalCase [0]))
|
||||
return pascalCase;
|
||||
|
||||
// 按大写字母边界拆分单词(处理连续大写字母作为一个单词)
|
||||
// 正则解释:
|
||||
// (?<=[a-z])(?=[A-Z]) 小写后跟大写 -> 分割
|
||||
// | 或
|
||||
// (?<=[A-Z])(?=[A-Z][a-z]) 大写后跟大写+小写(如 XMLR 中的 X 和 MLR)-> 分割
|
||||
string [] words = Regex.Split (pascalCase, @"(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])");
|
||||
|
||||
StringBuilder result = new StringBuilder ();
|
||||
|
||||
for (int i = 0; i < words.Length; i++)
|
||||
{
|
||||
string word = words [i];
|
||||
if (string.IsNullOrEmpty (word))
|
||||
continue;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
// 第一个单词:全部转为小写
|
||||
result.Append (word.ToLowerInvariant ());
|
||||
}
|
||||
else
|
||||
{
|
||||
// 后续单词:首字母大写,其余小写
|
||||
result.Append (char.ToUpperInvariant (word [0]));
|
||||
if (word.Length > 1)
|
||||
result.Append (word.Substring (1).ToLowerInvariant ());
|
||||
}
|
||||
}
|
||||
|
||||
return result.ToString ();
|
||||
}
|
||||
/// <summary>
|
||||
/// 表示应用清单中用于定义文件/资源路径的属性名称
|
||||
/// </summary>
|
||||
public static readonly List<string> AppFileProperties = new List<string>
|
||||
{
|
||||
"Executable",
|
||||
"LockScreenLogo",
|
||||
"Logo",
|
||||
"SmallLogo",
|
||||
"Square150x150Logo",
|
||||
"Square30x30Logo",
|
||||
"Square310x310Logo",
|
||||
"Square44x44Logo",
|
||||
"Square70x70Logo",
|
||||
"Square71x71Logo",
|
||||
"StartPage",
|
||||
"Tall150x310Logo",
|
||||
"WideLogo",
|
||||
"Wide310x150Logo"
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net40" />
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net40" />
|
||||
</packages>
|
||||
62
ArmBuild.ps1
Normal file
@@ -0,0 +1,62 @@
|
||||
# ArmBuild.ps1
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$staging = Join-Path $root "_staging"
|
||||
$outZip = Join-Path $root "ArmPackage.zip"
|
||||
$packageFolderName = "Desktop App Installer"
|
||||
$destRoot = Join-Path $staging $packageFolderName
|
||||
|
||||
function Copy-Binaries-ToDest($src, $dest)
|
||||
{
|
||||
if (!(Test-Path $src)) { return }
|
||||
|
||||
Get-ChildItem $src -File | Where-Object {
|
||||
$_.Extension -in ".exe", ".dll"
|
||||
} | ForEach-Object {
|
||||
Copy-Item -Path $_.FullName -Destination $dest -Force
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Preparing staging..."
|
||||
# 清理旧的 staging
|
||||
if (Test-Path $staging) { Remove-Item $staging -Recurse -Force }
|
||||
New-Item $destRoot -ItemType Directory | Out-Null
|
||||
|
||||
# ① 先放 Release
|
||||
Copy-Binaries-ToDest (Join-Path $root "Release") $destRoot
|
||||
|
||||
# ② 再放 ARM\Release(覆盖同名)
|
||||
Copy-Binaries-ToDest (Join-Path $root "ARM\Release") $destRoot
|
||||
|
||||
# ③ shared 全部铺到 Desktop App Installer 里
|
||||
$shared = Join-Path $root "shared"
|
||||
if (Test-Path $shared) {
|
||||
Get-ChildItem $shared -Recurse | ForEach-Object {
|
||||
$relativePath = $_.FullName.Substring($shared.Length).TrimStart('\')
|
||||
$destinationPath = Join-Path $destRoot $relativePath
|
||||
|
||||
if ($_.PSIsContainer) {
|
||||
if (!(Test-Path $destinationPath)) {
|
||||
New-Item -Path $destinationPath -ItemType Directory | Out-Null
|
||||
}
|
||||
} else {
|
||||
$parentDir = Split-Path $destinationPath -Parent
|
||||
if (!(Test-Path $parentDir)) {
|
||||
New-Item -Path $parentDir -ItemType Directory | Out-Null
|
||||
}
|
||||
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Creating ZIP..."
|
||||
if (Test-Path $outZip) { Remove-Item $outZip -Force }
|
||||
|
||||
# 压缩 _staging 下的 Desktop App Installer 文件夹
|
||||
Compress-Archive -Path $destRoot -DestinationPath $outZip -CompressionLevel Optimal
|
||||
|
||||
# 清理 staging
|
||||
Remove-Item $staging -Recurse -Force
|
||||
|
||||
Write-Host "Done: $outZip"
|
||||
10
ArmDesktopSdk.props
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='ARM'">
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -32,6 +32,24 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -11,6 +11,8 @@ using ModernNotice;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bridge
|
||||
{
|
||||
@@ -762,6 +764,52 @@ namespace Bridge
|
||||
}
|
||||
public bool AddApplicationItem (string itemName) => PackageReader.AddApplicationItem (itemName);
|
||||
public bool RemoveApplicationItem (string itemName) => PackageReader.RemoveApplicationItem (itemName);
|
||||
private List<object> JsArrayToList (object jsArray)
|
||||
{
|
||||
var result = new List<object> ();
|
||||
|
||||
if (jsArray == null)
|
||||
return result;
|
||||
|
||||
// JS Array 有 length 属性和数字索引器
|
||||
var type = jsArray.GetType ();
|
||||
|
||||
int length = (int)type.InvokeMember (
|
||||
"length",
|
||||
BindingFlags.GetProperty,
|
||||
null,
|
||||
jsArray,
|
||||
null);
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
object value = type.InvokeMember (
|
||||
i.ToString (),
|
||||
BindingFlags.GetProperty,
|
||||
null,
|
||||
jsArray,
|
||||
null);
|
||||
|
||||
result.Add (value);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
public void UpdateApplicationItems (object items)
|
||||
{
|
||||
lock (_I_PackageReader._cacheCleanupLock)
|
||||
{
|
||||
try
|
||||
{
|
||||
_I_PackageReader._cache?.Clear ();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
var stritems = JsArrayToList (items).Select (e => e?.ToString ()).ToList ();
|
||||
PackageReader.UpdateApplicationItems (stritems);
|
||||
}
|
||||
public string [] GetApplicationItems () => PackageReader.GetApplicationItems ();
|
||||
public string GetApplicationItemsToJson () => JsonConvert.SerializeObject (GetApplicationItems ());
|
||||
// Cache about
|
||||
private const int MaxCacheItems = 64; // 最大缓存数量
|
||||
private static readonly TimeSpan CacheDuration = TimeSpan.FromMinutes (30);
|
||||
@@ -895,6 +943,8 @@ namespace Bridge
|
||||
public _I_System System => system;
|
||||
public _I_Notice Notice => new _I_Notice ();
|
||||
public _I_Process Process => proc;
|
||||
public _I_Web Web => new _I_Web ();
|
||||
public _I_Utilities Utilities => new _I_Utilities ();
|
||||
public string CmdArgs
|
||||
{
|
||||
get
|
||||
|
||||
816
DataUtils/Calendar.cs
Normal file
@@ -0,0 +1,816 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace DataUtils
|
||||
{
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Calendar
|
||||
{
|
||||
private DateTime _utcDateTime; // 存储 UTC 时间(所有算术的基础)
|
||||
private Calendar _calendar; // 当前日历系统
|
||||
private TimeZoneInfo _timeZone; // 当前时区
|
||||
private bool _is24HourClock; // true = 24小时制,false = 12小时制
|
||||
private List<string> _languages; // 语言优先级列表
|
||||
private string _numeralSystem = "Latn"; // 数字系统(简化实现,仅存储)
|
||||
private const long TicksPerNanosecond = 100; // 1 tick = 100 ns
|
||||
|
||||
// 缓存的本地时间(根据时区从 _utcDateTime 转换得到)
|
||||
private DateTime _localDateTime;
|
||||
|
||||
// 更新本地时间(当 UTC 时间或时区改变时调用)
|
||||
private void UpdateLocalDateTime ()
|
||||
{
|
||||
_localDateTime = TimeZoneInfo.ConvertTimeFromUtc (_utcDateTime, _timeZone);
|
||||
}
|
||||
|
||||
// 当本地时间被修改后,同步回 UTC 时间
|
||||
private void UpdateUtcDateTime ()
|
||||
{
|
||||
_utcDateTime = TimeZoneInfo.ConvertTimeToUtc (_localDateTime, _timeZone);
|
||||
}
|
||||
|
||||
// 辅助:日历字段的读取
|
||||
private int GetCalendarField (Func<Calendar, DateTime, int> fieldGetter)
|
||||
{
|
||||
return fieldGetter (_calendar, _localDateTime);
|
||||
}
|
||||
|
||||
// 辅助:日历字段的设置(返回新的本地时间)
|
||||
private DateTime SetCalendarField (DateTime currentLocal, Func<Calendar, DateTime, int, DateTime> fieldSetter, int value)
|
||||
{
|
||||
return fieldSetter (_calendar, currentLocal, value);
|
||||
}
|
||||
|
||||
// 根据日历标识符创建日历实例
|
||||
private static Calendar CreateCalendar (string calendarId)
|
||||
{
|
||||
switch (calendarId)
|
||||
{
|
||||
case "GregorianCalendar":
|
||||
return new GregorianCalendar ();
|
||||
case "HebrewCalendar":
|
||||
return new HebrewCalendar ();
|
||||
case "HijriCalendar":
|
||||
return new HijriCalendar ();
|
||||
case "JapaneseCalendar":
|
||||
return new JapaneseCalendar ();
|
||||
case "KoreanCalendar":
|
||||
return new KoreanCalendar ();
|
||||
case "TaiwanCalendar":
|
||||
return new TaiwanCalendar ();
|
||||
case "ThaiBuddhistCalendar":
|
||||
return new ThaiBuddhistCalendar ();
|
||||
case "UmAlQuraCalendar":
|
||||
return new UmAlQuraCalendar ();
|
||||
// 可根据需要增加更多日历
|
||||
default:
|
||||
return new GregorianCalendar ();
|
||||
}
|
||||
}
|
||||
|
||||
private _I_Language GetFormatCulture ()
|
||||
{
|
||||
if (_languages == null || _languages.Count == 0)
|
||||
return new _I_Language (CultureInfo.CurrentCulture.Name);
|
||||
try
|
||||
{
|
||||
return new _I_Language (_languages [0]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new _I_Language (CultureInfo.CurrentCulture.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private List<object> JsArrayToList (object jsArray)
|
||||
{
|
||||
var result = new List<object> ();
|
||||
|
||||
if (jsArray == null)
|
||||
return result;
|
||||
|
||||
// JS Array 有 length 属性和数字索引器
|
||||
var type = jsArray.GetType ();
|
||||
|
||||
int length = (int)type.InvokeMember (
|
||||
"length",
|
||||
BindingFlags.GetProperty,
|
||||
null,
|
||||
jsArray,
|
||||
null);
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
object value = type.InvokeMember (
|
||||
i.ToString (),
|
||||
BindingFlags.GetProperty,
|
||||
null,
|
||||
jsArray,
|
||||
null);
|
||||
|
||||
result.Add (value);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public _I_Calendar ()
|
||||
: this (new List<string> { CultureInfo.CurrentCulture.Name },
|
||||
"GregorianCalendar", "24HourClock", TimeZoneInfo.Local.Id)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_Calendar (object languages)
|
||||
: this (languages, "GregorianCalendar", "24HourClock", TimeZoneInfo.Local.Id)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_Calendar (object languages, string calendar, string clock)
|
||||
: this (languages, calendar, clock, TimeZoneInfo.Local.Id)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_Calendar (object languages, string calendar, string clock, string timeZoneId)
|
||||
{
|
||||
_languages = languages == null ? new List<string> () : new List<string> (JsArrayToList (languages).Select (e => e as string));
|
||||
if (_languages.Count == 0)
|
||||
_languages.Add (CultureInfo.CurrentCulture.Name);
|
||||
|
||||
_calendar = CreateCalendar (calendar);
|
||||
_is24HourClock = (clock == "24HourClock");
|
||||
_timeZone = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
|
||||
_utcDateTime = DateTime.UtcNow;
|
||||
UpdateLocalDateTime ();
|
||||
}
|
||||
|
||||
public int Day
|
||||
{
|
||||
get
|
||||
{
|
||||
return _calendar.GetDayOfMonth (_localDateTime);
|
||||
}
|
||||
set
|
||||
{
|
||||
int currentDay = _calendar.GetDayOfMonth (_localDateTime);
|
||||
if (value == currentDay) return;
|
||||
// 通过加减天数来设置日期
|
||||
DateTime newLocal = _calendar.AddDays (_localDateTime, value - currentDay);
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public int DayOfWeek
|
||||
{
|
||||
get
|
||||
{
|
||||
// 返回 0-6,0 表示星期日
|
||||
return (int)_calendar.GetDayOfWeek (_localDateTime);
|
||||
}
|
||||
}
|
||||
|
||||
public int Era
|
||||
{
|
||||
get
|
||||
{
|
||||
return _calendar.GetEra (_localDateTime);
|
||||
}
|
||||
set
|
||||
{
|
||||
// 更改纪元较复杂,简化:仅当值不同时不做任何操作(可根据需求实现)
|
||||
// 这里忽略设置,或者可以抛出 NotSupportedException
|
||||
if (value != Era)
|
||||
throw new NotSupportedException ("Setting Era directly is not supported in this implementation.");
|
||||
}
|
||||
}
|
||||
|
||||
public int FirstDayInThisMonth
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
public int FirstEra
|
||||
{
|
||||
get { return _calendar.GetEra (_calendar.MinSupportedDateTime); }
|
||||
}
|
||||
|
||||
public int FirstHourInThisPeriod
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_is24HourClock)
|
||||
return 0;
|
||||
else
|
||||
return (Period == 0) ? 1 : 13;
|
||||
}
|
||||
}
|
||||
|
||||
public int FirstMinuteInThisHour
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public int FirstMonthInThisYear
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
public int FirstPeriodInThisDay
|
||||
{
|
||||
get { return 0; } // 0 = AM
|
||||
}
|
||||
|
||||
public int FirstSecondInThisMinute
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public int FirstYearInThisEra
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime eraStart = _calendar.MinSupportedDateTime;
|
||||
int targetEra = Era;
|
||||
while (_calendar.GetEra (eraStart) != targetEra && eraStart < DateTime.MaxValue)
|
||||
{
|
||||
eraStart = _calendar.AddYears (eraStart, 1);
|
||||
}
|
||||
return _calendar.GetYear (eraStart);
|
||||
}
|
||||
}
|
||||
|
||||
public int Hour
|
||||
{
|
||||
get
|
||||
{
|
||||
int hour24 = _calendar.GetHour (_localDateTime);
|
||||
if (_is24HourClock)
|
||||
return hour24;
|
||||
int hour12 = hour24 % 12;
|
||||
return (hour12 == 0) ? 12 : hour12;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_is24HourClock)
|
||||
{
|
||||
if (value < 0 || value > 23)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Hour must be between 0 and 23 for 24-hour clock.");
|
||||
DateTime newLocal = _localDateTime.Date.AddHours (value).AddMinutes (Minute).AddSeconds (Second);
|
||||
_localDateTime = newLocal;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value < 1 || value > 12)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Hour must be between 1 and 12 for 12-hour clock.");
|
||||
int hour24 = value % 12;
|
||||
if (Period == 1) hour24 += 12;
|
||||
DateTime newLocal = _localDateTime.Date.AddHours (hour24).AddMinutes (Minute).AddSeconds (Second);
|
||||
_localDateTime = newLocal;
|
||||
}
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDaylightSavingTime
|
||||
{
|
||||
get { return _timeZone.IsDaylightSavingTime (_localDateTime); }
|
||||
}
|
||||
|
||||
public _I_List Languages
|
||||
{
|
||||
get { return new _I_List (_languages.AsReadOnly ().Select (e => (object)e), true) ; }
|
||||
}
|
||||
|
||||
public int LastDayInThisMonth
|
||||
{
|
||||
get { return _calendar.GetDaysInMonth (_calendar.GetYear (_localDateTime), _calendar.GetMonth (_localDateTime)); }
|
||||
}
|
||||
|
||||
public int LastEra
|
||||
{
|
||||
get { return _calendar.GetEra (_calendar.MaxSupportedDateTime); }
|
||||
}
|
||||
|
||||
public int LastHourInThisPeriod
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_is24HourClock)
|
||||
return 23;
|
||||
else
|
||||
return (Period == 0) ? 11 : 23;
|
||||
}
|
||||
}
|
||||
|
||||
public int LastMinuteInThisHour
|
||||
{
|
||||
get { return 59; }
|
||||
}
|
||||
|
||||
public int LastMonthInThisYear
|
||||
{
|
||||
get { return _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)); }
|
||||
}
|
||||
|
||||
public int LastPeriodInThisDay
|
||||
{
|
||||
get { return 1; } // 1 = PM
|
||||
}
|
||||
|
||||
public int LastSecondInThisMinute
|
||||
{
|
||||
get { return 59; }
|
||||
}
|
||||
|
||||
public int LastYearInThisEra
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime eraEnd = _calendar.MaxSupportedDateTime;
|
||||
int targetEra = Era;
|
||||
while (_calendar.GetEra (eraEnd) != targetEra && eraEnd > DateTime.MinValue)
|
||||
{
|
||||
eraEnd = _calendar.AddYears (eraEnd, -1);
|
||||
}
|
||||
return _calendar.GetYear (eraEnd);
|
||||
}
|
||||
}
|
||||
|
||||
public int Minute
|
||||
{
|
||||
get { return _calendar.GetMinute (_localDateTime); }
|
||||
set
|
||||
{
|
||||
if (value < 0 || value > 59)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Minute must be between 0 and 59.");
|
||||
DateTime newLocal = _localDateTime.AddMinutes (value - _calendar.GetMinute (_localDateTime));
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public int Month
|
||||
{
|
||||
get { return _calendar.GetMonth (_localDateTime); }
|
||||
set
|
||||
{
|
||||
if (value < 1 || value > _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)))
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Month is out of range for current year.");
|
||||
DateTime newLocal = SetCalendarField (_localDateTime, (cal, dt, val) => cal.AddMonths (dt, val - cal.GetMonth (dt)), value);
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public int Nanosecond
|
||||
{
|
||||
get
|
||||
{
|
||||
long ticksInSecond = _localDateTime.Ticks % TimeSpan.TicksPerSecond;
|
||||
return (int)(ticksInSecond * 100); // 1 tick = 100 ns
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0 || value > 999999999)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Nanosecond must be between 0 and 999,999,999.");
|
||||
long ticks = (_localDateTime.Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond + (value / 100);
|
||||
_localDateTime = new DateTime (ticks, _localDateTime.Kind);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public int NumberOfDaysInThisMonth
|
||||
{
|
||||
get { return LastDayInThisMonth; }
|
||||
}
|
||||
|
||||
public int NumberOfEras
|
||||
{
|
||||
get { return _calendar.Eras.Length; }
|
||||
}
|
||||
|
||||
public int NumberOfHoursInThisPeriod
|
||||
{
|
||||
get { return _is24HourClock ? 24 : 12; }
|
||||
}
|
||||
|
||||
public int NumberOfMinutesInThisHour
|
||||
{
|
||||
get { return 60; }
|
||||
}
|
||||
|
||||
public int NumberOfMonthsInThisYear
|
||||
{
|
||||
get { return _calendar.GetMonthsInYear (_calendar.GetYear (_localDateTime)); }
|
||||
}
|
||||
|
||||
public int NumberOfPeriodsInThisDay
|
||||
{
|
||||
get { return 2; }
|
||||
}
|
||||
|
||||
public int NumberOfSecondsInThisMinute
|
||||
{
|
||||
get { return 60; }
|
||||
}
|
||||
|
||||
public int NumberOfYearsInThisEra
|
||||
{
|
||||
get { return LastYearInThisEra - FirstYearInThisEra + 1; }
|
||||
}
|
||||
|
||||
public string NumeralSystem
|
||||
{
|
||||
get { return _numeralSystem; }
|
||||
set { _numeralSystem = value; } // 简化:未实现实际数字转换
|
||||
}
|
||||
|
||||
public int Period
|
||||
{
|
||||
get
|
||||
{
|
||||
int hour24 = _calendar.GetHour (_localDateTime);
|
||||
return (hour24 >= 12) ? 1 : 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != 0 && value != 1)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Period must be 0 (AM) or 1 (PM).");
|
||||
int currentPeriod = Period;
|
||||
if (currentPeriod == value) return;
|
||||
// 切换 AM/PM:加减 12 小时
|
||||
DateTime newLocal = _localDateTime.AddHours (value == 0 ? -12 : 12);
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public string ResolvedLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_languages != null && _languages.Count > 0)
|
||||
return _languages [0];
|
||||
return CultureInfo.CurrentCulture.Name;
|
||||
}
|
||||
}
|
||||
|
||||
public int Second
|
||||
{
|
||||
get { return _calendar.GetSecond (_localDateTime); }
|
||||
set
|
||||
{
|
||||
if (value < 0 || value > 59)
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Second must be between 0 and 59.");
|
||||
DateTime newLocal = _localDateTime.AddSeconds (value - _calendar.GetSecond (_localDateTime));
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public int Year
|
||||
{
|
||||
get { return _calendar.GetYear (_localDateTime); }
|
||||
set
|
||||
{
|
||||
if (value < _calendar.GetYear (_calendar.MinSupportedDateTime) || value > _calendar.GetYear (_calendar.MaxSupportedDateTime))
|
||||
throw new ArgumentOutOfRangeException (nameof (value), "Year is out of range for this calendar.");
|
||||
DateTime newLocal = SetCalendarField (_localDateTime, (cal, dt, val) => cal.AddYears (dt, val - cal.GetYear (dt)), value);
|
||||
_localDateTime = newLocal;
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddDays (int days)
|
||||
{
|
||||
_localDateTime = _calendar.AddDays (_localDateTime, days);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddEras (int eras)
|
||||
{
|
||||
// 简化:每个纪元按 1000 年估算(实际应基于日历的纪元范围)
|
||||
// 大多数情况下不应频繁使用此方法
|
||||
_localDateTime = _calendar.AddYears (_localDateTime, eras * 1000);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddHours (int hours)
|
||||
{
|
||||
_localDateTime = _localDateTime.AddHours (hours);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddMinutes (int minutes)
|
||||
{
|
||||
_localDateTime = _localDateTime.AddMinutes (minutes);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddMonths (int months)
|
||||
{
|
||||
_localDateTime = _calendar.AddMonths (_localDateTime, months);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddNanoseconds (int nanoseconds)
|
||||
{
|
||||
long ticksToAdd = nanoseconds / 100;
|
||||
_localDateTime = _localDateTime.AddTicks (ticksToAdd);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddPeriods (int periods)
|
||||
{
|
||||
_localDateTime = _localDateTime.AddHours (periods * 12);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddSeconds (int seconds)
|
||||
{
|
||||
_localDateTime = _localDateTime.AddSeconds (seconds);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void AddWeeks (int weeks)
|
||||
{
|
||||
AddDays (weeks * 7);
|
||||
}
|
||||
|
||||
public void AddYears (int years)
|
||||
{
|
||||
_localDateTime = _calendar.AddYears (_localDateTime, years);
|
||||
UpdateUtcDateTime ();
|
||||
}
|
||||
|
||||
public void ChangeCalendarSystem (string calendarId)
|
||||
{
|
||||
Calendar newCalendar = CreateCalendar (calendarId);
|
||||
// 注意:日历改变不会改变绝对时间,但会影响组件(年、月、日等)
|
||||
// 只需替换日历实例,_localDateTime 保持不变(但解释方式变了)
|
||||
_calendar = newCalendar;
|
||||
}
|
||||
|
||||
public void ChangeClock (string clock)
|
||||
{
|
||||
_is24HourClock = (clock == "24HourClock");
|
||||
}
|
||||
|
||||
public void ChangeTimeZone (string timeZoneId)
|
||||
{
|
||||
_timeZone = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
|
||||
UpdateLocalDateTime (); // 重新计算本地时间(UTC 不变)
|
||||
}
|
||||
|
||||
public _I_Calendar Clone ()
|
||||
{
|
||||
var clone = new _I_Calendar (_languages, GetCalendarSystem (), GetClock (), GetTimeZone ());
|
||||
clone.SetDateTime (GetDateTime ());
|
||||
return clone;
|
||||
}
|
||||
|
||||
public int Compare (_I_Calendar other)
|
||||
{
|
||||
if (other == null) return 1;
|
||||
return DateTime.Compare (this.GetDateTime (), other.GetDateTime ());
|
||||
}
|
||||
|
||||
public static DateTime JsDateToDateTime (object jsDate)
|
||||
{
|
||||
if (jsDate == null)
|
||||
throw new ArgumentNullException (nameof (jsDate));
|
||||
Type type = jsDate.GetType ();
|
||||
double milliseconds = (double)type.InvokeMember (
|
||||
"getTime",
|
||||
BindingFlags.InvokeMethod,
|
||||
null,
|
||||
jsDate,
|
||||
null);
|
||||
DateTimeOffset epoch = new DateTimeOffset (1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
DateTimeOffset dateTimeOffset = epoch.AddMilliseconds (milliseconds);
|
||||
return dateTimeOffset.UtcDateTime;
|
||||
}
|
||||
public int CompareDateTime (object other)
|
||||
{
|
||||
return DateTime.Compare (this.GetDateTime (), JsDateToDateTime (other));
|
||||
}
|
||||
|
||||
public void CopyTo (_I_Calendar other)
|
||||
{
|
||||
if (other == null) throw new ArgumentNullException (nameof (other));
|
||||
other._utcDateTime = this._utcDateTime;
|
||||
other._localDateTime = this._localDateTime;
|
||||
other._calendar = this._calendar;
|
||||
other._timeZone = this._timeZone;
|
||||
other._is24HourClock = this._is24HourClock;
|
||||
other._languages = new List<string> (this._languages);
|
||||
other._numeralSystem = this._numeralSystem;
|
||||
}
|
||||
|
||||
public string DayAsPaddedString (int minDigits)
|
||||
{
|
||||
return Day.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string DayAsString ()
|
||||
{
|
||||
return Day.ToString ();
|
||||
}
|
||||
|
||||
public string DayOfWeekAsSoloString ()
|
||||
{
|
||||
return DayOfWeekAsString ();
|
||||
}
|
||||
|
||||
public string DayOfWeekAsSoloString (int idealLength)
|
||||
{
|
||||
// 简化:忽略 idealLength
|
||||
return DayOfWeekAsString ();
|
||||
}
|
||||
|
||||
public string DayOfWeekAsString ()
|
||||
{
|
||||
return _localDateTime.ToString ("dddd", GetFormatCulture ());
|
||||
}
|
||||
|
||||
public string DayOfWeekAsString (int idealLength)
|
||||
{
|
||||
return DayOfWeekAsString ();
|
||||
}
|
||||
|
||||
public string EraAsString ()
|
||||
{
|
||||
// 简化:返回纪元索引的字符串
|
||||
return Era.ToString ();
|
||||
}
|
||||
|
||||
public string EraAsString (int idealLength)
|
||||
{
|
||||
return EraAsString ();
|
||||
}
|
||||
|
||||
public string GetCalendarSystem ()
|
||||
{
|
||||
if (_calendar is GregorianCalendar) return "GregorianCalendar";
|
||||
if (_calendar is HebrewCalendar) return "HebrewCalendar";
|
||||
if (_calendar is HijriCalendar) return "HijriCalendar";
|
||||
if (_calendar is JapaneseCalendar) return "JapaneseCalendar";
|
||||
if (_calendar is KoreanCalendar) return "KoreanCalendar";
|
||||
if (_calendar is TaiwanCalendar) return "TaiwanCalendar";
|
||||
if (_calendar is ThaiBuddhistCalendar) return "ThaiBuddhistCalendar";
|
||||
if (_calendar is UmAlQuraCalendar) return "UmAlQuraCalendar";
|
||||
return "GregorianCalendar";
|
||||
}
|
||||
|
||||
public string GetClock ()
|
||||
{
|
||||
return _is24HourClock ? "24HourClock" : "12HourClock";
|
||||
}
|
||||
|
||||
public DateTime GetDateTime ()
|
||||
{
|
||||
// 返回 UTC 时间
|
||||
return _utcDateTime;
|
||||
}
|
||||
|
||||
public string GetTimeZone ()
|
||||
{
|
||||
return _timeZone.Id;
|
||||
}
|
||||
|
||||
public string HourAsPaddedString (int minDigits)
|
||||
{
|
||||
return Hour.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string HourAsString ()
|
||||
{
|
||||
return Hour.ToString ();
|
||||
}
|
||||
|
||||
public string MinuteAsPaddedString (int minDigits)
|
||||
{
|
||||
return Minute.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string MinuteAsString ()
|
||||
{
|
||||
return Minute.ToString ();
|
||||
}
|
||||
|
||||
public string MonthAsNumericString ()
|
||||
{
|
||||
return Month.ToString ();
|
||||
}
|
||||
|
||||
public string MonthAsPaddedNumericString (int minDigits)
|
||||
{
|
||||
return Month.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string MonthAsSoloString ()
|
||||
{
|
||||
return _localDateTime.ToString ("MMMM", GetFormatCulture ());
|
||||
}
|
||||
|
||||
public string MonthAsSoloString (int idealLength)
|
||||
{
|
||||
return MonthAsSoloString ();
|
||||
}
|
||||
|
||||
public string MonthAsString ()
|
||||
{
|
||||
return _localDateTime.ToString ("MMM", GetFormatCulture ());
|
||||
}
|
||||
|
||||
public string MonthAsString (int idealLength)
|
||||
{
|
||||
return MonthAsString ();
|
||||
}
|
||||
|
||||
public string NanosecondAsPaddedString (int minDigits)
|
||||
{
|
||||
return Nanosecond.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string NanosecondAsString ()
|
||||
{
|
||||
return Nanosecond.ToString ();
|
||||
}
|
||||
|
||||
public string PeriodAsString ()
|
||||
{
|
||||
return PeriodAsString (0);
|
||||
}
|
||||
|
||||
public string PeriodAsString (int idealLength)
|
||||
{
|
||||
return _localDateTime.ToString ("tt", GetFormatCulture ());
|
||||
}
|
||||
|
||||
public string SecondAsPaddedString (int minDigits)
|
||||
{
|
||||
return Second.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string SecondAsString ()
|
||||
{
|
||||
return Second.ToString ();
|
||||
}
|
||||
|
||||
public void SetDateTime (DateTime value)
|
||||
{
|
||||
_utcDateTime = value.ToUniversalTime ();
|
||||
UpdateLocalDateTime ();
|
||||
}
|
||||
|
||||
public void SetToMax ()
|
||||
{
|
||||
SetDateTime (DateTime.MaxValue);
|
||||
}
|
||||
|
||||
public void SetToMin ()
|
||||
{
|
||||
SetDateTime (DateTime.MinValue);
|
||||
}
|
||||
|
||||
public void SetToNow ()
|
||||
{
|
||||
SetDateTime (DateTime.UtcNow);
|
||||
}
|
||||
|
||||
public string TimeZoneAsString ()
|
||||
{
|
||||
return TimeZoneAsString (0);
|
||||
}
|
||||
|
||||
public string TimeZoneAsString (int idealLength)
|
||||
{
|
||||
// 简化:返回标准显示名称
|
||||
return _timeZone.DisplayName;
|
||||
}
|
||||
|
||||
public string YearAsPaddedString (int minDigits)
|
||||
{
|
||||
return Year.ToString ().PadLeft (minDigits, '0');
|
||||
}
|
||||
|
||||
public string YearAsString ()
|
||||
{
|
||||
return Year.ToString ();
|
||||
}
|
||||
|
||||
public string YearAsTruncatedString (int remainingDigits)
|
||||
{
|
||||
string yearStr = Year.ToString ();
|
||||
if (yearStr.Length <= remainingDigits)
|
||||
return yearStr;
|
||||
return yearStr.Substring (yearStr.Length - remainingDigits);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,24 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
@@ -45,7 +63,10 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Calendar.cs" />
|
||||
<Compile Include="DateTimeFormat.cs" />
|
||||
<Compile Include="Download.cs" />
|
||||
<Compile Include="Enumerable.cs" />
|
||||
<Compile Include="HResult.cs" />
|
||||
<Compile Include="IE.cs" />
|
||||
<Compile Include="Locale.cs" />
|
||||
@@ -61,6 +82,7 @@
|
||||
<Compile Include="Utils.cs" />
|
||||
<Compile Include="Version.cs" />
|
||||
<Compile Include="VisualElements.cs" />
|
||||
<Compile Include="Web.cs" />
|
||||
<Compile Include="WebBrowser.cs" />
|
||||
<Compile Include="Window.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
494
DataUtils/DateTimeFormat.cs
Normal file
@@ -0,0 +1,494 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace DataUtils
|
||||
{
|
||||
public enum YearFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
Abbreviated = 2,
|
||||
Full = 3,
|
||||
}
|
||||
|
||||
public enum MonthFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
Abbreviated = 2,
|
||||
Full = 3,
|
||||
Numeric = 4,
|
||||
}
|
||||
|
||||
public enum DayFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
}
|
||||
|
||||
public enum DayOfWeekFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
Abbreviated = 2,
|
||||
Full = 3,
|
||||
}
|
||||
|
||||
public enum HourFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
}
|
||||
|
||||
public enum MinuteFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
}
|
||||
|
||||
public enum SecondFormat
|
||||
{
|
||||
None = 0,
|
||||
Default = 1,
|
||||
}
|
||||
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_DateTimeFormatter
|
||||
{
|
||||
// ---------- 私有字段 ----------
|
||||
private string _formatTemplate; // 原始模板字符串
|
||||
private string _formatPattern; // 实际用于 .NET 格式化的模式
|
||||
private List<string> _languages; // 语言优先级列表
|
||||
private string _geographicRegion; // 地理区域
|
||||
private string _calendar = "GregorianCalendar";
|
||||
private string _clock = "24HourClock";
|
||||
private string _numeralSystem = "Latn";
|
||||
private CultureInfo _culture; // 解析后的 CultureInfo
|
||||
private string _resolvedLanguage; // 实际使用的语言
|
||||
private string _resolvedGeographicRegion; // 实际使用的区域
|
||||
|
||||
// 存储构造时传入的枚举值(用于 IncludeXXX 属性)
|
||||
private YearFormat _yearFormat = YearFormat.None;
|
||||
private MonthFormat _monthFormat = MonthFormat.None;
|
||||
private DayFormat _dayFormat = DayFormat.None;
|
||||
private DayOfWeekFormat _dayOfWeekFormat = DayOfWeekFormat.None;
|
||||
private HourFormat _hourFormat = HourFormat.None;
|
||||
private MinuteFormat _minuteFormat = MinuteFormat.None;
|
||||
private SecondFormat _secondFormat = SecondFormat.None;
|
||||
|
||||
// ---------- 辅助方法 ----------
|
||||
private static string MapTemplateToPattern (string template, CultureInfo culture, string clock)
|
||||
{
|
||||
if (string.IsNullOrEmpty (template))
|
||||
return string.Empty;
|
||||
|
||||
switch (template.ToLowerInvariant ())
|
||||
{
|
||||
case "longdate":
|
||||
return culture.DateTimeFormat.LongDatePattern;
|
||||
case "shortdate":
|
||||
return culture.DateTimeFormat.ShortDatePattern;
|
||||
case "longtime":
|
||||
return culture.DateTimeFormat.LongTimePattern;
|
||||
case "shorttime":
|
||||
return culture.DateTimeFormat.ShortTimePattern;
|
||||
case "dayofweek":
|
||||
return culture.DateTimeFormat.ShortestDayNames? [0] ?? "dddd"; // 近似
|
||||
case "dayofweek.full":
|
||||
return "dddd";
|
||||
case "dayofweek.abbreviated":
|
||||
return "ddd";
|
||||
case "day":
|
||||
return "dd";
|
||||
case "month":
|
||||
return "MMMM";
|
||||
case "month.full":
|
||||
return "MMMM";
|
||||
case "month.abbreviated":
|
||||
return "MMM";
|
||||
case "month.numeric":
|
||||
return "MM";
|
||||
case "year":
|
||||
return "yyyy";
|
||||
case "year.full":
|
||||
return "yyyy";
|
||||
case "year.abbreviated":
|
||||
return "yy";
|
||||
case "hour":
|
||||
return clock == "24HourClock" ? "HH" : "hh";
|
||||
case "minute":
|
||||
return "mm";
|
||||
case "second":
|
||||
return "ss";
|
||||
case "timezone":
|
||||
return "zzz";
|
||||
default:
|
||||
// 如果不是预定义模板,则当作自定义模式直接返回
|
||||
return template;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据枚举组合构建格式模式
|
||||
private static string BuildPatternFromEnums (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
|
||||
HourFormat hour, MinuteFormat minute, SecondFormat second,
|
||||
string clock, CultureInfo culture)
|
||||
{
|
||||
var parts = new List<string> ();
|
||||
// 日期部分
|
||||
if (dayOfWeek != DayOfWeekFormat.None)
|
||||
{
|
||||
if (dayOfWeek == DayOfWeekFormat.Abbreviated)
|
||||
parts.Add ("ddd");
|
||||
else // Full or Default
|
||||
parts.Add ("dddd");
|
||||
}
|
||||
if (year != YearFormat.None)
|
||||
{
|
||||
if (year == YearFormat.Abbreviated)
|
||||
parts.Add ("yy");
|
||||
else
|
||||
parts.Add ("yyyy");
|
||||
}
|
||||
if (month != MonthFormat.None)
|
||||
{
|
||||
switch (month)
|
||||
{
|
||||
case MonthFormat.Numeric:
|
||||
parts.Add ("MM");
|
||||
break;
|
||||
case MonthFormat.Abbreviated:
|
||||
parts.Add ("MMM");
|
||||
break;
|
||||
case MonthFormat.Full:
|
||||
parts.Add ("MMMM");
|
||||
break;
|
||||
default:
|
||||
parts.Add ("MM");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (day != DayFormat.None)
|
||||
{
|
||||
parts.Add ("dd");
|
||||
}
|
||||
string datePart = string.Join (" ", parts);
|
||||
// 时间部分
|
||||
var timeParts = new List<string> ();
|
||||
if (hour != HourFormat.None)
|
||||
{
|
||||
if (clock == "24HourClock")
|
||||
timeParts.Add ("HH");
|
||||
else
|
||||
timeParts.Add ("hh");
|
||||
}
|
||||
if (minute != MinuteFormat.None)
|
||||
{
|
||||
timeParts.Add ("mm");
|
||||
}
|
||||
if (second != SecondFormat.None)
|
||||
{
|
||||
timeParts.Add ("ss");
|
||||
}
|
||||
string timePart = timeParts.Count > 0 ? string.Join (":", timeParts) : "";
|
||||
if (!string.IsNullOrEmpty (datePart) && !string.IsNullOrEmpty (timePart))
|
||||
return datePart + " " + timePart;
|
||||
if (!string.IsNullOrEmpty (datePart))
|
||||
return datePart;
|
||||
return timePart;
|
||||
}
|
||||
|
||||
// 将 JS Date 对象转换为 DateTime
|
||||
private DateTime ConvertJsDateToDateTime (object jsDate)
|
||||
{
|
||||
if (jsDate == null)
|
||||
throw new ArgumentNullException (nameof (jsDate));
|
||||
|
||||
Type type = jsDate.GetType ();
|
||||
// 调用 getTime() 获取毫秒数 (double)
|
||||
double milliseconds = (double)type.InvokeMember (
|
||||
"getTime",
|
||||
BindingFlags.InvokeMethod,
|
||||
null,
|
||||
jsDate,
|
||||
null);
|
||||
|
||||
// 手动计算 Unix 纪元转换(兼容低版本 .NET)
|
||||
DateTime epoch = new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
DateTime utcDateTime = epoch.AddMilliseconds (milliseconds);
|
||||
// 返回本地时间(可根据需求调整)
|
||||
return utcDateTime.ToLocalTime ();
|
||||
}
|
||||
|
||||
// 初始化文化信息
|
||||
private void InitializeCulture ()
|
||||
{
|
||||
string lang = (_languages != null && _languages.Count > 0) ? _languages [0] : CultureInfo.CurrentCulture.Name;
|
||||
try
|
||||
{
|
||||
_culture = new CultureInfo (lang);
|
||||
_resolvedLanguage = _culture.Name;
|
||||
}
|
||||
catch
|
||||
{
|
||||
_culture = CultureInfo.CurrentCulture;
|
||||
_resolvedLanguage = _culture.Name;
|
||||
}
|
||||
_resolvedGeographicRegion = _geographicRegion ?? _culture.Name;
|
||||
// 根据区域和语言更新格式模式(如果使用模板)
|
||||
if (!string.IsNullOrEmpty (_formatTemplate))
|
||||
{
|
||||
_formatPattern = MapTemplateToPattern (_formatTemplate, _culture, _clock);
|
||||
}
|
||||
else if (_yearFormat != YearFormat.None || _monthFormat != MonthFormat.None ||
|
||||
_dayFormat != DayFormat.None || _dayOfWeekFormat != DayOfWeekFormat.None ||
|
||||
_hourFormat != HourFormat.None || _minuteFormat != MinuteFormat.None ||
|
||||
_secondFormat != SecondFormat.None)
|
||||
{
|
||||
_formatPattern = BuildPatternFromEnums (_yearFormat, _monthFormat, _dayFormat, _dayOfWeekFormat,
|
||||
_hourFormat, _minuteFormat, _secondFormat, _clock, _culture);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- 构造函数 ----------
|
||||
public _I_DateTimeFormatter (string formatTemplate)
|
||||
: this (formatTemplate, null, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (string formatTemplate, IEnumerable<string> languages)
|
||||
: this (formatTemplate, languages, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (string formatTemplate, IEnumerable<string> languages, string geographicRegion, string calendar, string clock)
|
||||
{
|
||||
_formatTemplate = formatTemplate;
|
||||
_languages = languages == null ? new List<string> () : new List<string> (languages);
|
||||
_geographicRegion = geographicRegion;
|
||||
if (!string.IsNullOrEmpty (calendar))
|
||||
_calendar = calendar;
|
||||
if (!string.IsNullOrEmpty (clock))
|
||||
_clock = clock;
|
||||
InitializeCulture ();
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek)
|
||||
: this (year, month, day, dayOfWeek, HourFormat.None, MinuteFormat.None, SecondFormat.None, null, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (HourFormat hour, MinuteFormat minute, SecondFormat second)
|
||||
: this (YearFormat.None, MonthFormat.None, DayFormat.None, DayOfWeekFormat.None, hour, minute, second, null, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
|
||||
HourFormat hour, MinuteFormat minute, SecondFormat second,
|
||||
IEnumerable<string> languages)
|
||||
: this (year, month, day, dayOfWeek, hour, minute, second, languages, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public _I_DateTimeFormatter (YearFormat year, MonthFormat month, DayFormat day, DayOfWeekFormat dayOfWeek,
|
||||
HourFormat hour, MinuteFormat minute, SecondFormat second,
|
||||
IEnumerable<string> languages, string geographicRegion, string calendar, string clock)
|
||||
{
|
||||
_yearFormat = year;
|
||||
_monthFormat = month;
|
||||
_dayFormat = day;
|
||||
_dayOfWeekFormat = dayOfWeek;
|
||||
_hourFormat = hour;
|
||||
_minuteFormat = minute;
|
||||
_secondFormat = second;
|
||||
_languages = languages == null ? new List<string> () : new List<string> (languages);
|
||||
_geographicRegion = geographicRegion;
|
||||
if (!string.IsNullOrEmpty (calendar))
|
||||
_calendar = calendar;
|
||||
if (!string.IsNullOrEmpty (clock))
|
||||
_clock = clock;
|
||||
InitializeCulture ();
|
||||
}
|
||||
|
||||
// ---------- 属性 ----------
|
||||
public string Calendar
|
||||
{
|
||||
get { return _calendar; }
|
||||
set
|
||||
{
|
||||
_calendar = value;
|
||||
// 日历更改可能需要重新初始化模式,这里简化处理
|
||||
}
|
||||
}
|
||||
|
||||
public string Clock
|
||||
{
|
||||
get { return _clock; }
|
||||
set
|
||||
{
|
||||
_clock = value;
|
||||
InitializeCulture (); // 重新生成模式(因为小时格式可能变化)
|
||||
}
|
||||
}
|
||||
|
||||
public string GeographicRegion
|
||||
{
|
||||
get { return _geographicRegion; }
|
||||
set
|
||||
{
|
||||
_geographicRegion = value;
|
||||
InitializeCulture ();
|
||||
}
|
||||
}
|
||||
|
||||
public int IncludeDay
|
||||
{
|
||||
get { return (int)_dayFormat; }
|
||||
}
|
||||
|
||||
public int IncludeDayOfWeek
|
||||
{
|
||||
get { return (int)_dayOfWeekFormat; }
|
||||
}
|
||||
|
||||
public int IncludeHour
|
||||
{
|
||||
get { return (int)_hourFormat; }
|
||||
}
|
||||
|
||||
public int IncludeMinute
|
||||
{
|
||||
get { return (int)_minuteFormat; }
|
||||
}
|
||||
|
||||
public int IncludeMonth
|
||||
{
|
||||
get { return (int)_monthFormat; }
|
||||
}
|
||||
|
||||
public int IncludeSecond
|
||||
{
|
||||
get { return (int)_secondFormat; }
|
||||
}
|
||||
|
||||
public int IncludeYear
|
||||
{
|
||||
get { return (int)_yearFormat; }
|
||||
}
|
||||
|
||||
public _I_List Languages
|
||||
{
|
||||
get { return new _I_List (_languages.AsReadOnly ().Select (e => (object)e), true); }
|
||||
}
|
||||
|
||||
public static _I_DateTimeFormatter LongDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return new _I_DateTimeFormatter ("longdate");
|
||||
}
|
||||
}
|
||||
|
||||
public static _I_DateTimeFormatter LongTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return new _I_DateTimeFormatter ("longtime");
|
||||
}
|
||||
}
|
||||
|
||||
public string NumeralSystem
|
||||
{
|
||||
get { return _numeralSystem; }
|
||||
set { _numeralSystem = value; }
|
||||
}
|
||||
|
||||
public _I_List Patterns
|
||||
{
|
||||
get
|
||||
{
|
||||
return new _I_List (new List<string> { _formatPattern }.AsReadOnly ().Select (e => (object)e), true);
|
||||
}
|
||||
}
|
||||
|
||||
public string ResolvedGeographicRegion
|
||||
{
|
||||
get { return _resolvedGeographicRegion; }
|
||||
}
|
||||
|
||||
public string ResolvedLanguage
|
||||
{
|
||||
get { return _resolvedLanguage; }
|
||||
}
|
||||
|
||||
public static _I_DateTimeFormatter ShortDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return new _I_DateTimeFormatter ("shortdate");
|
||||
}
|
||||
}
|
||||
|
||||
public static _I_DateTimeFormatter ShortTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return new _I_DateTimeFormatter ("shorttime");
|
||||
}
|
||||
}
|
||||
|
||||
public string Template
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty (_formatTemplate))
|
||||
return _formatTemplate;
|
||||
// 从枚举组合生成模板描述(简化)
|
||||
return _formatPattern;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- 方法 ----------
|
||||
public string FormatC (DateTime dateTime)
|
||||
{
|
||||
return dateTime.ToString (_formatPattern, _culture);
|
||||
}
|
||||
|
||||
public string FormatC (DateTime dateTime, string timeZoneId)
|
||||
{
|
||||
if (!string.IsNullOrEmpty (timeZoneId))
|
||||
{
|
||||
try
|
||||
{
|
||||
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (timeZoneId);
|
||||
DateTime targetTime = TimeZoneInfo.ConvertTime (dateTime, tzi);
|
||||
return targetTime.ToString (_formatPattern, _culture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 时区无效,回退到原始时间
|
||||
return dateTime.ToString (_formatPattern, _culture);
|
||||
}
|
||||
}
|
||||
return dateTime.ToString (_formatPattern, _culture);
|
||||
}
|
||||
|
||||
// 为方便 JS 调用,提供接受 object 的重载(自动识别 JS Date)
|
||||
public string Format (object jsDate)
|
||||
{
|
||||
DateTime dt = ConvertJsDateToDateTime (jsDate);
|
||||
return FormatC (dt);
|
||||
}
|
||||
|
||||
public string FormatWithTimeZone (object jsDate, string timeZoneId)
|
||||
{
|
||||
DateTime dt = ConvertJsDateToDateTime (jsDate);
|
||||
return FormatC (dt, timeZoneId);
|
||||
}
|
||||
}
|
||||
}
|
||||
173
DataUtils/Enumerable.cs
Normal file
@@ -0,0 +1,173 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace DataUtils
|
||||
{
|
||||
[ComVisible (true)]
|
||||
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
|
||||
public interface _I_Enumerable: IDisposable
|
||||
{
|
||||
int Length { get; set; }
|
||||
object this [int index] { get; set; }
|
||||
void Add (object value); // push
|
||||
void Push (object value);
|
||||
object Pop (); // 删除并返回末尾元素
|
||||
object Shift (); // 删除并返回开头元素
|
||||
void Unshift (object value); // 在开头插入
|
||||
void RemoveAt (int index); // 删除任意索引
|
||||
void Clear (); // 清空数组
|
||||
_I_Enumerable Slice (int start, int end); // 返回子数组
|
||||
void Splice (int start, int deleteCount, object [] items); // 删除并插入
|
||||
int IndexOf (object value); // 查找索引
|
||||
bool Includes (object value); // 是否包含
|
||||
void ForEach (object callback, bool suppressExceptions = false); // 遍历,callback(item, index)
|
||||
_I_Enumerable Concat (_I_Enumerable other); // 拼接
|
||||
string Join (string separator); // 转字符串
|
||||
object GetItem (int index); // 返回 { key, data } 或直接 data
|
||||
void SetAt (int index, object value); // 替换元素
|
||||
int IndexOfKey (int key); // 按内部 key 查找
|
||||
void Move (int index, int newIndex); // 移动元素
|
||||
void PushAll (object [] items); // 一次性 push 多个
|
||||
object Get (int index);
|
||||
object Set (int index, object value);
|
||||
object At (int index);
|
||||
}
|
||||
public class _I_List: _I_Enumerable, IList
|
||||
{
|
||||
public _I_List (IEnumerable<object> initArr, bool readOnly = false, bool fixedSize = false, bool sync = true)
|
||||
{
|
||||
_list = initArr?.ToList () ?? new List<object> ();
|
||||
IsFixedSize = fixedSize;
|
||||
IsReadOnly = readOnly;
|
||||
IsSynchronized = sync;
|
||||
}
|
||||
public _I_List (bool readOnly = false, bool fixedSize = false, bool sync = true) :
|
||||
this (null, readOnly, fixedSize, sync)
|
||||
{ }
|
||||
protected List<object> _list;
|
||||
protected object _lock = new object ();
|
||||
public object this [int index] { get { return _list [index]; } set { _list [index] = value; } }
|
||||
public int Count => _list.Count;
|
||||
public bool IsFixedSize { get; }
|
||||
public bool IsReadOnly { get; }
|
||||
public bool IsSynchronized { get; }
|
||||
public int Length
|
||||
{
|
||||
get { return _list.Count; }
|
||||
set
|
||||
{
|
||||
if (!IsFixedSize && !IsReadOnly)
|
||||
{
|
||||
_list.Capacity = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
public object SyncRoot => _lock;
|
||||
public void Add (object value) => _list.Add (value);
|
||||
public void Push (object value) => _list.Add (value);
|
||||
public void RemoveAt (int index) => _list.RemoveAt (index);
|
||||
public void Clear () => _list.Clear ();
|
||||
public int IndexOf (object value) => _list.IndexOf (value);
|
||||
int IList.Add (object value)
|
||||
{
|
||||
_list.Add (value);
|
||||
return _list.Count - 1;
|
||||
}
|
||||
public bool Contains (object value) => _list.Contains (value);
|
||||
public void Insert (int index, object value) => _list.Insert (index, value);
|
||||
public void Remove (object value) => _list.Remove (value);
|
||||
public void ForEach (object callback, bool suppressExceptions = false)
|
||||
{
|
||||
for (int i = 0; i < _list.Count; i++)
|
||||
{
|
||||
var item = _list [i];
|
||||
if (suppressExceptions)
|
||||
{
|
||||
try { JsUtils.Call (callback, item, i); } catch { }
|
||||
}
|
||||
else JsUtils.Call (callback, item, i);
|
||||
}
|
||||
}
|
||||
public IEnumerator GetEnumerator () => _list.GetEnumerator ();
|
||||
public _I_Enumerable Slice (int start, int end)
|
||||
{
|
||||
if (end < 0) end = _list.Count + end;
|
||||
start = Math.Max (0, start);
|
||||
end = Math.Min (_list.Count, end);
|
||||
var arr = _list.GetRange (start, Math.Max (0, end - start));
|
||||
return new _I_List (arr);
|
||||
}
|
||||
public void Splice (int start, int deleteCount, object [] items)
|
||||
{
|
||||
if (start < 0) start = Math.Max (0, _list.Count + start);
|
||||
int count = Math.Min (deleteCount, _list.Count - start);
|
||||
_list.RemoveRange (start, count);
|
||||
if (items != null && items.Length > 0)
|
||||
_list.InsertRange (start, items);
|
||||
}
|
||||
public bool Includes (object value) => _list.Contains (value);
|
||||
public _I_Enumerable Concat (_I_Enumerable other)
|
||||
{
|
||||
var newList = new List<object> (_list);
|
||||
if (other is _I_List)
|
||||
newList.AddRange ((other as _I_List)._list);
|
||||
return new _I_List (newList);
|
||||
}
|
||||
public string Join (string separator)
|
||||
{
|
||||
return string.Join (separator ?? ",", _list.Select (x => x?.ToString () ?? ""));
|
||||
}
|
||||
public object GetItem (int index) => _list [index];
|
||||
public void SetAt (int index, object value) => _list [index] = value;
|
||||
public int IndexOfKey (int key)
|
||||
{
|
||||
return key >= 0 && key < _list.Count ? key : -1;
|
||||
}
|
||||
public void Move (int index, int newIndex)
|
||||
{
|
||||
if (index < 0 || index >= _list.Count || newIndex < 0 || newIndex >= _list.Count) return;
|
||||
var item = _list [index];
|
||||
_list.RemoveAt (index);
|
||||
_list.Insert (newIndex, item);
|
||||
}
|
||||
public void PushAll (object [] items)
|
||||
{
|
||||
if (items == null || items.Length == 0) return;
|
||||
_list.AddRange (items);
|
||||
}
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
if (array == null) throw new ArgumentNullException (nameof (array));
|
||||
for (int i = 0; i < _list.Count && index + i < array.Length; i++)
|
||||
array.SetValue (_list [i], index + i);
|
||||
}
|
||||
public object Pop ()
|
||||
{
|
||||
if (_list.Count == 0) return null;
|
||||
var last = _list [_list.Count - 1];
|
||||
_list.RemoveAt (_list.Count - 1);
|
||||
return last;
|
||||
}
|
||||
public object Shift ()
|
||||
{
|
||||
if (_list.Count == 0) return null;
|
||||
var first = _list [0];
|
||||
_list.RemoveAt (0);
|
||||
return first;
|
||||
}
|
||||
public void Unshift (object value) => _list.Insert (0, value);
|
||||
public void Dispose ()
|
||||
{
|
||||
_list?.Clear ();
|
||||
_list = null;
|
||||
}
|
||||
public object Get (int index) => this [index];
|
||||
public object Set (int index, object value) => this [index] = value;
|
||||
public object At (int index) => this [index];
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace DataUtils
|
||||
{
|
||||
internal static class NativeMethods
|
||||
{
|
||||
public const int LOCALE_SSHORTESTSCRIPT = 0x0000004F; // 获取四字母脚本代码
|
||||
public const uint KLF_ACTIVATE = 0x00000001; // 激活键盘布局
|
||||
// GetLocaleInfoW for LCID-based queries
|
||||
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
public static extern int GetLocaleInfoW (int Locale, int LCType, [Out] StringBuilder lpLCData, int cchData);
|
||||
|
||||
// GetLocaleInfoEx for locale name based queries
|
||||
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
public static extern int GetLocaleInfoEx (string lpLocaleName, int LCType, [Out] StringBuilder lpLCData, int cchData);
|
||||
|
||||
// LocaleNameToLCID - available on Vista+; fallback is to use CultureInfo
|
||||
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
public static extern int LocaleNameToLCID (string lpName, uint dwFlags);
|
||||
|
||||
// LCIDToLocaleName (Vista+)
|
||||
[DllImport ("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
public static extern int LCIDToLocaleName (int Locale, [Out] StringBuilder lpName, int cchName, uint dwFlags);
|
||||
[DllImport ("user32.dll")]
|
||||
public static extern IntPtr GetKeyboardLayout (uint dwLayout);
|
||||
[DllImport ("user32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr LoadKeyboardLayout (string pwszKLID, uint Flags);
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Language: System.Globalization.CultureInfo
|
||||
{
|
||||
public _I_Language (string localeName) : base (localeName) { }
|
||||
public string AbbreviatedName => this.ThreeLetterISOLanguageName;
|
||||
public string LanguageTag => this.IetfLanguageTag ?? this.Name;
|
||||
public int LayoutDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base.TextInfo.IsRightToLeft) return 1;
|
||||
string tag = this.LanguageTag;
|
||||
bool isVerticalCandidate = false;
|
||||
if (tag != null)
|
||||
{
|
||||
var scriptMatch = Regex.Match (tag, @"-([A-Za-z]{4})(?:-|$)");
|
||||
if (scriptMatch.Success)
|
||||
{
|
||||
string script = scriptMatch.Groups [1].Value;
|
||||
if (script == "Hani" || script == "Hira" || script == "Kana" || script == "Jpan" || script == "Kore" || script == "Hans" || script == "Hant")
|
||||
isVerticalCandidate = true;
|
||||
}
|
||||
if (!isVerticalCandidate)
|
||||
{
|
||||
var regionMatch = Regex.Match (tag, @"-([A-Za-z]{2})$");
|
||||
if (regionMatch.Success)
|
||||
{
|
||||
string region = regionMatch.Groups [1].Value.ToUpperInvariant ();
|
||||
if (region == "JP" || region == "CN" || region == "TW" || region == "HK" || region == "MO" || region == "KR")
|
||||
isVerticalCandidate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isVerticalCandidate)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public string Script
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder (10);
|
||||
if (NativeMethods.GetLocaleInfoEx (this.Name, NativeMethods.LOCALE_SSHORTESTSCRIPT, sb, sb.Capacity) > 0)
|
||||
return sb.ToString ();
|
||||
|
||||
// 如果失败,尝试从语言标记中解析脚本子标记(如 "zh-Hans-CN" 中的 "Hans")
|
||||
var match = Regex.Match (this.Name, @"-([A-Za-z]{4})(?:-|$)");
|
||||
if (match.Success)
|
||||
return match.Groups [1].Value;
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
public _I_List GetExtensionSubtags (string singleton)
|
||||
{
|
||||
if (string.IsNullOrEmpty (singleton) || singleton.Length != 1)
|
||||
throw new ArgumentException ("Singleton must be a single character", nameof (singleton));
|
||||
var subtags = new List<string> ();
|
||||
string tag = this.LanguageTag;
|
||||
string pattern = $@"-{Regex.Escape (singleton)}-([a-zA-Z0-9](?:-[a-zA-Z0-9]+)*)";
|
||||
var match = Regex.Match (tag, pattern);
|
||||
if (match.Success)
|
||||
{
|
||||
string extPart = match.Groups [1].Value;
|
||||
subtags.AddRange (extPart.Split ('-'));
|
||||
}
|
||||
return new _I_List (subtags.Select (i => (object)i));
|
||||
}
|
||||
public bool TrySetInputMethodLanguageTag (string languageTag)
|
||||
{
|
||||
int lcid = NativeMethods.LocaleNameToLCID (languageTag, 0);
|
||||
if (lcid == 0)
|
||||
return false;
|
||||
string klid = $"{lcid:X8}";
|
||||
IntPtr hkl = NativeMethods.LoadKeyboardLayout (klid, NativeMethods.KLF_ACTIVATE);
|
||||
return hkl != IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Locale
|
||||
@@ -47,7 +134,6 @@ namespace DataUtils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Current LCID (int)
|
||||
public int CurrentLCID
|
||||
{
|
||||
@@ -63,7 +149,6 @@ namespace DataUtils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convert LCID -> locale name (e.g. 1033 -> "en-US")
|
||||
public string ToLocaleName (int lcid)
|
||||
{
|
||||
@@ -87,7 +172,6 @@ namespace DataUtils
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// Convert locale name -> LCID
|
||||
public int ToLCID (string localeName)
|
||||
{
|
||||
@@ -111,7 +195,6 @@ namespace DataUtils
|
||||
// fallback: invariant culture
|
||||
return CultureInfo.InvariantCulture.LCID;
|
||||
}
|
||||
|
||||
// Return a locale info string for given LCID and LCTYPE. LCTYPE is the Win32 LOCALE_* constant.
|
||||
// Returns a string (or empty string on failure).
|
||||
public object LocaleInfo (int lcid, int lctype)
|
||||
@@ -177,7 +260,6 @@ namespace DataUtils
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
// LocaleInfoEx: query by locale name string and LCTYPE
|
||||
// Returns string if available; otherwise returns the integer result code (as int) if string empty (mimic C++ behavior).
|
||||
public object LocaleInfoEx (string localeName, int lctype)
|
||||
@@ -239,7 +321,6 @@ namespace DataUtils
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Helpers similar to the C++: restricted (language) and elaborated (region) codes
|
||||
public string GetLocaleRestrictedCode (string localeName)
|
||||
{
|
||||
@@ -257,7 +338,6 @@ namespace DataUtils
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetLocaleElaboratedCode (string localeName)
|
||||
{
|
||||
if (string.IsNullOrEmpty (localeName)) localeName = CurrentLocale;
|
||||
@@ -284,7 +364,6 @@ namespace DataUtils
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// LCID -> combined code like "en-US" (with configurable separator)
|
||||
public string LcidToLocaleCode (int lcid)
|
||||
{
|
||||
@@ -304,7 +383,6 @@ namespace DataUtils
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
// Get the user default locale name
|
||||
public string GetUserDefaultLocaleName ()
|
||||
{
|
||||
@@ -317,7 +395,6 @@ namespace DataUtils
|
||||
catch { }
|
||||
return LcidToLocaleCode (CultureInfo.CurrentCulture.LCID);
|
||||
}
|
||||
|
||||
// Get system default locale name (machine)
|
||||
public string GetSystemDefaultLocaleName ()
|
||||
{
|
||||
@@ -330,7 +407,6 @@ namespace DataUtils
|
||||
catch { }
|
||||
return LcidToLocaleCode (CultureInfo.InstalledUICulture.LCID);
|
||||
}
|
||||
|
||||
// Get computer locale code similar to C++ approach
|
||||
public string GetComputerLocaleCode ()
|
||||
{
|
||||
@@ -350,7 +426,38 @@ namespace DataUtils
|
||||
// fallback to invariant
|
||||
return CultureInfo.InvariantCulture.Name ?? string.Empty;
|
||||
}
|
||||
|
||||
public _I_List RecommendLocaleNames
|
||||
{
|
||||
get
|
||||
{
|
||||
var arr = new string [] {
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture.Name,
|
||||
GetUserDefaultLocaleName (),
|
||||
GetSystemDefaultLocaleName (),
|
||||
LcidToLocaleCode (CurrentLCID),
|
||||
GetLocaleRestrictedCode (System.Threading.Thread.CurrentThread.CurrentCulture.Name),
|
||||
GetLocaleRestrictedCode (GetUserDefaultLocaleName ()),
|
||||
GetLocaleRestrictedCode (GetSystemDefaultLocaleName ()),
|
||||
"en-US",
|
||||
"en"
|
||||
};
|
||||
var list = new _I_List ();
|
||||
foreach (var loc in arr)
|
||||
{
|
||||
var lloc = loc.Trim ().ToLowerInvariant ();
|
||||
var isfind = false;
|
||||
foreach (var item in list)
|
||||
{
|
||||
var str = item as string;
|
||||
if (string.IsNullOrWhiteSpace (str)) isfind = true;
|
||||
isfind = str.Trim ().ToLowerInvariant () == lloc;
|
||||
if (isfind) break;
|
||||
}
|
||||
if (!isfind) list.Add (loc);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
// Compare two locale names; returns true if equal by name or LCID
|
||||
public bool LocaleNameCompare (string left, string right)
|
||||
{
|
||||
@@ -366,8 +473,62 @@ namespace DataUtils
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Constants
|
||||
private const int LOCALE_NAME_MAX_LENGTH = 85; // defined by Windows
|
||||
public _I_Language CreateLanguage (string localeName) => new _I_Language (localeName);
|
||||
public static string CurrentInputMethodLanguageTag
|
||||
{
|
||||
get
|
||||
{
|
||||
IntPtr hkl = NativeMethods.GetKeyboardLayout (0);
|
||||
int lcid = hkl.ToInt32 () & 0xFFFF;
|
||||
|
||||
StringBuilder sb = new StringBuilder (85);
|
||||
int result = NativeMethods.LCIDToLocaleName (lcid, sb, sb.Capacity, 0);
|
||||
if (result > 0)
|
||||
return sb.ToString ();
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static bool IsWellFormed (string languageTag)
|
||||
{
|
||||
if (string.IsNullOrEmpty (languageTag))
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
var _ = new CultureInfo (languageTag);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static _I_List GetMuiCompatibleLanguageListFromLanguageTags (IEnumerable<string> languageTags)
|
||||
{
|
||||
var result = new List<string> ();
|
||||
foreach (string tag in languageTags)
|
||||
{
|
||||
if (string.IsNullOrEmpty (tag))
|
||||
continue;
|
||||
result.Add (tag);
|
||||
try
|
||||
{
|
||||
var ci = new CultureInfo (tag);
|
||||
string parent = ci.Parent.Name;
|
||||
if (!string.IsNullOrEmpty (parent) && parent != tag && !result.Contains (parent))
|
||||
result.Add (parent);
|
||||
}
|
||||
catch { }
|
||||
string neutral = Regex.Replace (tag, @"-.*$", "");
|
||||
if (neutral != tag && !result.Contains (neutral))
|
||||
result.Add (neutral);
|
||||
}
|
||||
if (!result.Contains ("neutral"))
|
||||
result.Add ("neutral");
|
||||
return new _I_List (result.Select (t => (object)t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,8 @@ namespace DataUtils
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Process
|
||||
{
|
||||
public Process Start (string filename, string args) => Process.Start (filename, args);
|
||||
public Process Open (string url) => Process.Start (url);
|
||||
public int Run (
|
||||
string cmdline,
|
||||
string filepath,
|
||||
|
||||
@@ -539,8 +539,7 @@ namespace DataUtils
|
||||
public void File (string filter, string initDir, object jsCallback)
|
||||
{
|
||||
IWin32Window owner = GetActiveWindowOwner ();
|
||||
Thread t = new Thread (() =>
|
||||
{
|
||||
Thread t = new Thread (() => {
|
||||
string result = string.Empty;
|
||||
try
|
||||
{
|
||||
@@ -565,8 +564,7 @@ namespace DataUtils
|
||||
public void Files (string filter, string initDir, object jsCallback)
|
||||
{
|
||||
IWin32Window owner = GetActiveWindowOwner ();
|
||||
Thread t = new Thread (() =>
|
||||
{
|
||||
Thread t = new Thread (() => {
|
||||
string result = "[]";
|
||||
try
|
||||
{
|
||||
@@ -591,8 +589,7 @@ namespace DataUtils
|
||||
public void Dir (string initDir, object jsCallback)
|
||||
{
|
||||
IWin32Window owner = GetActiveWindowOwner ();
|
||||
Thread t = new Thread (() =>
|
||||
{
|
||||
Thread t = new Thread (() => {
|
||||
string result = string.Empty;
|
||||
try
|
||||
{
|
||||
@@ -616,8 +613,7 @@ namespace DataUtils
|
||||
public void Dirs (string initDir, object jsCallback)
|
||||
{
|
||||
IWin32Window owner = GetActiveWindowOwner ();
|
||||
Thread t = new Thread (() =>
|
||||
{
|
||||
Thread t = new Thread (() => {
|
||||
string result = "[]";
|
||||
try
|
||||
{
|
||||
@@ -649,8 +645,71 @@ namespace DataUtils
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Folder
|
||||
{
|
||||
[DllImport ("shell32.dll")]
|
||||
private static extern int SHGetKnownFolderPath (
|
||||
[MarshalAs (UnmanagedType.LPStruct)] Guid rfid,
|
||||
uint dwFlags,
|
||||
IntPtr hToken,
|
||||
out IntPtr ppszPath);
|
||||
private static string KF (Guid g)
|
||||
{
|
||||
IntPtr p;
|
||||
SHGetKnownFolderPath (g, 0, IntPtr.Zero, out p);
|
||||
string s = Marshal.PtrToStringUni (p);
|
||||
Marshal.FreeCoTaskMem (p);
|
||||
return s;
|
||||
}
|
||||
private static readonly Guid FOLDERID_Downloads = new Guid ("374DE290-123F-4565-9164-39C4925E467B");
|
||||
private static readonly Guid FOLDERID_SavedPictures = new Guid ("3B193882-D3AD-4EAB-965A-69829D1FB59F");
|
||||
private static readonly Guid FOLDERID_SavedGames = new Guid ("4C5C32FF-BB9D-43B0-BF90-45A0FEEB6D0E");
|
||||
private static readonly Guid FOLDERID_Links = new Guid ("BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968");
|
||||
private static readonly Guid FOLDERID_Contacts = new Guid ("56784854-C6CB-462B-8169-88E350ACB882");
|
||||
private static readonly Guid FOLDERID_Searches = new Guid ("7D1D3A04-DEBB-4115-95CF-2F29DA2920DA");
|
||||
public string ProgramFiles => Environment.GetFolderPath (Environment.SpecialFolder.ProgramFiles);
|
||||
public string ProgramFilesX86 => Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
|
||||
public string Windows => Environment.GetFolderPath (Environment.SpecialFolder.Windows);
|
||||
public string System32 => Environment.SystemDirectory;
|
||||
public string UserProfile => Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
||||
public string Desktop => Environment.GetFolderPath (Environment.SpecialFolder.Desktop);
|
||||
public string Documents => Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments);
|
||||
public string Pictures => Environment.GetFolderPath (Environment.SpecialFolder.MyPictures);
|
||||
public string Music => Environment.GetFolderPath (Environment.SpecialFolder.MyMusic);
|
||||
public string Videos => Environment.GetFolderPath (Environment.SpecialFolder.MyVideos);
|
||||
public string AppDataRoaming => Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
|
||||
public string AppDataLocal => Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
|
||||
public string AppDataLocalLow => Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData) + "\\Low";
|
||||
public string Temp => System.IO.Path.GetTempPath ();
|
||||
public string PublicDesktop => Environment.GetFolderPath (Environment.SpecialFolder.CommonDesktopDirectory);
|
||||
public string PublicDocuments => Environment.GetFolderPath (Environment.SpecialFolder.CommonDocuments);
|
||||
public string PublicPictures => Environment.GetFolderPath (Environment.SpecialFolder.CommonPictures);
|
||||
public string PublicMusic => Environment.GetFolderPath (Environment.SpecialFolder.CommonMusic);
|
||||
public string PublicVideos => Environment.GetFolderPath (Environment.SpecialFolder.CommonVideos);
|
||||
public string Downloads => KF (FOLDERID_Downloads);
|
||||
public string SavedPictures => KF (FOLDERID_SavedPictures);
|
||||
public string SavedGames => KF (FOLDERID_SavedGames);
|
||||
public string Links => KF (FOLDERID_Links);
|
||||
public string Contacts => KF (FOLDERID_Contacts);
|
||||
public string Searches => KF (FOLDERID_Searches);
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Storage
|
||||
{
|
||||
[DllImport ("user32.dll")]
|
||||
private static extern IntPtr GetForegroundWindow ();
|
||||
class WindowWrapper: IWin32Window
|
||||
{
|
||||
private IntPtr _hwnd;
|
||||
public WindowWrapper (IntPtr handle) { _hwnd = handle; }
|
||||
public IntPtr Handle { get { return _hwnd; } }
|
||||
}
|
||||
private static IWin32Window GetActiveWindowOwner ()
|
||||
{
|
||||
IntPtr hWnd = GetForegroundWindow ();
|
||||
return hWnd != IntPtr.Zero ? new WindowWrapper (hWnd) : null;
|
||||
}
|
||||
private static void CallJS (object jsFunc, params object [] args)
|
||||
{
|
||||
if (jsFunc == null) return;
|
||||
@@ -680,6 +739,35 @@ namespace DataUtils
|
||||
public _I_Directory GetDirectory (string path) { return new _I_Directory (path); }
|
||||
public _I_Directory GetDir (string path) { return GetDirectory (path); }
|
||||
public _I_Explorer Explorer => new _I_Explorer ();
|
||||
public void Save (string filter, string initDir, string defaultName, object jsCallback)
|
||||
{
|
||||
IWin32Window owner = GetActiveWindowOwner ();
|
||||
Thread t = new Thread (() => {
|
||||
string result = string.Empty;
|
||||
try
|
||||
{
|
||||
using (SaveFileDialog dlg = new SaveFileDialog ())
|
||||
{
|
||||
dlg.Filter = filter;
|
||||
dlg.InitialDirectory = string.IsNullOrEmpty (initDir)
|
||||
? Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments)
|
||||
: initDir;
|
||||
if (!string.IsNullOrEmpty (defaultName))
|
||||
dlg.FileName = defaultName;
|
||||
dlg.OverwritePrompt = true;
|
||||
dlg.AddExtension = true;
|
||||
if (dlg.ShowDialog (owner) == DialogResult.OK)
|
||||
result = dlg.FileName;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
CallJS (jsCallback, result);
|
||||
});
|
||||
t.IsBackground = true;
|
||||
t.SetApartmentState (ApartmentState.STA);
|
||||
t.Start ();
|
||||
}
|
||||
public _I_Folder Folders => new _I_Folder ();
|
||||
}
|
||||
// Small shell helpers that P/Invoke for folder retrieval using CSIDL or Known Folder GUIDs
|
||||
internal static class ShellHelpers
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -186,4 +192,428 @@ namespace DataUtils
|
||||
object BuildJSON ();
|
||||
}
|
||||
}
|
||||
public static class JsUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// 调用 JS 函数。第一个参数作为 this,其余作为 JS 函数参数。
|
||||
/// </summary>
|
||||
/// <param name="callback">JS 函数对象</param>
|
||||
/// <param name="args">JS 函数参数,可选</param>
|
||||
/// <returns>JS 函数返回值</returns>
|
||||
public static void Call (object jsFunc, params object [] args)
|
||||
{
|
||||
if (jsFunc == null) return;
|
||||
object [] invokeArgs = new object [(args?.Length ?? 0) + 1];
|
||||
invokeArgs [0] = jsFunc; // this
|
||||
if (args != null)
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
invokeArgs [i + 1] = args [i];
|
||||
jsFunc.GetType ().InvokeMember (
|
||||
"call",
|
||||
BindingFlags.InvokeMethod,
|
||||
null,
|
||||
jsFunc,
|
||||
invokeArgs);
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
|
||||
public interface _I_IAsyncAction
|
||||
{
|
||||
_I_IAsyncAction Then (object resolve, object reject = null, object progress = null);
|
||||
void Done (object resolve, object reject = null);
|
||||
void Catch (object reject);
|
||||
bool IsCompleted { get; }
|
||||
bool IsCancelled { get; }
|
||||
bool IsError { get; }
|
||||
void Cancel ();
|
||||
void ReportProgress (object progress);
|
||||
object Error { get; }
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Task: _I_IAsyncAction
|
||||
{
|
||||
private object _result;
|
||||
private Exception _error;
|
||||
private bool _completed;
|
||||
private bool _cancelled;
|
||||
private List<object> _resolveCallbacks = new List<object> ();
|
||||
private List<object> _rejectCallbacks = new List<object> ();
|
||||
private List<object> _progressCallbacks = new List<object> ();
|
||||
private CancellationTokenSource _cts = new CancellationTokenSource ();
|
||||
public _I_Task (Func<object> func)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem (_ => {
|
||||
try
|
||||
{
|
||||
if (_cts.Token.IsCancellationRequested)
|
||||
{
|
||||
_cancelled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
_result = func ();
|
||||
_completed = true;
|
||||
|
||||
foreach (var cb in _resolveCallbacks)
|
||||
JsUtils.Call (cb, _result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_error = ex;
|
||||
foreach (var cb in _rejectCallbacks)
|
||||
JsUtils.Call (cb, ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
public _I_IAsyncAction Then (object resolve, object reject = null, object progress = null)
|
||||
{
|
||||
if (resolve != null) _resolveCallbacks.Add (resolve);
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
if (progress != null) _progressCallbacks.Add (progress);
|
||||
return this;
|
||||
}
|
||||
public void Done (object resolve, object reject = null)
|
||||
{
|
||||
if (resolve != null) _resolveCallbacks.Add (resolve);
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
}
|
||||
|
||||
public void Catch (object reject)
|
||||
{
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
}
|
||||
|
||||
public bool IsCompleted => _completed;
|
||||
public bool IsCancelled => _cancelled;
|
||||
public bool IsError => _error != null;
|
||||
|
||||
public object Error => _error;
|
||||
|
||||
public void Cancel ()
|
||||
{
|
||||
_cts.Cancel ();
|
||||
_cancelled = true;
|
||||
}
|
||||
|
||||
public void ReportProgress (object progress)
|
||||
{
|
||||
foreach (var cb in _progressCallbacks)
|
||||
JsUtils.Call (cb, progress);
|
||||
}
|
||||
|
||||
public object Result => _result;
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Thread: _I_IAsyncAction
|
||||
{
|
||||
private Thread _thread;
|
||||
private bool _completed;
|
||||
private bool _cancelled;
|
||||
private Exception _error;
|
||||
private List<object> _resolveCallbacks = new List<object> ();
|
||||
private List<object> _rejectCallbacks = new List<object> ();
|
||||
private List<object> _progressCallbacks = new List<object> ();
|
||||
private CancellationTokenSource _cts = new CancellationTokenSource ();
|
||||
|
||||
public _I_Thread (Action action)
|
||||
{
|
||||
_thread = new Thread (() => {
|
||||
try
|
||||
{
|
||||
if (_cts.Token.IsCancellationRequested)
|
||||
{
|
||||
_cancelled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
action ();
|
||||
_completed = true;
|
||||
|
||||
foreach (var cb in _resolveCallbacks)
|
||||
JsUtils.Call (cb);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_error = ex;
|
||||
foreach (var cb in _rejectCallbacks)
|
||||
JsUtils.Call (cb, ex);
|
||||
}
|
||||
});
|
||||
_thread.IsBackground = true;
|
||||
_thread.Start ();
|
||||
}
|
||||
|
||||
public _I_IAsyncAction Then (object resolve, object reject = null, object progress = null)
|
||||
{
|
||||
if (resolve != null) _resolveCallbacks.Add (resolve);
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
if (progress != null) _progressCallbacks.Add (progress);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Done (object resolve, object reject = null)
|
||||
{
|
||||
if (resolve != null) _resolveCallbacks.Add (resolve);
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
}
|
||||
|
||||
public void Catch (object reject)
|
||||
{
|
||||
if (reject != null) _rejectCallbacks.Add (reject);
|
||||
}
|
||||
|
||||
public bool IsCompleted => _completed;
|
||||
public bool IsCancelled => _cancelled;
|
||||
public bool IsError => _error != null;
|
||||
public object Error => _error;
|
||||
|
||||
public void Cancel ()
|
||||
{
|
||||
_cts.Cancel ();
|
||||
_cancelled = true;
|
||||
}
|
||||
|
||||
public void ReportProgress (object progress)
|
||||
{
|
||||
foreach (var cb in _progressCallbacks)
|
||||
JsUtils.Call (cb, progress);
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Exception: Exception, IDisposable
|
||||
{
|
||||
private Exception bex = null;
|
||||
public _I_Exception (Exception ex) { bex = ex; }
|
||||
public _I_Exception (string message) { bex = new Exception (message); }
|
||||
public _I_Exception (string msg, Exception innerEx) { bex = new Exception (msg, innerEx); }
|
||||
public override IDictionary Data => bex.Data;
|
||||
public override Exception GetBaseException () => bex.GetBaseException ();
|
||||
public override void GetObjectData (SerializationInfo info, StreamingContext context) => bex.GetObjectData (info, context);
|
||||
public override string HelpLink
|
||||
{
|
||||
get { return bex.HelpLink; }
|
||||
set { bex.HelpLink = value; }
|
||||
}
|
||||
public override string Message => bex.Message;
|
||||
public override string Source
|
||||
{
|
||||
get { return bex.Source; }
|
||||
set { bex.Source = value; }
|
||||
}
|
||||
public override string StackTrace => bex.StackTrace;
|
||||
public override string ToString () => bex.ToString ();
|
||||
public override int GetHashCode () => bex.GetHashCode ();
|
||||
public override bool Equals (object obj) => bex.Equals (obj);
|
||||
public void Dispose () { bex = null; }
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_KeyValuePair: IDisposable
|
||||
{
|
||||
object key = null;
|
||||
object value = null;
|
||||
public _I_KeyValuePair (object k, object v)
|
||||
{
|
||||
key = k;
|
||||
value = v;
|
||||
}
|
||||
public object Key { get { return key; } set { key = value; } }
|
||||
public object Value { get { return value; } set { this.value = value; } }
|
||||
public void Dispose ()
|
||||
{
|
||||
key = null;
|
||||
value = null;
|
||||
}
|
||||
~_I_KeyValuePair ()
|
||||
{
|
||||
key = null;
|
||||
value = null;
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_WwwFormUrlDecoder
|
||||
{
|
||||
private readonly Dictionary<string, string> _params = new Dictionary<string, string> ();
|
||||
public _I_WwwFormUrlDecoder (string query)
|
||||
{
|
||||
if (string.IsNullOrEmpty (query)) return;
|
||||
if (query.StartsWith ("?")) query = query.Substring (1);
|
||||
foreach (var pair in query.Split ('&'))
|
||||
{
|
||||
var kv = pair.Split ('=');
|
||||
if (kv.Length == 2)
|
||||
_params [Uri.UnescapeDataString (kv [0])] = Uri.UnescapeDataString (kv [1]);
|
||||
}
|
||||
}
|
||||
public string GetFirstValueByName (string name)
|
||||
{
|
||||
string value = null;
|
||||
return _params.TryGetValue (name, out value) ? value : null;
|
||||
}
|
||||
public int Size => _params.Count;
|
||||
public _I_KeyValuePair GetAt (uint index)
|
||||
{
|
||||
var pair = _params.ElementAt ((int)index);
|
||||
return new _I_KeyValuePair (pair.Key, pair.Value);
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Uri: Uri
|
||||
{
|
||||
public _I_Uri (string uri): base (uri) { }
|
||||
public _I_Uri (string baseUri, string relativeUri) : base (new Uri (baseUri), relativeUri) { }
|
||||
public string AbsoluteCanonicalUri => this.GetLeftPart (UriPartial.Authority) + this.PathAndQuery + this.Fragment;
|
||||
public string DisplayIri => Uri.UnescapeDataString (this.OriginalString);
|
||||
public string DisplayUri => Uri.UnescapeDataString (this.OriginalString);
|
||||
public string Domain => ExtractDomain (this.Host);
|
||||
public string Extension => System.IO.Path.GetExtension (this.AbsolutePath)?.TrimStart ('.') ?? "";
|
||||
public string Password => ExtractPassword (this.UserInfo);
|
||||
public string Path => this.AbsolutePath;
|
||||
public object QueryParsed => new _I_WwwFormUrlDecoder (this.Query);
|
||||
public string RawUri => this.OriginalString;
|
||||
public string SchemeName => this.Scheme;
|
||||
public bool Suspicious => !Uri.IsWellFormedUriString (this.OriginalString, UriKind.Absolute);
|
||||
public string UserName => ExtractUserName (this.UserInfo);
|
||||
public _I_Uri CombineUri (string relativeUri)
|
||||
{
|
||||
return new _I_Uri (this.AbsoluteUri, relativeUri);
|
||||
}
|
||||
public static string EscapeComponent (string component)
|
||||
{
|
||||
return Uri.EscapeDataString (component);
|
||||
}
|
||||
public static string UnescapeComponent (string component)
|
||||
{
|
||||
return Uri.UnescapeDataString (component);
|
||||
}
|
||||
private static string ExtractDomain (string host)
|
||||
{
|
||||
var parts = host.Split ('.');
|
||||
if (parts.Length >= 2)
|
||||
return string.Join (".", parts.Skip (1));
|
||||
return host;
|
||||
}
|
||||
private static string ExtractUserName (string userInfo)
|
||||
{
|
||||
if (string.IsNullOrEmpty (userInfo)) return "";
|
||||
var parts = userInfo.Split (':');
|
||||
return parts [0];
|
||||
}
|
||||
private static string ExtractPassword (string userInfo)
|
||||
{
|
||||
if (string.IsNullOrEmpty (userInfo)) return "";
|
||||
var parts = userInfo.Split (':');
|
||||
return parts.Length > 1 ? parts [1] : "";
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Utilities
|
||||
{
|
||||
public _I_Uri CreateUri (string uri) => new _I_Uri (uri);
|
||||
public _I_Uri CreateUri2 (string baseUri, string relaUri) => new _I_Uri (baseUri, relaUri);
|
||||
public _I_Exception CreateException (string message) => new _I_Exception (message);
|
||||
public _I_Exception CreateException2 (string message, _I_Exception innerEx) => new _I_Exception (message, innerEx);
|
||||
public _I_Calendar CreateCalendar () => new _I_Calendar ();
|
||||
public _I_Calendar CreateCalendar2 (object list) => new _I_Calendar (list);
|
||||
public _I_Calendar CreateCalendar3 (object list, string arg1, string arg2) => new _I_Calendar (list, arg1, arg2);
|
||||
public _I_Calendar CreateCalendar4 (object list, string arg1, string arg2, string arg3) => new _I_Calendar (list, arg1, arg2, arg3);
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplate (string formatTemplate)
|
||||
{
|
||||
return new _I_DateTimeFormatter (formatTemplate);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplateAndLanguages (string formatTemplate, object languagesArray)
|
||||
{
|
||||
List<string> languages = JsArrayToStringList (languagesArray);
|
||||
return new _I_DateTimeFormatter (formatTemplate, languages);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromTemplateFull (string formatTemplate, object languagesArray,
|
||||
string geographicRegion, string calendar, string clock)
|
||||
{
|
||||
List<string> languages = JsArrayToStringList (languagesArray);
|
||||
return new _I_DateTimeFormatter (formatTemplate, languages, geographicRegion, calendar, clock);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateEnums (int year, int month, int day, int dayOfWeek)
|
||||
{
|
||||
return new _I_DateTimeFormatter (
|
||||
(YearFormat)year,
|
||||
(MonthFormat)month,
|
||||
(DayFormat)day,
|
||||
(DayOfWeekFormat)dayOfWeek
|
||||
);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromTimeEnums (int hour, int minute, int second)
|
||||
{
|
||||
return new _I_DateTimeFormatter (
|
||||
(HourFormat)hour,
|
||||
(MinuteFormat)minute,
|
||||
(SecondFormat)second
|
||||
);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateTimeEnums (int year, int month, int day, int dayOfWeek,
|
||||
int hour, int minute, int second, object languagesArray)
|
||||
{
|
||||
List<string> languages = JsArrayToStringList (languagesArray);
|
||||
return new _I_DateTimeFormatter (
|
||||
(YearFormat)year,
|
||||
(MonthFormat)month,
|
||||
(DayFormat)day,
|
||||
(DayOfWeekFormat)dayOfWeek,
|
||||
(HourFormat)hour,
|
||||
(MinuteFormat)minute,
|
||||
(SecondFormat)second,
|
||||
languages
|
||||
);
|
||||
}
|
||||
public _I_DateTimeFormatter CreateDateTimeFormatterFromDateTimeEnumsFull (int year, int month, int day, int dayOfWeek,
|
||||
int hour, int minute, int second, object languagesArray,
|
||||
string geographicRegion, string calendar, string clock)
|
||||
{
|
||||
List<string> languages = JsArrayToStringList (languagesArray);
|
||||
return new _I_DateTimeFormatter (
|
||||
(YearFormat)year,
|
||||
(MonthFormat)month,
|
||||
(DayFormat)day,
|
||||
(DayOfWeekFormat)dayOfWeek,
|
||||
(HourFormat)hour,
|
||||
(MinuteFormat)minute,
|
||||
(SecondFormat)second,
|
||||
languages,
|
||||
geographicRegion,
|
||||
calendar,
|
||||
clock
|
||||
);
|
||||
}
|
||||
private List<string> JsArrayToStringList (object jsArray)
|
||||
{
|
||||
var result = new List<string> ();
|
||||
if (jsArray == null) return result;
|
||||
|
||||
Type type = jsArray.GetType ();
|
||||
try
|
||||
{
|
||||
int length = (int)type.InvokeMember ("length", BindingFlags.GetProperty, null, jsArray, null);
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
object value = type.InvokeMember (i.ToString (), BindingFlags.GetProperty, null, jsArray, null);
|
||||
if (value != null)
|
||||
result.Add (value.ToString ());
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 如果无法获取 length,则假设是单个字符串
|
||||
string single = jsArray.ToString ();
|
||||
if (!string.IsNullOrEmpty (single))
|
||||
result.Add (single);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
328
DataUtils/Web.cs
Normal file
@@ -0,0 +1,328 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DataUtils
|
||||
{
|
||||
[ComVisible (true)]
|
||||
[InterfaceType (ComInterfaceType.InterfaceIsDual)]
|
||||
public interface IHttpResponse: IDisposable
|
||||
{
|
||||
int Status { get; } // 兼容旧版,等同于 StatusCode
|
||||
int StatusCode { get; }
|
||||
string StatusText { get; } // 等同于 StatusDescription
|
||||
string StatusDescription { get; }
|
||||
string ResponseUrl { get; }
|
||||
Uri ResponseUri { get; }
|
||||
string ContentType { get; }
|
||||
long ContentLength { get; } // 注意:JS 中 Number 可表示 2^53 以内整数
|
||||
string CharacterSet { get; }
|
||||
string ContentEncoding { get; }
|
||||
DateTime LastModified { get; }
|
||||
string Method { get; } // 原始请求方法 (GET, POST...)
|
||||
Version ProtocolVersion { get; } // 如 1.1,JS 中可能转为字符串
|
||||
bool IsFromCache { get; }
|
||||
bool IsMutuallyAuthenticated { get; }
|
||||
string Text ();
|
||||
_I_Enumerable Bytes ();
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class HttpResponse: IHttpResponse, IDisposable
|
||||
{
|
||||
private readonly byte [] _data;
|
||||
private readonly Dictionary<string, string> _headersDict;
|
||||
private bool _disposed = false;
|
||||
public int Status => StatusCode;
|
||||
public int StatusCode { get; private set; }
|
||||
public string StatusText => StatusDescription;
|
||||
public string StatusDescription { get; private set; }
|
||||
public string ResponseUrl => ResponseUri?.ToString ();
|
||||
public Uri ResponseUri { get; private set; }
|
||||
public string ContentType { get; private set; }
|
||||
public long ContentLength { get; private set; }
|
||||
public string CharacterSet { get; private set; }
|
||||
public string ContentEncoding { get; private set; }
|
||||
public DateTime LastModified { get; private set; }
|
||||
public string Method { get; private set; }
|
||||
public Version ProtocolVersion { get; private set; }
|
||||
public bool IsFromCache { get; private set; }
|
||||
public bool IsMutuallyAuthenticated { get; private set; }
|
||||
public HttpResponse (HttpWebResponse response)
|
||||
{
|
||||
if (response == null) throw new ArgumentNullException (nameof (response));
|
||||
using (var stream = response.GetResponseStream ())
|
||||
using (var ms = new MemoryStream ())
|
||||
{
|
||||
stream.CopyTo (ms);
|
||||
_data = ms.ToArray ();
|
||||
}
|
||||
StatusCode = (int)response.StatusCode;
|
||||
StatusDescription = response.StatusDescription;
|
||||
ResponseUri = response.ResponseUri;
|
||||
Method = response.Method;
|
||||
ProtocolVersion = new Version ((ushort)response.ProtocolVersion.Major, (ushort)response.ProtocolVersion.Minor, (ushort)response.ProtocolVersion.Build, (ushort)response.ProtocolVersion.Revision);
|
||||
IsFromCache = response.IsFromCache;
|
||||
IsMutuallyAuthenticated = response.IsMutuallyAuthenticated;
|
||||
ContentType = response.ContentType ?? "";
|
||||
ContentLength = response.ContentLength;
|
||||
CharacterSet = response.CharacterSet ?? "";
|
||||
ContentEncoding = response.ContentEncoding ?? "";
|
||||
LastModified = response.LastModified;
|
||||
_headersDict = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (string key in response.Headers.AllKeys)
|
||||
{
|
||||
if (!string.IsNullOrEmpty (key))
|
||||
_headersDict [key] = response.Headers [key];
|
||||
}
|
||||
}
|
||||
public HttpResponse (int statusCode, string statusDescription, string responseUrl, byte [] data, Dictionary<string, string> headers)
|
||||
{
|
||||
StatusCode = statusCode;
|
||||
StatusDescription = statusDescription ?? "";
|
||||
ResponseUri = string.IsNullOrEmpty (responseUrl) ? null : new Uri (responseUrl);
|
||||
_data = data ?? new byte [0];
|
||||
_headersDict = headers ?? new Dictionary<string, string> ();
|
||||
ContentType = GetHeader ("Content-Type") ?? "";
|
||||
ContentLength = _data.Length;
|
||||
CharacterSet = "";
|
||||
ContentEncoding = "";
|
||||
LastModified = DateTime.MinValue;
|
||||
Method = "";
|
||||
ProtocolVersion = new Version (0, 0);
|
||||
IsFromCache = false;
|
||||
IsMutuallyAuthenticated = false;
|
||||
}
|
||||
public string GetHeader (string sName)
|
||||
{
|
||||
if (string.IsNullOrEmpty (sName)) return null;
|
||||
try
|
||||
{
|
||||
return _headersDict [sName];
|
||||
}
|
||||
catch { return null; }
|
||||
}
|
||||
public string GetHeadersToJson ()
|
||||
{
|
||||
return JsonConvert.SerializeObject (_headersDict);
|
||||
}
|
||||
public string Text ()
|
||||
{
|
||||
string charset = CharacterSet;
|
||||
Encoding enc = Encoding.UTF8;
|
||||
if (!string.IsNullOrEmpty (charset))
|
||||
{
|
||||
try { enc = Encoding.GetEncoding (charset); }
|
||||
catch { /* 保持 UTF-8 */ }
|
||||
}
|
||||
return enc.GetString (_data);
|
||||
}
|
||||
public _I_Enumerable Bytes ()
|
||||
{
|
||||
var list = new List<object> ();
|
||||
foreach (byte b in _data)
|
||||
list.Add (b);
|
||||
return new _I_List (list);
|
||||
}
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class HttpRequest: IDisposable
|
||||
{
|
||||
private string _method;
|
||||
private string _url;
|
||||
private Dictionary<string, string> _headers = new Dictionary<string, string> ();
|
||||
public int Timeout { get; set; } = 100000; // 毫秒,默认 100 秒
|
||||
public int ReadWriteTimeout { get; set; } = 300000; // 读写超时,默认 5 分钟
|
||||
public bool AllowAutoRedirect { get; set; } = true;
|
||||
public bool AllowWriteStreamBuffering { get; set; } = true;
|
||||
public bool KeepAlive { get; set; } = true;
|
||||
public int MaximumAutomaticRedirections { get; set; } = 50;
|
||||
public string UserAgent
|
||||
{
|
||||
get { return GetHeader ("User-Agent"); }
|
||||
set { SetHeader ("User-Agent", value); }
|
||||
}
|
||||
public string Referer
|
||||
{
|
||||
get { return GetHeader ("Referer"); }
|
||||
set { SetHeader ("Referer", value); }
|
||||
}
|
||||
public string ContentType
|
||||
{
|
||||
get { return GetHeader ("Content-Type"); }
|
||||
set { SetHeader ("Content-Type", value); }
|
||||
}
|
||||
public string Accept
|
||||
{
|
||||
get { return GetHeader ("Accept"); }
|
||||
set { SetHeader ("Accept", value); }
|
||||
}
|
||||
public IWebProxy Proxy { get; set; } = null;
|
||||
public CookieContainer CookieContainer { get; set; } = null;
|
||||
private string _httpver = "1.1";
|
||||
public string ProtocolVersion
|
||||
{
|
||||
get { return _httpver; }
|
||||
set { _httpver = value; }
|
||||
}
|
||||
public System.Version ProtVer
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (_httpver)
|
||||
{
|
||||
case "1.0": return HttpVersion.Version10;
|
||||
default:
|
||||
case "1.1": return HttpVersion.Version11;
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool PreAuthenticate { get; set; } = false;
|
||||
public ICredentials Credentials { get; set; } = null;
|
||||
public bool AutomaticDecompression { get; set; } = false;
|
||||
public Action<long, long> UploadProgressCallback { get; set; } = null;
|
||||
public void Open (string sMethod, string sUrl)
|
||||
{
|
||||
_method = sMethod;
|
||||
_url = sUrl;
|
||||
}
|
||||
public void SetHeader (string sName, string sValue) => _headers [sName] = sValue;
|
||||
public string GetHeader (string sName) => _headers [sName];
|
||||
public string GetHeadersToJson () => JsonConvert.SerializeObject (_headers);
|
||||
public void RemoveHeader (string sName) => _headers.Remove (sName);
|
||||
public void ClearHeader () => _headers.Clear ();
|
||||
public IHttpResponse Send (string sBody, string encoding)
|
||||
{
|
||||
var req = (HttpWebRequest)WebRequest.Create (_url);
|
||||
req.Method = _method;
|
||||
req.Timeout = Timeout;
|
||||
req.ReadWriteTimeout = ReadWriteTimeout;
|
||||
req.AllowAutoRedirect = AllowAutoRedirect;
|
||||
req.AllowWriteStreamBuffering = AllowWriteStreamBuffering;
|
||||
req.KeepAlive = KeepAlive;
|
||||
req.MaximumAutomaticRedirections = MaximumAutomaticRedirections;
|
||||
if (Proxy != null) req.Proxy = Proxy;
|
||||
if (CookieContainer != null) req.CookieContainer = CookieContainer;
|
||||
req.ProtocolVersion = ProtVer;
|
||||
req.PreAuthenticate = PreAuthenticate;
|
||||
if (Credentials != null) req.Credentials = Credentials;
|
||||
if (AutomaticDecompression)
|
||||
req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
if (_headers.ContainsKey ("User-Agent"))
|
||||
req.UserAgent = _headers ["User-Agent"];
|
||||
foreach (var h in _headers)
|
||||
{
|
||||
if (string.Equals (h.Key, "User-Agent", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
if (string.Equals (h.Key, "Content-Type", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
string ct = h.Value;
|
||||
if (!string.IsNullOrEmpty (sBody) && !ct.Contains ("charset"))
|
||||
{
|
||||
Encoding enc = Encoding.GetEncoding (encoding);
|
||||
ct = ct + "; charset=" + enc.WebName;
|
||||
}
|
||||
req.ContentType = ct;
|
||||
}
|
||||
else if (string.Equals (h.Key, "Accept", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
req.Accept = h.Value;
|
||||
}
|
||||
else if (string.Equals (h.Key, "Referer", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
req.Referer = h.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
req.Headers [h.Key] = h.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有显式设置 Content-Type 且是 POST/PUT 且有请求体,设置默认值
|
||||
bool hasContentType = _headers.Keys.Any (k => string.Equals (k, "Content-Type", StringComparison.OrdinalIgnoreCase));
|
||||
if (!hasContentType && (string.Equals (_method, "POST", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals (_method, "PUT", StringComparison.OrdinalIgnoreCase)) &&
|
||||
!string.IsNullOrEmpty (sBody))
|
||||
{
|
||||
Encoding enc = Encoding.GetEncoding (encoding);
|
||||
req.ContentType = "application/x-www-form-urlencoded; charset=" + enc.WebName;
|
||||
}
|
||||
|
||||
// 写入请求体
|
||||
if (!string.IsNullOrEmpty (sBody))
|
||||
{
|
||||
Encoding enc = Encoding.GetEncoding (encoding);
|
||||
byte [] bytes = enc.GetBytes (sBody);
|
||||
req.ContentLength = bytes.Length;
|
||||
using (var stream = req.GetRequestStream ())
|
||||
{
|
||||
if (UploadProgressCallback != null)
|
||||
{
|
||||
int totalWritten = 0;
|
||||
int bufferSize = 8192;
|
||||
for (int offset = 0; offset < bytes.Length; offset += bufferSize)
|
||||
{
|
||||
int chunkSize = Math.Min (bufferSize, bytes.Length - offset);
|
||||
stream.Write (bytes, offset, chunkSize);
|
||||
totalWritten += chunkSize;
|
||||
UploadProgressCallback (totalWritten, bytes.Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stream.Write (bytes, 0, bytes.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
using (var res = (HttpWebResponse)req.GetResponse ())
|
||||
{
|
||||
return new HttpResponse (res);
|
||||
}
|
||||
}
|
||||
public void SendAsync (string sBody, string encoding, object pfResolve, object pfReject)
|
||||
{
|
||||
System.Threading.ThreadPool.QueueUserWorkItem (delegate
|
||||
{
|
||||
try
|
||||
{
|
||||
JsUtils.Call (pfResolve, Send (sBody, encoding));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
JsUtils.Call (pfReject, new _I_Exception (ex));
|
||||
}
|
||||
});
|
||||
}
|
||||
public void Dispose () { }
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Http
|
||||
{
|
||||
public HttpRequest CreateHttpRequest () => new HttpRequest ();
|
||||
}
|
||||
[ComVisible (true)]
|
||||
[ClassInterface (ClassInterfaceType.AutoDual)]
|
||||
public class _I_Web
|
||||
{
|
||||
public _I_Http Http => new _I_Http ();
|
||||
}
|
||||
}
|
||||
5
Directory.Build.props
Normal file
@@ -0,0 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup Condition="'$(MSBuildProjectExtension)'=='.vcxproj'">
|
||||
<ForceImportAfterCppProps>$(MSBuildThisFileDirectory)ArmDesktopSdk.props</ForceImportAfterCppProps>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E4CA78A9-9408-4F5F-ADD6-730FD501FF8E}</ProjectGuid>
|
||||
@@ -33,6 +33,13 @@
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
@@ -40,14 +47,7 @@
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
@@ -62,26 +62,26 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@@ -95,15 +95,16 @@
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalDependencies>
|
||||
</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -116,14 +117,15 @@
|
||||
<AdditionalDependencies />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies />
|
||||
<AdditionalDependencies>
|
||||
</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@@ -142,9 +144,9 @@
|
||||
<ClCompile Include="IEHelper.cpp" />
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
215
LICENSE
@@ -1,21 +1,202 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Windows Modern
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
1. Definitions.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
17
LICENSE.SharpZipLib
Normal file
@@ -0,0 +1,17 @@
|
||||
Copyright © 2000-2018 SharpZipLib Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -13,7 +13,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -23,7 +23,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
@@ -34,6 +34,24 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Launch
|
||||
}
|
||||
string appUserModelId = args [0];
|
||||
string argumentLine = BuildCommandLine (args, 1);
|
||||
AppxPackage.PackageManager.ActiveApp (appUserModelId, string.IsNullOrEmpty (argumentLine) ? null : argumentLine);
|
||||
AppxPackage.PackageManager.ActiveApp (appUserModelId, argumentLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,21 @@
|
||||
<AssemblyName>Manager</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -23,7 +38,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
@@ -36,7 +51,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -44,7 +59,7 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -55,6 +70,9 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Project1.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
@@ -169,6 +187,15 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Project1.ico" />
|
||||
<None Include="Resources\32_manager.ico" />
|
||||
<None Include="Resources\IconMetro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
3
Manager/ManagerShell.Designer.cs
generated
@@ -35,12 +35,13 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(661, 416);
|
||||
this.ClientSize = new System.Drawing.Size(657, 414);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.Name = "ManagerShell";
|
||||
this.PageScale = 125;
|
||||
this.Text = "Form1";
|
||||
this.WindowIcon = ((System.Drawing.Icon)(resources.GetObject("$this.WindowIcon")));
|
||||
this.Load += new System.EventHandler(this.ManagerShell_Load);
|
||||
this.Resize += new System.EventHandler(this.ManagerShell_Resize);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Manager
|
||||
{
|
||||
public partial class ManagerShell: WAShell.WebAppForm
|
||||
@@ -25,6 +27,7 @@ namespace Manager
|
||||
catch { }
|
||||
InitSize ();
|
||||
Text = Bridge.ResXmlStore.StringRes.Get ("MANAGER_APPTITLE");
|
||||
this.Load += Form_Load;
|
||||
}
|
||||
private void InitSize ()
|
||||
{
|
||||
@@ -58,6 +61,17 @@ namespace Manager
|
||||
);
|
||||
WindowState = (FormWindowState)lasts.ReadInt ((int)FormWindowState.Normal);
|
||||
}
|
||||
private void Form_Load (object sender, EventArgs e)
|
||||
{
|
||||
var current = Process.GetCurrentProcess ();
|
||||
var processes = Process.GetProcessesByName (current.ProcessName);
|
||||
int count = processes.Length;
|
||||
int offset = 30; // 每个窗口偏移
|
||||
int x = 20 + (count - 1) * offset;
|
||||
int y = 20 + (count - 1) * offset;
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
this.Location = new Point (x, y);
|
||||
}
|
||||
private void ManagerShell_Load (object sender, EventArgs e)
|
||||
{
|
||||
var root = Path.GetDirectoryName (DataUtils.Utilities.GetCurrentProgramPath ());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Manager
|
||||
@@ -12,7 +14,7 @@ namespace Manager
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main ()
|
||||
static void Main (string [] args)
|
||||
{
|
||||
Directory.SetCurrentDirectory (AppDomain.CurrentDomain.BaseDirectory);
|
||||
//System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo ("en-US");
|
||||
|
||||
BIN
Manager/Resources/32_manager.ico
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
Manager/Resources/IconMetro.ico
Normal file
|
After Width: | Height: | Size: 44 KiB |
26
Manager/ShortcutCreateForm.Designer.cs
generated
@@ -115,10 +115,10 @@
|
||||
this.label1.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.label1, 5);
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑 Light", 20F);
|
||||
this.label1.Font = new System.Drawing.Font("Segoe UI", 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(27, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(727, 45);
|
||||
this.label1.Size = new System.Drawing.Size(727, 46);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Create Desktop Shortcut";
|
||||
//
|
||||
@@ -127,7 +127,7 @@
|
||||
this.label2.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.label2, 5);
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label2.Location = new System.Drawing.Point(27, 79);
|
||||
this.label2.Location = new System.Drawing.Point(27, 80);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(727, 60);
|
||||
this.label2.TabIndex = 1;
|
||||
@@ -147,7 +147,7 @@
|
||||
this.tableLayoutPanel2.Controls.Add(this.label7, 0, 8);
|
||||
this.tableLayoutPanel2.Controls.Add(this.customIconDisplay, 0, 9);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(27, 152);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(27, 153);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 10;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
@@ -160,7 +160,7 @@
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 39F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(235, 324);
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(235, 323);
|
||||
this.tableLayoutPanel2.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
@@ -251,7 +251,7 @@
|
||||
this.customIconDisplay.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.customIconDisplay.Location = new System.Drawing.Point(3, 230);
|
||||
this.customIconDisplay.Name = "customIconDisplay";
|
||||
this.customIconDisplay.Size = new System.Drawing.Size(229, 91);
|
||||
this.customIconDisplay.Size = new System.Drawing.Size(229, 90);
|
||||
this.customIconDisplay.TabIndex = 7;
|
||||
this.customIconDisplay.TabStop = false;
|
||||
//
|
||||
@@ -273,7 +273,7 @@
|
||||
this.tableLayoutPanel3.Controls.Add(this.label12, 0, 9);
|
||||
this.tableLayoutPanel3.Controls.Add(this.shortcutNameInput, 0, 10);
|
||||
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel3.Location = new System.Drawing.Point(273, 152);
|
||||
this.tableLayoutPanel3.Location = new System.Drawing.Point(273, 153);
|
||||
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||
this.tableLayoutPanel3.RowCount = 11;
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
@@ -287,7 +287,7 @@
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 18F));
|
||||
this.tableLayoutPanel3.Size = new System.Drawing.Size(235, 324);
|
||||
this.tableLayoutPanel3.Size = new System.Drawing.Size(235, 323);
|
||||
this.tableLayoutPanel3.TabIndex = 3;
|
||||
//
|
||||
// label5
|
||||
@@ -476,14 +476,14 @@
|
||||
this.tableLayoutPanel4.Controls.Add(this.imageSizeList, 0, 1);
|
||||
this.tableLayoutPanel4.Controls.Add(this.imagesPreview, 0, 3);
|
||||
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel4.Location = new System.Drawing.Point(519, 152);
|
||||
this.tableLayoutPanel4.Location = new System.Drawing.Point(519, 153);
|
||||
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
|
||||
this.tableLayoutPanel4.RowCount = 4;
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel4.Size = new System.Drawing.Size(235, 324);
|
||||
this.tableLayoutPanel4.Size = new System.Drawing.Size(235, 323);
|
||||
this.tableLayoutPanel4.TabIndex = 4;
|
||||
//
|
||||
// label8
|
||||
@@ -500,7 +500,7 @@
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label9.Location = new System.Drawing.Point(3, 162);
|
||||
this.label9.Location = new System.Drawing.Point(3, 161);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(229, 20);
|
||||
this.label9.TabIndex = 1;
|
||||
@@ -516,7 +516,7 @@
|
||||
this.imageSizeList.Location = new System.Drawing.Point(3, 23);
|
||||
this.imageSizeList.Name = "imageSizeList";
|
||||
this.imageSizeList.RowTemplate.Height = 27;
|
||||
this.imageSizeList.Size = new System.Drawing.Size(229, 136);
|
||||
this.imageSizeList.Size = new System.Drawing.Size(229, 135);
|
||||
this.imageSizeList.TabIndex = 2;
|
||||
this.imageSizeList.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.imageSizeList_CellDoubleClick);
|
||||
//
|
||||
@@ -536,7 +536,7 @@
|
||||
this.imagesPreview.AutoScroll = true;
|
||||
this.imagesPreview.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.imagesPreview.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.imagesPreview.Location = new System.Drawing.Point(3, 185);
|
||||
this.imagesPreview.Location = new System.Drawing.Point(3, 184);
|
||||
this.imagesPreview.Name = "imagesPreview";
|
||||
this.imagesPreview.Size = new System.Drawing.Size(229, 136);
|
||||
this.imagesPreview.TabIndex = 3;
|
||||
|
||||
@@ -29,7 +29,25 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
13
NOTICE.TXT
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright (c) 2025-2026 Windows Modern
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
230
PkgCLI/CliParsing.cs
Normal file
@@ -0,0 +1,230 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PkgCLI
|
||||
{
|
||||
public class NormalizeStringComparer: IEqualityComparer<string>
|
||||
{
|
||||
public bool Equals (string x, string y) => Polyfill.NEquals (x, y);
|
||||
public int GetHashCode (string obj) => obj.NNormalize ().GetHashCode ();
|
||||
}
|
||||
public class NormalizeCharacterComparer: IEqualityComparer<char>
|
||||
{
|
||||
public bool Equals (char x, char y) => char.ToLowerInvariant (x) == char.ToLowerInvariant (y);
|
||||
public int GetHashCode (char obj) => char.ToLowerInvariant (obj).GetHashCode ();
|
||||
}
|
||||
public class StringNSet: HashSet<string>
|
||||
{
|
||||
public StringNSet () : base (new NormalizeStringComparer ()) { }
|
||||
public StringNSet (IEnumerable<string> list) : base (list, new NormalizeStringComparer ()) { }
|
||||
}
|
||||
public class CharNSet: HashSet<char>
|
||||
{
|
||||
public CharNSet () : base (new NormalizeCharacterComparer ()) { }
|
||||
public CharNSet (IEnumerable<char> list) : base (list, new NormalizeCharacterComparer ()) { }
|
||||
}
|
||||
public static class CliParsingConst
|
||||
{
|
||||
public static readonly char [] defaultPrefixs = new char [] { '/', '-' };
|
||||
public static readonly char [] defaultPostfixs = new char [] { '=', ':' };
|
||||
public static readonly string [] emptyStringArray = new string [] { };
|
||||
}
|
||||
public class CmdParamName: IEquatable<CmdParamName>, IComparable<CmdParamName>, IDisposable
|
||||
{
|
||||
private string _id = "";
|
||||
private string _name = "";
|
||||
/// <summary>
|
||||
/// 命令唯一标识,但不作为命令名,仅用于内部识别。命令 ID 可以作为命令名或别名。
|
||||
/// </summary>
|
||||
public string Id { get { return _id.NNormalize (); } set { _id = value; } }
|
||||
/// <summary>
|
||||
/// 命令名,唯一。命令名不能与别名重复。首字符不能为前缀中的字符,尾字符不能为后缀中的字符。
|
||||
/// </summary>
|
||||
public string Name { get { return _name.NNormalize (); } set { _name = value; } }
|
||||
/// <summary>
|
||||
/// 命令别名,唯一。不能与命令名重复。首字符不能为前缀中的字符,尾字符不能为后缀中的字符。
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public StringNSet Aliases { get; private set; } = new StringNSet ();
|
||||
/// <summary>
|
||||
/// 命令前缀,为一个字符,标点符号。不能为命令名或别名的首字符。
|
||||
/// </summary>
|
||||
public CharNSet Prefixs { get; set; } = new CharNSet (CliParsingConst.defaultPrefixs);
|
||||
/// <summary>
|
||||
/// 命令后缀,为一个字符,标点符号。不能为命令名或别名的尾字符。
|
||||
/// </summary>
|
||||
public CharNSet Postfixs { get; set; } = new CharNSet (CliParsingConst.defaultPostfixs);
|
||||
public bool Equals (CmdParamName other)
|
||||
{
|
||||
if (other == null) return false;
|
||||
if (ReferenceEquals (this, other)) return true;
|
||||
return string.Equals (this.Id, other.Id, StringComparison.Ordinal);
|
||||
}
|
||||
public int CompareTo (CmdParamName other)
|
||||
{
|
||||
if (other == null) return 1;
|
||||
if (ReferenceEquals (this, other)) return 0;
|
||||
return string.Compare (this.Id, other.Id, StringComparison.Ordinal);
|
||||
}
|
||||
public override bool Equals (object obj) => Equals (obj as CmdParamName);
|
||||
public override int GetHashCode () => this.Id?.GetHashCode () ?? 0;
|
||||
public bool ParamContains (string param)
|
||||
{
|
||||
var ret = Name.NEquals (param);
|
||||
if (!ret)
|
||||
{
|
||||
foreach (var alias in Aliases)
|
||||
{
|
||||
if (alias.NEquals (param)) return true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
public void Dispose ()
|
||||
{
|
||||
Aliases?.Clear ();
|
||||
Prefixs?.Clear ();
|
||||
}
|
||||
public CmdParamName (string id, string name, IEnumerable<string> aliases, IEnumerable<char> prefixs, IEnumerable<char> postfixs)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Aliases = new StringNSet (aliases);
|
||||
Prefixs = new CharNSet (prefixs);
|
||||
Postfixs = new CharNSet (postfixs);
|
||||
}
|
||||
public CmdParamName (string name, IEnumerable<string> aliases) : this (name, name, aliases, CliParsingConst.defaultPrefixs, CliParsingConst.defaultPostfixs) { }
|
||||
public CmdParamName (string name) : this (name, CliParsingConst.emptyStringArray) { }
|
||||
public CmdParamName () { }
|
||||
}
|
||||
public class CommandParam: IEquatable<string>
|
||||
{
|
||||
private string _id = "";
|
||||
public string Id { get { return _id.NNormalize (); } set { _id = value; } }
|
||||
public string Value = "";
|
||||
public bool Equals (string other)
|
||||
{
|
||||
return (_id ?? "").NEquals (other);
|
||||
}
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
if (obj is string) return Equals (obj as string);
|
||||
else if (obj is CommandParam) return Equals ((obj as CommandParam).Id);
|
||||
else return base.Equals (obj);
|
||||
}
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return Id.GetHashCode ();
|
||||
}
|
||||
}
|
||||
public class CliParsing: IDisposable
|
||||
{
|
||||
public HashSet<CmdParamName> Params { get; set; } = new HashSet<CmdParamName> ();
|
||||
public void Dispose ()
|
||||
{
|
||||
Params = null;
|
||||
}
|
||||
public List<CommandParam> Parse (string [] args)
|
||||
{
|
||||
var ret = new List<CommandParam> ();
|
||||
CommandParam last = new CommandParam ();
|
||||
for (long i = 0; i < args.LongLength; i++)
|
||||
{
|
||||
var arg = args [i]?.Trim () ?? "";
|
||||
var item = args [i]?.NNormalize () ?? "";
|
||||
if (string.IsNullOrWhiteSpace (item)) continue;
|
||||
var first = item [0];
|
||||
bool isfind = false;
|
||||
foreach (var param in Params)
|
||||
{
|
||||
if (param.Prefixs.Contains (first))
|
||||
{
|
||||
var minser = param.Postfixs.Select (e => {
|
||||
var index = item.IndexOf (e);
|
||||
return index == -1 ? int.MaxValue : index;
|
||||
}).Min ();
|
||||
string paramPart, postfixPart;
|
||||
if (minser == int.MaxValue)
|
||||
{
|
||||
paramPart = arg.Substring (1);
|
||||
postfixPart = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
paramPart = arg.Substring (1, minser - 1);
|
||||
postfixPart = arg.Substring (minser + 1);
|
||||
}
|
||||
if (param.ParamContains (paramPart))
|
||||
{
|
||||
isfind = true;
|
||||
var cmdParam = new CommandParam ();
|
||||
cmdParam.Id = param.Id;
|
||||
if (!string.IsNullOrEmpty (postfixPart))
|
||||
cmdParam.Value = postfixPart;
|
||||
last = cmdParam;
|
||||
ret.Add (cmdParam);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isfind)
|
||||
{
|
||||
var valueparam = new CommandParam ();
|
||||
valueparam.Value = arg;
|
||||
ret.Add (valueparam);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
public static class CliPasingUtils
|
||||
{
|
||||
public static bool ParamContains (this List<CommandParam> cpl, string id)
|
||||
{
|
||||
foreach (var i in cpl)
|
||||
{
|
||||
if (i.Id.NEquals (id)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static bool ParamContains (this List<CommandParam> cpl, CmdParamName param)
|
||||
{
|
||||
foreach (var i in cpl)
|
||||
{
|
||||
if (i.Id.NEquals (param.Id)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static bool ParamsContainsOr (this List<CommandParam> cpl, params string [] ids)
|
||||
{
|
||||
foreach (var i in cpl)
|
||||
{
|
||||
foreach (var j in ids)
|
||||
{
|
||||
if (i.Id.NEquals (j)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static bool ParamsContainsAnd (this List<CommandParam> cpl, params string [] ids)
|
||||
{
|
||||
if (ids == null || ids.Length == 0) return true;
|
||||
foreach (var id in ids)
|
||||
{
|
||||
if (!ParamContains (cpl, id)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static CommandParam GetFromId (this List <CommandParam> cpl, string id)
|
||||
{
|
||||
foreach (var c in cpl)
|
||||
{
|
||||
if (c.Id.NEquals (id)) return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
97
PkgCLI/PkgCLI.csproj
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8D333AF6-E901-4301-B3EE-923088E81062}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PkgCLI</RootNamespace>
|
||||
<AssemblyName>PkgCLI</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CliParsing.cs" />
|
||||
<Compile Include="Polyfill.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Text.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AppxPackage\AppxPackage.csproj">
|
||||
<Project>{bd681a4f-eb60-4bb8-90b5-65968fc7da59}</Project>
|
||||
<Name>AppxPackage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataUtils\DataUtils.csproj">
|
||||
<Project>{ffd3fd52-37a8-4f43-883c-de8d996cb0e0}</Project>
|
||||
<Name>DataUtils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PrivateInit\PrivateInit.csproj">
|
||||
<Project>{8e708d9a-6325-4aa9-b5a5-d1b5eca8eef7}</Project>
|
||||
<Name>PrivateInit</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
987
PkgCLI/Polyfill.cs
Normal file
@@ -0,0 +1,987 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using AppxPackage;
|
||||
using AppxPackage.Info;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PkgCLI
|
||||
{
|
||||
public static class Polyfill
|
||||
{
|
||||
static public bool NEquals (this string s1, string s2)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (s1) && string.IsNullOrWhiteSpace (s2)) return true;
|
||||
else return s1?.Trim ()?.ToLowerInvariant () == s2?.Trim ()?.ToLowerInvariant ();
|
||||
}
|
||||
static public string NNormalize (this string s1)
|
||||
{
|
||||
return s1?.Trim ()?.ToLowerInvariant ();
|
||||
}
|
||||
static public string Join<T> (this IEnumerable<T> ie, string divide = ", ")
|
||||
{
|
||||
var ret = "";
|
||||
for (var i = 0; i < ie.Count (); i++)
|
||||
{
|
||||
if (i != 0) ret += divide;
|
||||
var item = ie.ElementAt (i);
|
||||
if (item == null) ret += "(null)";
|
||||
else ret += item.ToString ();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
/// 将对象通过指定的选择器转换为目标类型。
|
||||
/// 类似于 LINQ 的 Select,但适用于单一对象。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">目标类型</typeparam>
|
||||
/// <param name="obj">源对象</param>
|
||||
/// <param name="selector">转换委托,输入源对象,输出目标对象</param>
|
||||
/// <returns>转换后的结果</returns>
|
||||
public static T ToOther<T> (this object obj, Func<object, T> selector)
|
||||
{
|
||||
if (selector == null)
|
||||
throw new ArgumentNullException (nameof (selector));
|
||||
return selector (obj);
|
||||
}
|
||||
/// <summary>
|
||||
/// 将字典格式化为对齐的文本,每个键值对一行,分隔符垂直对齐。
|
||||
/// </summary>
|
||||
/// <param name="dict">要格式化的字典</param>
|
||||
/// <param name="separator">分隔符(如 ":", "="),默认为 ":"</param>
|
||||
/// <param name="indent">每行前的缩进字符串,默认为空</param>
|
||||
/// <param name="sortKeys">是否按键名排序(不区分大小写),默认为 false</param>
|
||||
/// <returns>格式化后的字符串,例如:
|
||||
/// Name : Alice
|
||||
/// Age : 30
|
||||
/// </returns>
|
||||
public static string FormatDictionaryAligned (
|
||||
this IDictionary<string, string> dict,
|
||||
string separator = ":",
|
||||
string indent = "",
|
||||
bool sortKeys = false)
|
||||
{
|
||||
if (dict == null || dict.Count == 0)
|
||||
return string.Empty;
|
||||
var keys = sortKeys
|
||||
? dict.Keys.OrderBy (k => k, StringComparer.OrdinalIgnoreCase).ToList ()
|
||||
: dict.Keys.ToList ();
|
||||
int maxKeyLength = keys.Max (k => k.Length);
|
||||
var sb = new StringBuilder ();
|
||||
foreach (string key in keys)
|
||||
{
|
||||
string value = dict [key] ?? string.Empty;
|
||||
sb.AppendLine ($"{indent}{key.PadRight (maxKeyLength)} {separator} {value}");
|
||||
}
|
||||
return sb.ToString ().TrimEnd (Environment.NewLine.ToCharArray ());
|
||||
}
|
||||
public static string Format (this string format, params object [] args)
|
||||
{
|
||||
return String.Format (format, args);
|
||||
}
|
||||
public static string Format (this string format, object args)
|
||||
{
|
||||
return String.Format (format, args);
|
||||
}
|
||||
}
|
||||
public static class PackageReaderExt
|
||||
{
|
||||
static public object GetJsonObjectForCli (this PackageReader pr)
|
||||
{
|
||||
var id = pr.Identity;
|
||||
var prop = pr.Properties;
|
||||
var pre = pr.Prerequisites;
|
||||
var apps = pr.Applications;
|
||||
var caps = pr.Capabilities;
|
||||
var deps = pr.Dependencies;
|
||||
dynamic obj = new {
|
||||
valid = pr.IsValid,
|
||||
type = pr.Type.ToOther (e => {
|
||||
switch ((AppxPackage.Info.PackageType)e)
|
||||
{
|
||||
case AppxPackage.Info.PackageType.Appx: return "appx";
|
||||
case AppxPackage.Info.PackageType.Bundle: return "bundle";
|
||||
default:
|
||||
case AppxPackage.Info.PackageType.Unknown: return "unknown";
|
||||
}
|
||||
}),
|
||||
role = pr.Role.ToOther (o => {
|
||||
switch ((AppxPackage.Info.PackageRole)o)
|
||||
{
|
||||
case AppxPackage.Info.PackageRole.Application: return "application";
|
||||
case AppxPackage.Info.PackageRole.Framework: return "framework";
|
||||
case AppxPackage.Info.PackageRole.Resource: return "resource";
|
||||
default:
|
||||
case AppxPackage.Info.PackageRole.Unknown: return "unknown";
|
||||
}
|
||||
}),
|
||||
identity = new {
|
||||
name = id.Name,
|
||||
publisher = id.Publisher,
|
||||
version = id.Version.Expression,
|
||||
realVersion = id.RealVersion.Expression,
|
||||
architecture = id.ProcessArchitecture.Select (e => {
|
||||
switch (e)
|
||||
{
|
||||
case AppxPackage.Info.Architecture.ARM: return "arm";
|
||||
case AppxPackage.Info.Architecture.ARM64: return "arm64";
|
||||
case AppxPackage.Info.Architecture.Neutral: return "neutral";
|
||||
default:
|
||||
case AppxPackage.Info.Architecture.Unknown: return "unknown";
|
||||
case AppxPackage.Info.Architecture.x64: return "x64";
|
||||
case AppxPackage.Info.Architecture.x86: return "x86";
|
||||
}
|
||||
}).ToList (),
|
||||
familyName = id.FamilyName,
|
||||
fullName = id.FullName,
|
||||
resourceId = id.ResourceId
|
||||
},
|
||||
properties = new {
|
||||
displayName = prop.DisplayName,
|
||||
publisherDisplayName = prop.Publisher,
|
||||
description = prop.Description,
|
||||
logo = prop.Logo,
|
||||
framework = prop.Framework,
|
||||
resourcePackage = prop.ResourcePackage
|
||||
},
|
||||
prerequisite = new {
|
||||
osMinVersion = pre.OSMinVersion.ToString (),
|
||||
osMaxVersionTested = pre.OSMaxVersionTested.ToString (),
|
||||
_osMinVersion = pre.OSMinVersionDescription,
|
||||
_osMaxVersionTested = pre.OSMaxVersionDescription
|
||||
},
|
||||
applications = apps.Select (e => {
|
||||
var dict = new Dictionary<string, string> ();
|
||||
foreach (var kv in e)
|
||||
{
|
||||
if (kv.Key.IndexOf ("Base64") >= 0) continue;
|
||||
var value = e.NewAt (kv.Key, pr.EnablePri);
|
||||
if (string.IsNullOrWhiteSpace (value))
|
||||
value = e.At (kv.Key);
|
||||
dict [kv.Key] = value;
|
||||
}
|
||||
return dict;
|
||||
}).ToList (),
|
||||
capabilities = new {
|
||||
capabilities = caps.Capabilities,
|
||||
deviceCapabilities = caps.DeviceCapabilities
|
||||
},
|
||||
dependencies = deps.Select (e => new {
|
||||
name = e.Name,
|
||||
publisher = e.Publisher,
|
||||
minVersion = e.Version.ToString ()
|
||||
})
|
||||
};
|
||||
return obj;
|
||||
}
|
||||
/// <summary>
|
||||
/// 从 PackageReader 中获取指定路径的值。
|
||||
/// 支持格式:路径中可使用 '.' 或 ':' 分隔,支持索引器 '[index]',支持 '.length'。
|
||||
/// 大小写不敏感,自动去除首尾空白。
|
||||
/// 示例:
|
||||
/// "Identity" -> 返回 Identity 字典
|
||||
/// "Identity.Name" -> 返回名称
|
||||
/// "Properties.Publisher" -> 返回发布者显示名称(别名)
|
||||
/// "applications[0]" -> 返回第一个应用字典
|
||||
/// "applications.length" -> 返回应用个数
|
||||
/// "Applications[0].LogoBase64" -> 返回第一个应用的 LogoBase64
|
||||
/// </summary>
|
||||
public static object GetItem (this PackageReader pr, string item)
|
||||
{
|
||||
if (pr == null) throw new ArgumentNullException ("pr");
|
||||
if (string.IsNullOrWhiteSpace (item)) return null;
|
||||
|
||||
string path = item.Trim ().Replace (':', '.');
|
||||
object result = ResolvePath (pr, path);
|
||||
return SerializeObject (result, pr, false);
|
||||
}
|
||||
|
||||
private static object ResolvePath (object target, string path)
|
||||
{
|
||||
if (target == null) return null;
|
||||
if (string.IsNullOrEmpty (path)) return target;
|
||||
|
||||
string [] segments = path.Split ('.');
|
||||
object current = target;
|
||||
|
||||
foreach (string seg in segments)
|
||||
{
|
||||
if (current == null) return null;
|
||||
|
||||
if (seg.Contains ("[") && seg.Contains ("]"))
|
||||
{
|
||||
int bracketStart = seg.IndexOf ('[');
|
||||
string propName = seg.Substring (0, bracketStart);
|
||||
string indexStr = seg.Substring (bracketStart + 1, seg.Length - bracketStart - 2);
|
||||
int index;
|
||||
if (!int.TryParse (indexStr, out index))
|
||||
return null;
|
||||
|
||||
object collection = GetPropertyValue (current, propName);
|
||||
if (collection == null) return null;
|
||||
current = GetIndexedValue (collection, index);
|
||||
}
|
||||
else if (string.Equals (seg, "length", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals (seg, "count", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
current = GetLength (current);
|
||||
}
|
||||
else
|
||||
{
|
||||
current = GetPropertyValue (current, seg);
|
||||
}
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
private static object GetPropertyValue (object target, string propName)
|
||||
{
|
||||
if (target == null) return null;
|
||||
Type type = target.GetType ();
|
||||
|
||||
// 根对象 PackageReader 的属性名映射(不区分大小写)
|
||||
if (type == typeof (PackageReader))
|
||||
{
|
||||
string mapped = null;
|
||||
string lower = propName.ToLowerInvariant ();
|
||||
switch (lower)
|
||||
{
|
||||
case "pkgid":
|
||||
case "id":
|
||||
case "identity": mapped = "Identity"; break;
|
||||
case "prop":
|
||||
case "properties": mapped = "Properties"; break;
|
||||
case "prerequistes":
|
||||
case "prerequisite":
|
||||
case "prerequisites": mapped = "Prerequisites"; break;
|
||||
case "res":
|
||||
case "resources": mapped = "Resources"; break;
|
||||
case "apps":
|
||||
case "applications": mapped = "Applications"; break;
|
||||
case "caps":
|
||||
case "capabilities": mapped = "Capabilities"; break;
|
||||
case "deps":
|
||||
case "dependencies": mapped = "Dependencies"; break;
|
||||
case "type": mapped = "Type"; break;
|
||||
case "role": mapped = "Role"; break;
|
||||
case "valid":
|
||||
case "isvalid": mapped = "IsValid"; break;
|
||||
case "filepath": mapped = "FilePath"; break;
|
||||
}
|
||||
if (mapped != null)
|
||||
propName = mapped;
|
||||
}
|
||||
|
||||
// PRProperties 别名:Publisher / PublisherDisplayName 都映射到 Publisher 属性
|
||||
if (type == typeof (PRProperties))
|
||||
{
|
||||
if (string.Equals (propName, "Publisher", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals (propName, "PublisherDisplayName", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
propName = "Publisher";
|
||||
}
|
||||
}
|
||||
|
||||
// PRApplication 中以 Base64 结尾的属性 -> 调用 NewAtBase64
|
||||
if (type == typeof (PRApplication) && propName.EndsWith ("Base64", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
string baseKey = propName.Substring (0, propName.Length - 6);
|
||||
PRApplication app = (PRApplication)target;
|
||||
MethodInfo method = typeof (PRApplication).GetMethod ("NewAtBase64", BindingFlags.Public | BindingFlags.Instance);
|
||||
if (method != null)
|
||||
{
|
||||
return method.Invoke (app, new object [] { baseKey });
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// PRApplication 普通属性访问(字典键,大小写不敏感)
|
||||
if (type == typeof (PRApplication))
|
||||
{
|
||||
PRApplication app = (PRApplication)target;
|
||||
// 直接使用索引器,内部已处理资源解析和大小写不敏感
|
||||
return app [propName];
|
||||
}
|
||||
|
||||
// MRApplication 同理
|
||||
if (type == typeof (MRApplication))
|
||||
{
|
||||
MRApplication app = (MRApplication)target;
|
||||
return app [propName];
|
||||
}
|
||||
|
||||
// 反射属性(不区分大小写)
|
||||
PropertyInfo prop = type.GetProperty (propName,
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
|
||||
if (prop != null)
|
||||
{
|
||||
return prop.GetValue (target, null);
|
||||
}
|
||||
|
||||
// 反射字段
|
||||
FieldInfo field = type.GetField (propName,
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
|
||||
if (field != null)
|
||||
{
|
||||
return field.GetValue (target);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object GetIndexedValue (object collection, int index)
|
||||
{
|
||||
if (collection == null) return null;
|
||||
|
||||
// PRApplications
|
||||
PRApplications apps = collection as PRApplications;
|
||||
if (apps != null)
|
||||
{
|
||||
if (index >= 0 && index < apps.Applications.Count)
|
||||
return apps.Applications [index];
|
||||
return null;
|
||||
}
|
||||
|
||||
// IList
|
||||
IList list = collection as IList;
|
||||
if (list != null && index >= 0 && index < list.Count)
|
||||
return list [index];
|
||||
|
||||
// 索引器属性
|
||||
PropertyInfo indexer = collection.GetType ().GetProperty ("Item", new [] { typeof (int) });
|
||||
if (indexer != null)
|
||||
return indexer.GetValue (collection, new object [] { index });
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static int? GetLength (object obj)
|
||||
{
|
||||
if (obj == null) return null;
|
||||
PRApplications apps = obj as PRApplications;
|
||||
if (apps != null) return apps.Applications.Count;
|
||||
PRDependencies deps = obj as PRDependencies;
|
||||
if (deps != null) return deps.Dependencies.Count;
|
||||
IList list = obj as IList;
|
||||
if (list != null) return list.Count;
|
||||
ICollection coll = obj as ICollection;
|
||||
if (coll != null) return coll.Count;
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object SerializeObject (object obj, PackageReader pr, bool filterBase64)
|
||||
{
|
||||
if (obj == null) return null;
|
||||
|
||||
Type type = obj.GetType ();
|
||||
if (type.IsPrimitive || obj is string || obj is decimal || obj is Enum)
|
||||
return obj;
|
||||
|
||||
// PRIdentity
|
||||
if (type == typeof (PRIdentity))
|
||||
{
|
||||
PRIdentity id = (PRIdentity)obj;
|
||||
return new {
|
||||
name = id.Name,
|
||||
publisher = id.Publisher,
|
||||
version = id.Version.Expression,
|
||||
realVersion = id.RealVersion.Expression,
|
||||
architecture = id.ProcessArchitecture.Select (e => {
|
||||
switch (e)
|
||||
{
|
||||
case Architecture.ARM: return "arm";
|
||||
case Architecture.ARM64: return "arm64";
|
||||
case Architecture.Neutral: return "neutral";
|
||||
case Architecture.x64: return "x64";
|
||||
case Architecture.x86: return "x86";
|
||||
default: return "unknown";
|
||||
}
|
||||
}).ToList (),
|
||||
familyName = id.FamilyName,
|
||||
fullName = id.FullName,
|
||||
resourceId = id.ResourceId
|
||||
};
|
||||
}
|
||||
|
||||
// PRProperties
|
||||
if (type == typeof (PRProperties))
|
||||
{
|
||||
PRProperties prop = (PRProperties)obj;
|
||||
return new {
|
||||
displayName = prop.DisplayName,
|
||||
publisherDisplayName = prop.Publisher,
|
||||
description = prop.Description,
|
||||
logo = prop.Logo,
|
||||
framework = prop.Framework,
|
||||
resourcePackage = prop.ResourcePackage
|
||||
};
|
||||
}
|
||||
|
||||
// PRPrerequisites
|
||||
if (type == typeof (PRPrerequisites))
|
||||
{
|
||||
PRPrerequisites pre = (PRPrerequisites)obj;
|
||||
return new {
|
||||
osMinVersion = pre.OSMinVersion,
|
||||
osMaxVersionTested = pre.OSMaxVersionTested,
|
||||
_osMinVersion = pre.OSMinVersionDescription,
|
||||
_osMaxVersionTested = pre.OSMaxVersionDescription
|
||||
};
|
||||
}
|
||||
|
||||
// PRCapabilities
|
||||
if (type == typeof (PRCapabilities))
|
||||
{
|
||||
PRCapabilities caps = (PRCapabilities)obj;
|
||||
return new {
|
||||
capabilities = caps.Capabilities,
|
||||
deviceCapabilities = caps.DeviceCapabilities
|
||||
};
|
||||
}
|
||||
|
||||
// PRDependencies
|
||||
if (type == typeof (PRDependencies))
|
||||
{
|
||||
PRDependencies deps = (PRDependencies)obj;
|
||||
return deps.Select (e => new {
|
||||
name = e.Name,
|
||||
publisher = e.Publisher,
|
||||
minVersion = e.Version.ToString ()
|
||||
}).ToList ();
|
||||
}
|
||||
|
||||
// PRApplications (集合)
|
||||
if (type == typeof (PRApplications))
|
||||
{
|
||||
PRApplications apps = (PRApplications)obj;
|
||||
return apps.Select (e => SerializeObject (e, pr, filterBase64)).ToList ();
|
||||
}
|
||||
|
||||
// PRApplication (单个应用)
|
||||
if (type == typeof (PRApplication))
|
||||
{
|
||||
PRApplication app = (PRApplication)obj;
|
||||
var dict = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var kv in app)
|
||||
{
|
||||
if (kv.Key.IndexOf ("Base64", StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
continue;
|
||||
string value = app.NewAt (kv.Key, pr.EnablePri);
|
||||
if (string.IsNullOrWhiteSpace (value))
|
||||
value = app.At (kv.Key);
|
||||
dict [kv.Key] = value;
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
// IDictionary
|
||||
IDictionary dictObj = obj as IDictionary;
|
||||
if (dictObj != null)
|
||||
{
|
||||
var result = new Dictionary<string, object> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (DictionaryEntry entry in dictObj)
|
||||
{
|
||||
string key = entry.Key?.ToString ();
|
||||
if (string.IsNullOrEmpty (key)) continue;
|
||||
if (filterBase64 && key.EndsWith ("_Base64", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
result [key] = SerializeObject (entry.Value, pr, filterBase64);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// IEnumerable (非字符串)
|
||||
if (!(obj is string))
|
||||
{
|
||||
IEnumerable enumerable = obj as IEnumerable;
|
||||
if (enumerable != null)
|
||||
{
|
||||
var list = new List<object> ();
|
||||
foreach (var item in enumerable)
|
||||
list.Add (SerializeObject (item, pr, filterBase64));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
// 后备:反射属性
|
||||
var props = type.GetProperties (BindingFlags.Public | BindingFlags.Instance);
|
||||
var propDict = new Dictionary<string, object> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (prop.GetIndexParameters ().Length > 0) continue;
|
||||
string propName = prop.Name;
|
||||
if (filterBase64 && propName.EndsWith ("Base64", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
object val = prop.GetValue (obj, null);
|
||||
propDict [propName] = SerializeObject (val, pr, filterBase64);
|
||||
}
|
||||
return propDict;
|
||||
}
|
||||
}
|
||||
public static class ManifestReaderExt
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取用于 CLI 输出的 JSON 对象(与 PackageReaderExt.GetJsonObjectForCli 结构一致)。
|
||||
/// </summary>
|
||||
public static object GetJsonObjectForCli (this ManifestReader mr)
|
||||
{
|
||||
var id = mr.Identity;
|
||||
var prop = mr.Properties;
|
||||
var pre = mr.Prerequisites;
|
||||
var apps = mr.Applications;
|
||||
var caps = mr.Capabilities;
|
||||
var deps = mr.Dependencies;
|
||||
var res = mr.Resources;
|
||||
|
||||
dynamic obj = new {
|
||||
valid = mr.IsValid,
|
||||
type = mr.Type.ToOther (e => {
|
||||
switch ((PackageType)e)
|
||||
{
|
||||
case PackageType.Appx: return "appx";
|
||||
case PackageType.Bundle: return "bundle";
|
||||
default:
|
||||
case PackageType.Unknown: return "unknown";
|
||||
}
|
||||
}),
|
||||
role = mr.Role.ToOther (o => {
|
||||
switch ((PackageRole)o)
|
||||
{
|
||||
case PackageRole.Application: return "application";
|
||||
case PackageRole.Framework: return "framework";
|
||||
case PackageRole.Resource: return "resource";
|
||||
default:
|
||||
case PackageRole.Unknown: return "unknown";
|
||||
}
|
||||
}),
|
||||
identity = new {
|
||||
name = id.Name,
|
||||
publisher = id.Publisher,
|
||||
version = id.Version.Expression,
|
||||
architecture = id.ProcessArchitecture.Select (e => {
|
||||
switch (e)
|
||||
{
|
||||
case Architecture.ARM: return "arm";
|
||||
case Architecture.ARM64: return "arm64";
|
||||
case Architecture.Neutral: return "neutral";
|
||||
case Architecture.x64: return "x64";
|
||||
case Architecture.x86: return "x86";
|
||||
default: return "unknown";
|
||||
}
|
||||
}).ToList (),
|
||||
familyName = id.FamilyName,
|
||||
fullName = id.FullName,
|
||||
resourceId = id.ResourceId
|
||||
},
|
||||
properties = new {
|
||||
displayName = prop.DisplayName,
|
||||
publisherDisplayName = prop.Publisher,
|
||||
description = prop.Description,
|
||||
logo = prop.Logo,
|
||||
framework = prop.Framework,
|
||||
resourcePackage = prop.ResourcePackage
|
||||
},
|
||||
prerequisite = new {
|
||||
osMinVersion = pre.OSMinVersion.ToString (),
|
||||
osMaxVersionTested = pre.OSMaxVersionTested.ToString (),
|
||||
_osMinVersion = pre.OSMinVersionDescription,
|
||||
_osMaxVersionTested = pre.OSMaxVersionDescription
|
||||
},
|
||||
resources = new {
|
||||
languages = res.Languages,
|
||||
scales = res.Scales,
|
||||
dxFeatureLevels = res.DXFeatures.Select (d => {
|
||||
switch (d)
|
||||
{
|
||||
case DXFeatureLevel.Level9: return 9;
|
||||
case DXFeatureLevel.Level10: return 10;
|
||||
case DXFeatureLevel.Level11: return 11;
|
||||
case DXFeatureLevel.Level12: return 12;
|
||||
default: return -1;
|
||||
}
|
||||
}).ToList ()
|
||||
},
|
||||
applications = apps.Select (e => {
|
||||
var dict = new Dictionary<string, string> ();
|
||||
foreach (var kv in e)
|
||||
{
|
||||
if (kv.Key.IndexOf ("Base64", StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
continue;
|
||||
string value = e.NewAt (kv.Key, mr.EnablePri);
|
||||
if (string.IsNullOrWhiteSpace (value))
|
||||
value = e.At (kv.Key);
|
||||
dict [kv.Key] = value;
|
||||
}
|
||||
return dict;
|
||||
}).ToList (),
|
||||
capabilities = new {
|
||||
capabilities = caps.Capabilities,
|
||||
deviceCapabilities = caps.DeviceCapabilities
|
||||
},
|
||||
dependencies = deps.Select (e => new {
|
||||
name = e.Name,
|
||||
publisher = e.Publisher,
|
||||
minVersion = e.Version.ToString ()
|
||||
})
|
||||
};
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从 ManifestReader 中获取指定路径的值。
|
||||
/// 支持格式:路径中可使用 '.' 或 ':' 分隔,支持索引器 '[index]',支持 '.length'。
|
||||
/// 大小写不敏感,自动去除首尾空白。
|
||||
/// 示例:
|
||||
/// "Identity" -> 返回 Identity 字典
|
||||
/// "Identity.Name" -> 返回名称
|
||||
/// "Properties.Publisher" -> 返回发布者显示名称(别名)
|
||||
/// "applications[0]" -> 返回第一个应用字典
|
||||
/// "applications.length" -> 返回应用个数
|
||||
/// "Applications[0].LogoBase64" -> 返回第一个应用的 LogoBase64
|
||||
/// </summary>
|
||||
public static object GetItem (this ManifestReader mr, string item)
|
||||
{
|
||||
if (mr == null) throw new ArgumentNullException ("mr");
|
||||
if (string.IsNullOrWhiteSpace (item)) return null;
|
||||
|
||||
string path = item.Trim ().Replace (':', '.');
|
||||
object result = ResolvePath (mr, path);
|
||||
return SerializeObject (result, mr, false);
|
||||
}
|
||||
|
||||
private static object ResolvePath (object target, string path)
|
||||
{
|
||||
if (target == null) return null;
|
||||
if (string.IsNullOrEmpty (path)) return target;
|
||||
|
||||
string [] segments = path.Split ('.');
|
||||
object current = target;
|
||||
|
||||
foreach (string seg in segments)
|
||||
{
|
||||
if (current == null) return null;
|
||||
|
||||
if (seg.Contains ("[") && seg.Contains ("]"))
|
||||
{
|
||||
int bracketStart = seg.IndexOf ('[');
|
||||
string propName = seg.Substring (0, bracketStart);
|
||||
string indexStr = seg.Substring (bracketStart + 1, seg.Length - bracketStart - 2);
|
||||
int index;
|
||||
if (!int.TryParse (indexStr, out index))
|
||||
return null;
|
||||
|
||||
object collection = GetPropertyValue (current, propName);
|
||||
if (collection == null) return null;
|
||||
current = GetIndexedValue (collection, index);
|
||||
}
|
||||
else if (string.Equals (seg, "length", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals (seg, "count", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
current = GetLength (current);
|
||||
}
|
||||
else
|
||||
{
|
||||
current = GetPropertyValue (current, seg);
|
||||
}
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
private static object GetPropertyValue (object target, string propName)
|
||||
{
|
||||
if (target == null) return null;
|
||||
Type type = target.GetType ();
|
||||
|
||||
// 根对象 ManifestReader 的属性名映射(不区分大小写)
|
||||
if (type == typeof (ManifestReader))
|
||||
{
|
||||
string mapped = null;
|
||||
string lower = propName.ToLowerInvariant ();
|
||||
switch (lower)
|
||||
{
|
||||
case "pkgid":
|
||||
case "id":
|
||||
case "identity": mapped = "Identity"; break;
|
||||
case "prop":
|
||||
case "properties": mapped = "Properties"; break;
|
||||
case "prerequistes":
|
||||
case "prerequisite":
|
||||
case "prerequisites": mapped = "Prerequisites"; break;
|
||||
case "res":
|
||||
case "resources": mapped = "Resources"; break;
|
||||
case "apps":
|
||||
case "applications": mapped = "Applications"; break;
|
||||
case "caps":
|
||||
case "capabilities": mapped = "Capabilities"; break;
|
||||
case "deps":
|
||||
case "dependencies": mapped = "Dependencies"; break;
|
||||
case "type": mapped = "Type"; break;
|
||||
case "role": mapped = "Role"; break;
|
||||
case "valid":
|
||||
case "isvalid": mapped = "IsValid"; break;
|
||||
case "file":
|
||||
case "filepath": mapped = "FilePath"; break;
|
||||
case "fileroot": mapped = "FileRoot"; break;
|
||||
}
|
||||
if (mapped != null)
|
||||
propName = mapped;
|
||||
}
|
||||
|
||||
// MRProperties 别名:Publisher / PublisherDisplayName 都映射到 Publisher 属性
|
||||
if (type == typeof (MRProperties))
|
||||
{
|
||||
if (string.Equals (propName, "Publisher", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals (propName, "PublisherDisplayName", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
propName = "Publisher";
|
||||
}
|
||||
}
|
||||
|
||||
// MRApplication 中以 Base64 结尾的属性 -> 调用 NewAtBase64
|
||||
if (type == typeof (MRApplication) && propName.EndsWith ("Base64", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
string baseKey = propName.Substring (0, propName.Length - 6);
|
||||
MRApplication app = (MRApplication)target;
|
||||
MethodInfo method = typeof (MRApplication).GetMethod ("NewAtBase64", BindingFlags.Public | BindingFlags.Instance);
|
||||
if (method != null)
|
||||
{
|
||||
return method.Invoke (app, new object [] { baseKey });
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// MRApplication 普通属性访问(字典键,大小写不敏感)
|
||||
if (type == typeof (MRApplication))
|
||||
{
|
||||
MRApplication app = (MRApplication)target;
|
||||
return app [propName];
|
||||
}
|
||||
|
||||
// 反射属性(不区分大小写)
|
||||
PropertyInfo prop = type.GetProperty (propName,
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
|
||||
if (prop != null)
|
||||
{
|
||||
return prop.GetValue (target, null);
|
||||
}
|
||||
|
||||
// 反射字段
|
||||
FieldInfo field = type.GetField (propName,
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
|
||||
if (field != null)
|
||||
{
|
||||
return field.GetValue (target);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object GetIndexedValue (object collection, int index)
|
||||
{
|
||||
if (collection == null) return null;
|
||||
|
||||
MRApplications apps = collection as MRApplications;
|
||||
if (apps != null)
|
||||
{
|
||||
if (index >= 0 && index < apps.Applications.Count)
|
||||
return apps.Applications [index];
|
||||
return null;
|
||||
}
|
||||
|
||||
IList list = collection as IList;
|
||||
if (list != null && index >= 0 && index < list.Count)
|
||||
return list [index];
|
||||
|
||||
PropertyInfo indexer = collection.GetType ().GetProperty ("Item", new [] { typeof (int) });
|
||||
if (indexer != null)
|
||||
return indexer.GetValue (collection, new object [] { index });
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static int? GetLength (object obj)
|
||||
{
|
||||
if (obj == null) return null;
|
||||
MRApplications apps = obj as MRApplications;
|
||||
if (apps != null) return apps.Applications.Count;
|
||||
MRDependencies deps = obj as MRDependencies;
|
||||
if (deps != null) return deps.Dependencies.Count;
|
||||
IList list = obj as IList;
|
||||
if (list != null) return list.Count;
|
||||
ICollection coll = obj as ICollection;
|
||||
if (coll != null) return coll.Count;
|
||||
return null;
|
||||
}
|
||||
|
||||
private static object SerializeObject (object obj, ManifestReader mr, bool filterBase64)
|
||||
{
|
||||
if (obj == null) return null;
|
||||
|
||||
Type type = obj.GetType ();
|
||||
if (type.IsPrimitive || obj is string || obj is decimal || obj is Enum)
|
||||
return obj;
|
||||
|
||||
// MRIdentity
|
||||
if (type == typeof (MRIdentity))
|
||||
{
|
||||
MRIdentity id = (MRIdentity)obj;
|
||||
return new {
|
||||
name = id.Name,
|
||||
publisher = id.Publisher,
|
||||
version = id.Version.Expression,
|
||||
architecture = id.ProcessArchitecture.Select (e => {
|
||||
switch (e)
|
||||
{
|
||||
case Architecture.ARM: return "arm";
|
||||
case Architecture.ARM64: return "arm64";
|
||||
case Architecture.Neutral: return "neutral";
|
||||
case Architecture.x64: return "x64";
|
||||
case Architecture.x86: return "x86";
|
||||
default: return "unknown";
|
||||
}
|
||||
}).ToList (),
|
||||
familyName = id.FamilyName,
|
||||
fullName = id.FullName,
|
||||
resourceId = id.ResourceId
|
||||
};
|
||||
}
|
||||
|
||||
// MRProperties
|
||||
if (type == typeof (MRProperties))
|
||||
{
|
||||
MRProperties prop = (MRProperties)obj;
|
||||
return new {
|
||||
displayName = prop.DisplayName,
|
||||
publisherDisplayName = prop.Publisher,
|
||||
description = prop.Description,
|
||||
logo = prop.Logo,
|
||||
framework = prop.Framework,
|
||||
resourcePackage = prop.ResourcePackage
|
||||
};
|
||||
}
|
||||
|
||||
// MRPrerequisites
|
||||
if (type == typeof (MRPrerequisites))
|
||||
{
|
||||
MRPrerequisites pre = (MRPrerequisites)obj;
|
||||
return new {
|
||||
osMinVersion = pre.OSMinVersion,
|
||||
osMaxVersionTested = pre.OSMaxVersionTested,
|
||||
_osMinVersion = pre.OSMinVersionDescription,
|
||||
_osMaxVersionTested = pre.OSMaxVersionDescription
|
||||
};
|
||||
}
|
||||
|
||||
// MRResources
|
||||
if (type == typeof (MRResources))
|
||||
{
|
||||
MRResources res = (MRResources)obj;
|
||||
return new {
|
||||
languages = res.Languages,
|
||||
scales = res.Scales,
|
||||
dxFeatureLevels = res.DXFeatures.Select (d => {
|
||||
switch (d)
|
||||
{
|
||||
case DXFeatureLevel.Level9: return 9;
|
||||
case DXFeatureLevel.Level10: return 10;
|
||||
case DXFeatureLevel.Level11: return 11;
|
||||
case DXFeatureLevel.Level12: return 12;
|
||||
default: return -1;
|
||||
}
|
||||
}).ToList ()
|
||||
};
|
||||
}
|
||||
|
||||
// MRCapabilities
|
||||
if (type == typeof (MRCapabilities))
|
||||
{
|
||||
MRCapabilities caps = (MRCapabilities)obj;
|
||||
return new {
|
||||
capabilities = caps.Capabilities,
|
||||
deviceCapabilities = caps.DeviceCapabilities
|
||||
};
|
||||
}
|
||||
|
||||
// MRDependencies
|
||||
if (type == typeof (MRDependencies))
|
||||
{
|
||||
MRDependencies deps = (MRDependencies)obj;
|
||||
return deps.Select (e => new {
|
||||
name = e.Name,
|
||||
publisher = e.Publisher,
|
||||
minVersion = e.Version.ToString ()
|
||||
}).ToList ();
|
||||
}
|
||||
|
||||
// MRApplications (集合)
|
||||
if (type == typeof (MRApplications))
|
||||
{
|
||||
MRApplications apps = (MRApplications)obj;
|
||||
return apps.Select (e => SerializeObject (e, mr, filterBase64)).ToList ();
|
||||
}
|
||||
|
||||
// MRApplication (单个应用)
|
||||
if (type == typeof (MRApplication))
|
||||
{
|
||||
MRApplication app = (MRApplication)obj;
|
||||
var dict = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var kv in app)
|
||||
{
|
||||
if (kv.Key.IndexOf ("Base64", StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
continue;
|
||||
string value = app.NewAt (kv.Key, mr.EnablePri);
|
||||
if (string.IsNullOrWhiteSpace (value))
|
||||
value = app.At (kv.Key);
|
||||
dict [kv.Key] = value;
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
// IDictionary
|
||||
IDictionary dictObj = obj as IDictionary;
|
||||
if (dictObj != null)
|
||||
{
|
||||
var result = new Dictionary<string, object> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (DictionaryEntry entry in dictObj)
|
||||
{
|
||||
string key = entry.Key?.ToString ();
|
||||
if (string.IsNullOrEmpty (key)) continue;
|
||||
if (filterBase64 && key.EndsWith ("_Base64", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
result [key] = SerializeObject (entry.Value, mr, filterBase64);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// IEnumerable (非字符串)
|
||||
if (!(obj is string))
|
||||
{
|
||||
IEnumerable enumerable = obj as IEnumerable;
|
||||
if (enumerable != null)
|
||||
{
|
||||
var list = new List<object> ();
|
||||
foreach (var item in enumerable)
|
||||
list.Add (SerializeObject (item, mr, filterBase64));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
// 后备:反射属性
|
||||
var props = type.GetProperties (BindingFlags.Public | BindingFlags.Instance);
|
||||
var propDict = new Dictionary<string, object> (StringComparer.OrdinalIgnoreCase);
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (prop.GetIndexParameters ().Length > 0) continue;
|
||||
string propName = prop.Name;
|
||||
if (filterBase64 && propName.EndsWith ("Base64", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
object val = prop.GetValue (obj, null);
|
||||
propDict [propName] = SerializeObject (val, mr, filterBase64);
|
||||
}
|
||||
return propDict;
|
||||
}
|
||||
}
|
||||
}
|
||||
859
PkgCLI/Program.cs
Normal file
@@ -0,0 +1,859 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DataUtils;
|
||||
using AppxPackage;
|
||||
using System.IO;
|
||||
using static AppxPackage.PackageManager;
|
||||
using Newtonsoft.Json;
|
||||
using Win32;
|
||||
|
||||
namespace PkgCLI
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public delegate _I_HResult PackageOperation (string filePath, IEnumerable<string> depUris, DeploymentOptions options, PackageProgressCallback progress = null);
|
||||
static readonly string [] helpArgs = new string [] {
|
||||
"/?",
|
||||
"-?",
|
||||
"help",
|
||||
"/help",
|
||||
"-help",
|
||||
"/h",
|
||||
"-h"
|
||||
};
|
||||
public static StringResXmlDoc res = new StringResXmlDoc (Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "locale\\pkgcli.xml"));
|
||||
static bool IsHelpParam (string arg) => helpArgs.Contains (arg.Normalize ());
|
||||
static void PrintVersion ()
|
||||
{
|
||||
var verFilePath = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "version");
|
||||
var verFileInst = new _I_File (verFilePath);
|
||||
var verstr = verFileInst.Content?.Trim () ?? "0.0.0.1";
|
||||
Console.WriteLine (String.Format (res.Get ("PKGCLI_VERSION"), verstr));
|
||||
}
|
||||
static void PrintTotalHelp ()
|
||||
{
|
||||
Console.WriteLine (res.Get ("PKGCLI_TOTALHELP"));
|
||||
}
|
||||
public static bool IsFilePathInList (List<string> filelist, string file)
|
||||
{
|
||||
foreach (var f in filelist)
|
||||
{
|
||||
if (f.NEquals (file)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void AddFiles (List<string> filelist, string file)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (file)) return;
|
||||
if (!File.Exists (file)) file = Path.Combine (Environment.CurrentDirectory, file);
|
||||
if (!File.Exists (file)) return;
|
||||
var ext = Path.GetExtension (file);
|
||||
if (ext.NEquals (".txt"))
|
||||
{
|
||||
var lines = File.ReadAllLines (file);
|
||||
foreach (var l in lines)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (l)) continue;
|
||||
var line = l.Trim ();
|
||||
if (!File.Exists (l)) line = Path.Combine (Path.GetDirectoryName (file), l);
|
||||
if (!File.Exists (line)) continue;
|
||||
if (!IsFilePathInList (filelist, line))
|
||||
filelist.Add (line);
|
||||
}
|
||||
}
|
||||
else if (!IsFilePathInList (filelist, file)) filelist.Add (file);
|
||||
}
|
||||
public static void AddNStringItems (List<string> strlist, string str)
|
||||
{
|
||||
var find = false;
|
||||
foreach (var l in strlist)
|
||||
if (l.NEquals (str))
|
||||
{
|
||||
find = true;
|
||||
break;
|
||||
}
|
||||
if (!find) strlist.Add (str);
|
||||
}
|
||||
public static void ToFormatString (PMPackageInfo pkg, IEnumerable<string> filter)
|
||||
{
|
||||
if (pkg == null) return;
|
||||
var labels = new List<string> ();
|
||||
var values = new List<string> ();
|
||||
|
||||
var id = pkg.Identity;
|
||||
labels.Add ("Identity:Name"); values.Add (id.Name);
|
||||
labels.Add ("Identity:Publisher"); values.Add (id.Publisher);
|
||||
labels.Add ("Identity:FamilyName"); values.Add (id.FamilyName);
|
||||
labels.Add ("Identity:FullName"); values.Add (id.FullName);
|
||||
labels.Add ("Identity:PublisherId"); values.Add (id.PublisherId);
|
||||
labels.Add ("Identity:ResourceId"); values.Add (id.ResourceId);
|
||||
labels.Add ("Identity:Version"); values.Add (id.Version?.ToString () ?? "");
|
||||
labels.Add ("Identity:ProcessArchitecture"); values.Add (string.Join (", ", id.ProcessArchitecture));
|
||||
|
||||
var prop = pkg.Properties;
|
||||
labels.Add ("Properties:DisplayName"); values.Add (prop.DisplayName);
|
||||
labels.Add ("Properties:Description"); values.Add (prop.Description);
|
||||
labels.Add ("Properties:Publisher"); values.Add (prop.Publisher);
|
||||
labels.Add ("Properties:Framework"); values.Add (prop.Framework.ToString ());
|
||||
labels.Add ("Properties:ResourcePackage"); values.Add (prop.ResourcePackage.ToString ());
|
||||
labels.Add ("Properties:Logo"); values.Add (prop.Logo);
|
||||
|
||||
labels.Add ("IsBundle"); values.Add (pkg.IsBundle.ToString ());
|
||||
labels.Add ("DevelopmentMode"); values.Add (pkg.DevelopmentMode.ToString ());
|
||||
labels.Add ("InstallLocation"); values.Add (pkg.InstallLocation);
|
||||
labels.Add ("Users"); values.Add (string.Join ("; ", pkg.Users));
|
||||
|
||||
Console.WriteLine ($"[{pkg.Identity.FullName}]");
|
||||
var indicesToOutput = new List<int> ();
|
||||
bool outputAll = (filter == null || !filter.Any ());
|
||||
|
||||
for (int i = 0; i < labels.Count; i++)
|
||||
{
|
||||
if (outputAll)
|
||||
{
|
||||
indicesToOutput.Add (i);
|
||||
}
|
||||
else
|
||||
{
|
||||
string label = labels [i];
|
||||
foreach (string patternRaw in filter)
|
||||
{
|
||||
if (MatchPattern (label, patternRaw))
|
||||
{
|
||||
indicesToOutput.Add (i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (indicesToOutput.Count == 0) return;
|
||||
int maxLabelLen = 0;
|
||||
foreach (int i in indicesToOutput)
|
||||
if (labels [i].Length > maxLabelLen) maxLabelLen = labels [i].Length;
|
||||
string format = "{0,-" + maxLabelLen + "} = {1}";
|
||||
foreach (int i in indicesToOutput)
|
||||
Console.WriteLine (format, labels [i], values [i]);
|
||||
}
|
||||
/// <summary>
|
||||
/// 匹配模式(忽略大小写,首尾空格,支持通配符 *)
|
||||
/// </summary>
|
||||
private static bool MatchPattern (string text, string pattern)
|
||||
{
|
||||
if (string.IsNullOrEmpty (pattern)) return true;
|
||||
pattern = pattern.Trim ();
|
||||
text = text ?? "";
|
||||
|
||||
if (pattern == "*") return true;
|
||||
// 忽略大小写
|
||||
var comparison = StringComparison.OrdinalIgnoreCase;
|
||||
|
||||
// 检查通配符位置
|
||||
bool startsWithStar = pattern.StartsWith ("*");
|
||||
bool endsWithStar = pattern.EndsWith ("*");
|
||||
|
||||
if (startsWithStar && endsWithStar)
|
||||
{
|
||||
// *middle* 包含子串
|
||||
string middle = pattern.Substring (1, pattern.Length - 2);
|
||||
return text.IndexOf (middle, comparison) >= 0;
|
||||
}
|
||||
else if (startsWithStar)
|
||||
{
|
||||
// *suffix 以 suffix 结尾
|
||||
string suffix = pattern.Substring (1);
|
||||
return text.EndsWith (suffix, comparison);
|
||||
}
|
||||
else if (endsWithStar)
|
||||
{
|
||||
// prefix* 以 prefix 开头
|
||||
string prefix = pattern.Substring (0, pattern.Length - 1);
|
||||
return text.StartsWith (prefix, comparison);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 精确匹配(忽略大小写)
|
||||
return string.Equals (text, pattern, comparison);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断字符串是否为有效的包全名 (Package Full Name)
|
||||
/// 格式: <IdentityName>_<Version>_<ProcessorArchitecture>_<ResourceId>_<PublisherId>
|
||||
/// 其中 ResourceId 可以为空(表现为连续两个下划线)
|
||||
/// </summary>
|
||||
public static bool IsPackageFullName (string fullName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (fullName)) return false;
|
||||
string [] parts = fullName.Split (new char [] { '_' }, StringSplitOptions.None);
|
||||
if (parts.Length != 5)
|
||||
return false;
|
||||
if (string.IsNullOrEmpty (parts [0])) // IdentityName
|
||||
return false;
|
||||
if (string.IsNullOrEmpty (parts [1])) // Version
|
||||
return false;
|
||||
if (string.IsNullOrEmpty (parts [2])) // ProcessorArchitecture
|
||||
return false;
|
||||
if (string.IsNullOrEmpty (parts [4])) // PublisherId
|
||||
return false;
|
||||
if (!parts [1].Contains ('.')) return false;
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断字符串是否为有效的包系列名 (Package Family Name)
|
||||
/// 格式: <IdentityName>_<PublisherId>
|
||||
/// </summary>
|
||||
public static bool IsPackageFamilyName (string familyName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (familyName)) return false;
|
||||
string [] parts = familyName.Split ('_');
|
||||
if (parts.Length != 2) return false;
|
||||
if (string.IsNullOrEmpty (parts [0]) || string.IsNullOrEmpty (parts [1]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 从 args[startIndex..] 生成安全的命令行字符串
|
||||
/// </summary>
|
||||
private static string BuildCommandLine (string [] args, int startIndex)
|
||||
{
|
||||
if (args.Length <= startIndex) return null;
|
||||
var sb = new StringBuilder ();
|
||||
for (int i = startIndex; i < args.Length; i++)
|
||||
{
|
||||
if (i > startIndex) sb.Append (' ');
|
||||
sb.Append (EscapeArgument (args [i]));
|
||||
}
|
||||
return sb.ToString ();
|
||||
}
|
||||
/// <summary>
|
||||
/// 按 Win32 命令行规则转义单个参数
|
||||
/// </summary>
|
||||
private static string EscapeArgument (string arg)
|
||||
{
|
||||
if (string.IsNullOrEmpty (arg)) return "\"\"";
|
||||
bool needQuotes = false;
|
||||
foreach (char c in arg)
|
||||
{
|
||||
if (char.IsWhiteSpace (c) || c == '"')
|
||||
{
|
||||
needQuotes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!needQuotes) return arg;
|
||||
var sb = new StringBuilder ();
|
||||
sb.Append ('"');
|
||||
foreach (char c in arg)
|
||||
{
|
||||
if (c == '"') sb.Append ("\\\"");
|
||||
else sb.Append (c);
|
||||
}
|
||||
sb.Append ('"');
|
||||
return sb.ToString ();
|
||||
}
|
||||
public static readonly string [] configItems = new string [] {
|
||||
"AppMetadataItems"
|
||||
};
|
||||
public static void RefreshConfig ()
|
||||
{
|
||||
var conf = new InitConfig (Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "config.ini"));
|
||||
var sSettings = conf.GetSection ("Settings");
|
||||
var kAppMetadatas = sSettings.GetKey ("PkgCLI:AppMetadataItems");
|
||||
var appMd = kAppMetadatas.ReadString ("Id,BackgroundColor,DisplayName,ForegroundText,ShortName,SmallLogo,Square44x44Logo");
|
||||
var appMdList = (appMd ?? "").Split (',', ';', '|');
|
||||
for (var i = 0; i < appMdList.Length; i ++)
|
||||
{
|
||||
appMdList [i] = appMdList [i].Trim ();
|
||||
}
|
||||
PackageReader.UpdateApplicationItems (appMdList);
|
||||
}
|
||||
static void Main (string [] args)
|
||||
{
|
||||
var currencoding = Console.OutputEncoding;
|
||||
try
|
||||
{
|
||||
//Console.OutputEncoding = Encoding.UTF8;
|
||||
if (args.Length <= 0 || args.Length >= 1 && IsHelpParam (args [0]))
|
||||
{
|
||||
PrintVersion ();
|
||||
PrintTotalHelp ();
|
||||
return;
|
||||
}
|
||||
var parser = new CliParsing ();
|
||||
parser.Params = new HashSet<CmdParamName> (new CmdParamName [] {
|
||||
new CmdParamName ("install", new string [] { "add" }),
|
||||
new CmdParamName ("register", new string [] { "reg" }),
|
||||
new CmdParamName ("update", new string [] { "up" }),
|
||||
new CmdParamName ("stage"),
|
||||
new CmdParamName ("remove", new string [] { "uninstall" }),
|
||||
new CmdParamName ("read"),
|
||||
new CmdParamName ("get"),
|
||||
new CmdParamName ("find"),
|
||||
new CmdParamName ("active", new string [] { "launch", "start", "activate" }),
|
||||
new CmdParamName ("config", new string [] { "conf" }),
|
||||
new CmdParamName ("version", new string [] { "ver" }),
|
||||
new CmdParamName ("help", new string [] { "?", "h" }),
|
||||
new CmdParamName ("developmode", new string [] { "develop" }),
|
||||
new CmdParamName ("forceappshutdown", new string [] { "forceshutdown" , "appshutdown", "forcesd", "force"}),
|
||||
new CmdParamName ("installallresources", new string [] {"allresources", "allres"}),
|
||||
new CmdParamName ("savexml"),
|
||||
new CmdParamName ("savejson"),
|
||||
new CmdParamName ("fullname"),
|
||||
new CmdParamName ("filter"),
|
||||
new CmdParamName ("package", new string [] { "pkg" }),
|
||||
new CmdParamName ("manifest", new string [] { "mani" }),
|
||||
new CmdParamName ("usepri", new string [] { "pri" }),
|
||||
new CmdParamName ("item"),
|
||||
new CmdParamName ("set"),
|
||||
new CmdParamName ("refresh"),
|
||||
new CmdParamName ("show"),
|
||||
new CmdParamName ("encoding", new string [] { "en", "charset", "encode" }),
|
||||
new CmdParamName ("yes", new string [] {"y", "agree"})
|
||||
});
|
||||
RefreshConfig ();
|
||||
var cmds = parser.Parse (args);
|
||||
if (cmds.ParamContains ("encoding"))
|
||||
{
|
||||
#region help text: encoding
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_ENCODING"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
try
|
||||
{
|
||||
var c = cmds.GetFromId ("encoding");
|
||||
var i = 0;
|
||||
var isint = false;
|
||||
Encoding en = null;
|
||||
try { i = Convert.ToInt32 (c.Value); isint = true; } catch { isint = false; }
|
||||
if (isint) en = Encoding.GetEncoding (i);
|
||||
else en = Encoding.GetEncoding (c.Value);
|
||||
Console.OutputEncoding = en;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine (String.Format (res.Get ("PKGCLI_WARNING_ENCODING"), ex.GetType (), ex.Message));
|
||||
Console.ResetColor ();
|
||||
}
|
||||
}
|
||||
if (CliPasingUtils.ParamsContainsOr (cmds, "install", "register", "update", "stage"))
|
||||
{
|
||||
#region help text: install register, update, stage
|
||||
PrintVersion ();
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_IRUS"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var options = DeploymentOptions.None;
|
||||
if (CliPasingUtils.ParamContains (cmds, "developmode")) options |= DeploymentOptions.DevelopmentMode;
|
||||
if (CliPasingUtils.ParamContains (cmds, "forceappshutdown")) options |= DeploymentOptions.ForceAppShutdown;
|
||||
if (CliPasingUtils.ParamContains (cmds, "installallresources")) options |= DeploymentOptions.InstallAllResources;
|
||||
var totallist = new List<Tuple<int, string>> ();
|
||||
var filelist = new List<string> ();
|
||||
foreach (var f in cmds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (f.Id))
|
||||
{
|
||||
var file = f.Value;
|
||||
AddFiles (filelist, file);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (f.Id)
|
||||
{
|
||||
case "install":
|
||||
case "register":
|
||||
case "update":
|
||||
case "stage":
|
||||
AddFiles (filelist, f.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var f in filelist) totallist.Add (new Tuple<int, string> (0, f));
|
||||
if (cmds.ParamContains ("register") && cmds.ParamContains ("fullname"))
|
||||
{
|
||||
foreach (var f in cmds)
|
||||
{
|
||||
if (f.Id.NEquals ("fullname"))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (f.Value))
|
||||
{
|
||||
totallist.Add (new Tuple<int, string> (1, f.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
PackageOperation ope = null;
|
||||
if (cmds.ParamContains ("install")) ope = AddPackage;
|
||||
else if (cmds.ParamContains ("register")) ope = RegisterPackage;
|
||||
else if (cmds.ParamContains ("update")) ope = UpdatePackage;
|
||||
else if (cmds.ParamContains ("stage")) ope = StagePackage;
|
||||
for (int i = 0; i < totallist.Count; i++)
|
||||
{
|
||||
Console.WriteLine ();
|
||||
var file = totallist [i];
|
||||
Console.Write ("\r" + String.Format (res.Get ("PKGCLI_PROGRESS_OPERATION"), i + 1, totallist.Count));
|
||||
var hr = new _I_HResult (0);
|
||||
var tempope = ope;
|
||||
if (file.Item1 == 1)
|
||||
{
|
||||
if (cmds.ParamContains ("register")) tempope = RegisterPackageByFullName;
|
||||
}
|
||||
hr = tempope (file.Item2, null, options, prog => {
|
||||
var str = "\r" + String.Format (res.Get ("PKGCLI_PROGRESS_OPERATION_WITHPROGRESS"), i + 1, totallist.Count, prog, (int)((i + prog * 0.01) / totallist.Count * 100));
|
||||
Console.Write (str);
|
||||
});
|
||||
if (hr.Failed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Write ("\n" + String.Format (res.Get ("PKGCLI_ERROR_IRUS_EXCEPTION"), i + 1, file.Item2, "0x" + hr.HResult.ToString ("X8"), hr.Message));
|
||||
Console.ResetColor ();
|
||||
}
|
||||
}
|
||||
Console.WriteLine ("\n" + res.Get ("PKGCLI_COMPLETE_OPERATION"));
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("remove"))
|
||||
{
|
||||
#region help text: remove
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_REMOVE"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var list = new List<string> ();
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (c.Id) || c.Id.NEquals ("remove"))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace (c.Value)) list.Add (c.Value);
|
||||
}
|
||||
}
|
||||
var agreecmd = cmds.GetFromId ("yes");
|
||||
bool? agree = null;
|
||||
if (agreecmd != null) agree = true;
|
||||
if (agree == null)
|
||||
{
|
||||
if (list.Count <= 0) agree = true;
|
||||
else
|
||||
{
|
||||
Console.Write (String.Format (res.Get ("PKGCLI_ASK_REMOVE"), list.Count));
|
||||
var userinput = Console.ReadLine ();
|
||||
if (userinput.NEquals ("y") || userinput.NEquals ("yes")) agree = true;
|
||||
else agree = false;
|
||||
}
|
||||
}
|
||||
if (agree == false) throw new OperationCanceledException (res.Get ("PKGCLI_ERROR_USERABORT"));
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
Console.WriteLine ();
|
||||
var file = list [i];
|
||||
Console.Write ("\r" + String.Format (res.Get ("PKGCLI_PROGRESS_OPERATION"), i + 1, list.Count));
|
||||
var hr = RemovePackage (file, prog => {
|
||||
var str = "\r" + String.Format (res.Get ("PKGCLI_PROGRESS_OPERATION_WITHPROGRESS"), i + 1, list.Count, prog, (int)((i + prog * 0.01) / list.Count * 100));
|
||||
Console.Write (str);
|
||||
});
|
||||
if (hr.Failed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Write ("\n" + String.Format (res.Get ("PKGCLI_ERROR_IRUS_EXCEPTION"), i + 1, file, "0x" + hr.HResult.ToString ("X8"), hr.Message));
|
||||
Console.ResetColor ();
|
||||
}
|
||||
}
|
||||
Console.WriteLine ("\n" + res.Get ("PKGCLI_COMPLETE_OPERATION"));
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("get"))
|
||||
{
|
||||
#region help text: get
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_GET"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var filter = new HashSet<string> (new NormalizeStringComparer ());
|
||||
if (cmds.ParamContains ("filter"))
|
||||
{
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (c.Id.NEmpty () || c.Id.NEquals ("filter"))
|
||||
{
|
||||
var items = c.Value.Split (',', ';');
|
||||
foreach (var i in items) filter.Add (i);
|
||||
}
|
||||
}
|
||||
}
|
||||
var hr = GetPackages ();
|
||||
if (hr.Item1.Failed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine (String.Format (res.Get ("PKGCLI_ERROR_EXCEPTION"), "0x" + hr.Item1.HResult.ToString ("X8"), hr.Item1.Message));
|
||||
Console.ResetColor ();
|
||||
return;
|
||||
}
|
||||
foreach (var i in hr.Item2)
|
||||
{
|
||||
ToFormatString (i, filter);
|
||||
Console.WriteLine ();
|
||||
}
|
||||
Console.WriteLine ("[Statistic]");
|
||||
Console.WriteLine ($"Length = {hr.Item2.Count}");
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("find"))
|
||||
{
|
||||
#region help text: find
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_FIND"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var names = new List<string> ();
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (c.Id.NEmpty ())
|
||||
{
|
||||
if (c.Value.NEmpty ()) continue;
|
||||
names.Add (c.Value);
|
||||
}
|
||||
}
|
||||
var filter = new HashSet<string> (new NormalizeStringComparer ());
|
||||
if (cmds.ParamContains ("filter"))
|
||||
{
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (c.Id.NEquals ("filter"))
|
||||
{
|
||||
var items = c.Value.Split (',', ';');
|
||||
foreach (var i in items) filter.Add (i);
|
||||
}
|
||||
}
|
||||
}
|
||||
var result = new List<Tuple<string, Tuple<_I_HResult, List<PMPackageInfo>>>> ();
|
||||
if (names.Count == 2)
|
||||
{
|
||||
result.Add (new Tuple<string, Tuple<_I_HResult, List<PMPackageInfo>>> (names [0], FindPackage (names [0], names [1])));
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var n in names)
|
||||
{
|
||||
if (IsPackageFullName (n))
|
||||
{
|
||||
result.Add (new Tuple<string, Tuple<_I_HResult, List<PMPackageInfo>>> (n, FindPackageByFullName (n)));
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add (new Tuple<string, Tuple<_I_HResult, List<PMPackageInfo>>> (n, FindPackage (n)));
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var r in result)
|
||||
{
|
||||
foreach (var l in r.Item2.Item2)
|
||||
{
|
||||
ToFormatString (l, filter);
|
||||
Console.WriteLine ();
|
||||
}
|
||||
Console.WriteLine ($"[Statistic:{r.Item1}]");
|
||||
Console.WriteLine ($"HResult = {"0x" + r.Item2.Item1.HResult.ToString ("X8")}");
|
||||
Console.WriteLine ($"Message = {Escape.ToEscape (r.Item2.Item1.Message)}");
|
||||
Console.WriteLine ($"Length = {r.Item2.Item2.Count}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("active"))
|
||||
{
|
||||
#region help text: active
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_ACTIVATE"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (c.Id) || c.Id.NEquals ("active"))
|
||||
{
|
||||
if (c.Value.NEmpty ()) continue;
|
||||
var i = 0;
|
||||
for (i = 0; i < args.Length; i++)
|
||||
{
|
||||
if (args [i].NNormalize ().IndexOf (c.Value.NNormalize ()) >= 0) break;
|
||||
}
|
||||
var hr = ActiveApp (c.Value, BuildCommandLine (args, i + 1));
|
||||
if (hr.Succeeded) Console.WriteLine (res.Get ("PKGCLI_COMPLETE_DONE"));
|
||||
else
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Write (String.Format (res.Get ("PKGCLI_ERROR_EXCEPTION"), "0x" + hr.HResult.ToString ("X8"), hr.Message));
|
||||
Console.ResetColor ();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("read"))
|
||||
{
|
||||
#region help text: read
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_READ"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var filename = "";
|
||||
var readtype = "";
|
||||
var savename = "";
|
||||
var savetype = "default";
|
||||
CommandParam cmd = null;
|
||||
cmd = cmds.GetFromId ("manifest");
|
||||
if (cmd != null)
|
||||
{
|
||||
filename = cmd.Value;
|
||||
readtype = "manifest";
|
||||
}
|
||||
cmd = cmds.GetFromId ("package");
|
||||
if (cmd != null)
|
||||
{
|
||||
filename = cmd.Value;
|
||||
readtype = "package";
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace (filename) || !File.Exists (filename))
|
||||
{
|
||||
cmd = cmds.GetFromId ("");
|
||||
if (cmd != null)
|
||||
{
|
||||
if (File.Exists (cmd.Value))
|
||||
{
|
||||
filename = cmd.Value;
|
||||
if (string.IsNullOrWhiteSpace (readtype))
|
||||
{
|
||||
var ext = Path.GetExtension (cmd.Value);
|
||||
if (ext.NEquals (".xml") || ext.NEquals (".appxpackage") || ext.NEquals (".msixpackage"))
|
||||
readtype = "manifest";
|
||||
else readtype = "package";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace (filename) || !File.Exists (filename))
|
||||
{
|
||||
cmd = cmds.GetFromId ("read");
|
||||
if (cmd != null)
|
||||
{
|
||||
if (File.Exists (cmd.Value))
|
||||
{
|
||||
filename = cmd.Value;
|
||||
if (string.IsNullOrWhiteSpace (readtype))
|
||||
{
|
||||
var ext = Path.GetExtension (cmd.Value);
|
||||
if (ext.NEquals (".xml") || ext.NEquals (".appxpackage") || ext.NEquals (".msixpackage"))
|
||||
readtype = "manifest";
|
||||
else readtype = "package";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace (filename) || !File.Exists (filename)) throw new FileNotFoundException ();
|
||||
cmd = cmds.GetFromId ("savexml");
|
||||
if (cmd != null)
|
||||
{
|
||||
savename = cmd.Value;
|
||||
savetype = "xml";
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace (savename))
|
||||
{
|
||||
cmd = cmds.GetFromId ("savejson");
|
||||
if (cmd != null)
|
||||
{
|
||||
savename = cmd.Value;
|
||||
savetype = "json";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace (savename))
|
||||
{
|
||||
savetype = "ini";
|
||||
}
|
||||
switch (readtype)
|
||||
{
|
||||
default:
|
||||
case "package":
|
||||
{
|
||||
var pr = new PackageReader (filename);
|
||||
pr.UsePri = cmds.ParamContains ("usepri");
|
||||
pr.EnablePri = true;
|
||||
switch (savetype)
|
||||
{
|
||||
default:
|
||||
case "default":
|
||||
{
|
||||
if (cmds.ParamContains ("item"))
|
||||
{
|
||||
object value = pr.GetItem (cmds.GetFromId ("item").Value);
|
||||
if (value is string) Console.WriteLine (value as string);
|
||||
else if (value is DataUtils.Version) Console.WriteLine (value.ToString ());
|
||||
else Console.WriteLine (JsonConvert.SerializeObject (value, Formatting.Indented));
|
||||
}
|
||||
else Console.WriteLine (JsonConvert.SerializeObject (pr.GetJsonObjectForCli (), Formatting.Indented));
|
||||
}
|
||||
break;
|
||||
case "json":
|
||||
{
|
||||
var res = pr.SaveJsonFileCS (savename);
|
||||
if (res) Console.WriteLine ("Succeeded!");
|
||||
else Console.WriteLine ("Failed.");
|
||||
}
|
||||
break;
|
||||
case "xml":
|
||||
{
|
||||
var res = pr.SaveXmlFileCS (savename);
|
||||
if (res) Console.WriteLine ("Succeeded!");
|
||||
else Console.WriteLine ("Failed.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "manifest":
|
||||
{
|
||||
var mr = new ManifestReader (filename);
|
||||
mr.UsePri = cmds.ParamContains ("usepri");
|
||||
mr.EnablePri = true;
|
||||
if (cmds.ParamContains ("item"))
|
||||
{
|
||||
object value = mr.GetItem (cmds.GetFromId ("item").Value);
|
||||
if (value is string) Console.WriteLine (value as string);
|
||||
else if (value is DataUtils.Version) Console.WriteLine (value.ToString ());
|
||||
else Console.WriteLine (JsonConvert.SerializeObject (value, Formatting.Indented));
|
||||
}
|
||||
else Console.WriteLine (JsonConvert.SerializeObject (mr.GetJsonObjectForCli (), Formatting.Indented));
|
||||
//Console.WriteLine (mr.BuildJsonText ());
|
||||
}
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("config"))
|
||||
{
|
||||
#region help text: config
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_CONFIG"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
var conf = new InitConfig (Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "config.ini"));
|
||||
var sSettings = conf.GetSection ("Settings");
|
||||
if (cmds.ParamContains ("refresh")) RefreshConfig ();
|
||||
else if (cmds.ParamContains ("set"))
|
||||
{
|
||||
var cmd = cmds.GetFromId ("set");
|
||||
var key = cmd.Value;
|
||||
if (string.IsNullOrWhiteSpace (key)) throw new InvalidOperationException (Program.res.Get ("PKGCLI_ERROR_KEYSTRINGEMPTY"));
|
||||
var isfind = false;
|
||||
foreach (var i in configItems)
|
||||
{
|
||||
if (i.NEquals (key))
|
||||
{
|
||||
isfind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isfind) throw new KeyNotFoundException (String.Format (Program.res.Get("PKGCLI_ERROR_CANNOTFINDKEY"), key));
|
||||
var valuelist = new List<string> ();
|
||||
foreach (var c in cmds)
|
||||
{
|
||||
if (c.Id.NEmpty ())
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (c.Value)) continue;
|
||||
valuelist.Add (c.Value);
|
||||
}
|
||||
}
|
||||
var res = sSettings.GetKey ($"PkgCLI:{key.Trim ()}").Set (valuelist.Join (","));
|
||||
if (res) Console.WriteLine ("Succeeded!");
|
||||
else Console.WriteLine ("Failed.");
|
||||
}
|
||||
else if (cmds.ParamContains ("show"))
|
||||
{
|
||||
var cmd = cmds.GetFromId ("show");
|
||||
var key = cmd.Value;
|
||||
if (string.IsNullOrWhiteSpace (key))
|
||||
{
|
||||
var dict = new Dictionary<string, string> ();
|
||||
foreach (var k in configItems)
|
||||
{
|
||||
var cKey = sSettings.GetKey ($"PkgCLI:{k}");
|
||||
dict [k] = cKey.ReadString ("(use default)");
|
||||
}
|
||||
Console.WriteLine (dict.FormatDictionaryAligned ("="));
|
||||
return;
|
||||
}
|
||||
var isfind = false;
|
||||
foreach (var i in configItems)
|
||||
{
|
||||
if (i.NEquals (key))
|
||||
{
|
||||
isfind = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isfind) throw new KeyNotFoundException (String.Format (Program.res.Get ("PKGCLI_ERROR_CANNOTFINDKEY"), key));
|
||||
var value = sSettings.GetKey ($"PkgCLI:{key.Trim ()}").ReadString ("(use default)");
|
||||
Console.WriteLine (value);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (cmds.ParamsContainsOr ("version"))
|
||||
{
|
||||
#region help text: version
|
||||
if (CliPasingUtils.ParamContains (cmds, "help"))
|
||||
{
|
||||
PrintVersion ();
|
||||
Console.WriteLine (res.Get ("PKGCLI_HELP_VERSION"));
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
PrintVersion ();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("Invalid args. Please use \"/help\" to get help.");
|
||||
Console.ResetColor ();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine (String.Format (res.Get ("PKGCLI_ERROR_FINALEXCEPTION"), ex.GetType (), ex.Message, ex.StackTrace));
|
||||
}
|
||||
finally
|
||||
{
|
||||
Console.ResetColor ();
|
||||
Console.OutputEncoding = currencoding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
PkgCLI/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle ("PkgCLI")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("PkgCLI")]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid ("8d333af6-e901-4301-b3ee-923088e81062")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion ("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("1.0.0.0")]
|
||||
112
PkgCLI/Text.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace System
|
||||
{
|
||||
namespace Text
|
||||
{
|
||||
public static class Escape
|
||||
{
|
||||
/// <summary>按 JSON 规范对字符串进行转义。</summary>
|
||||
/// <param name="input">原始字符串。</param>
|
||||
/// <returns>转义后的 JSON 字符串字面量内容(不含外围双引号)。</returns>
|
||||
public static string ToEscape (string input)
|
||||
{
|
||||
if (input == null) throw new ArgumentNullException (nameof (input));
|
||||
if (input.Length == 0) return string.Empty;
|
||||
|
||||
StringBuilder sb = new StringBuilder (input.Length);
|
||||
foreach (char c in input)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '"': sb.Append ("\\\""); break;
|
||||
case '\\': sb.Append ("\\\\"); break;
|
||||
case '\b': sb.Append ("\\b"); break;
|
||||
case '\f': sb.Append ("\\f"); break;
|
||||
case '\n': sb.Append ("\\n"); break;
|
||||
case '\r': sb.Append ("\\r"); break;
|
||||
case '\t': sb.Append ("\\t"); break;
|
||||
default:
|
||||
// 控制字符 (U+0000 - U+001F) 需转义为 \uXXXX
|
||||
if (c <= 0x1F)
|
||||
{
|
||||
sb.Append ("\\u");
|
||||
sb.Append (((int)c).ToString ("X4"));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append (c);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return sb.ToString ();
|
||||
}
|
||||
/// <summary>按 JSON 规范反转义字符串。</summary>
|
||||
/// <param name="input">转义后的 JSON 字符串内容(不含外围双引号)。</param>
|
||||
/// <returns>原始字符串。</returns>
|
||||
/// <exception cref="FormatException">遇到非法转义序列时抛出。</exception>
|
||||
public static string Unescape (string input)
|
||||
{
|
||||
if (input == null) throw new ArgumentNullException (nameof (input));
|
||||
if (input.Length == 0) return string.Empty;
|
||||
|
||||
StringBuilder sb = new StringBuilder (input.Length);
|
||||
int i = 0;
|
||||
while (i < input.Length)
|
||||
{
|
||||
char c = input [i];
|
||||
if (c == '\\')
|
||||
{
|
||||
i++;
|
||||
if (i >= input.Length)
|
||||
throw new FormatException ("字符串末尾包含不完整的转义序列。");
|
||||
|
||||
char next = input [i];
|
||||
switch (next)
|
||||
{
|
||||
case '"': sb.Append ('"'); break;
|
||||
case '\\': sb.Append ('\\'); break;
|
||||
case '/': sb.Append ('/'); break; // 允许转义斜杠
|
||||
case 'b': sb.Append ('\b'); break;
|
||||
case 'f': sb.Append ('\f'); break;
|
||||
case 'n': sb.Append ('\n'); break;
|
||||
case 'r': sb.Append ('\r'); break;
|
||||
case 't': sb.Append ('\t'); break;
|
||||
case 'u':
|
||||
i++;
|
||||
if (i + 4 > input.Length)
|
||||
throw new FormatException ("\\u 转义后必须跟随 4 位十六进制数字。");
|
||||
|
||||
string hex = input.Substring (i, 4);
|
||||
int codePoint; // 先声明变量,兼容 C# 5/6
|
||||
if (!int.TryParse (hex,
|
||||
NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture,
|
||||
out codePoint))
|
||||
{
|
||||
throw new FormatException (string.Format ("无效的 Unicode 转义序列: \\u{0}", hex));
|
||||
}
|
||||
|
||||
sb.Append ((char)codePoint);
|
||||
i += 3; // 循环末尾会再加1,因此这里只增加3
|
||||
break;
|
||||
default:
|
||||
throw new FormatException (string.Format ("未识别的转义序列: \\{0}", next));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append (c);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return sb.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
PkgCLI/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net40" />
|
||||
</packages>
|
||||
@@ -142,6 +142,11 @@ namespace PriFileFormat
|
||||
comStream.SetSize (value);
|
||||
}
|
||||
}
|
||||
public override void Close ()
|
||||
{
|
||||
comStream = null;
|
||||
base.Close ();
|
||||
}
|
||||
~ComStreamWrapper () { comStream = null;}
|
||||
}
|
||||
}
|
||||
|
||||
213
PriFileFormat/DataTree.cs
Normal file
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PriFileFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// 树节点接口
|
||||
/// </summary>
|
||||
public interface ITreeNode: IDisposable, IEnumerable<ITreeNode>
|
||||
{
|
||||
string Name { get; set; }
|
||||
string Value { get; set; }
|
||||
ITreeNode Parent { get; set; }
|
||||
IList<ITreeNode> Children { get; }
|
||||
ITreeNode AddChild (string name, string value);
|
||||
IEnumerable<ITreeNode> DescendantsAndSelf ();
|
||||
ITreeNode Find (string name);
|
||||
IEnumerable<ITreeNode> FindAll (string name);
|
||||
}
|
||||
/// <summary>
|
||||
/// 树节点实现
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class TreeNode: ITreeNode
|
||||
{
|
||||
// 节点基本属性
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
// 父节点引用
|
||||
[XmlIgnore]
|
||||
public TreeNode Parent { get; set; }
|
||||
ITreeNode ITreeNode.Parent
|
||||
{
|
||||
get { return Parent; }
|
||||
set { Parent = (TreeNode)value; }
|
||||
}
|
||||
// 子节点列表
|
||||
[XmlArray ("Children")]
|
||||
[XmlArrayItem ("Node")]
|
||||
public IList<TreeNode> Children { get; set; }
|
||||
IList<ITreeNode> ITreeNode.Children
|
||||
{
|
||||
get
|
||||
{
|
||||
List<ITreeNode> list = new List<ITreeNode> ();
|
||||
foreach (TreeNode node in Children)
|
||||
{
|
||||
list.Add (node);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
public TreeNode ()
|
||||
{
|
||||
Name = "";
|
||||
Value = "";
|
||||
Children = new List<TreeNode> ();
|
||||
Parent = null;
|
||||
}
|
||||
public TreeNode (string name, string value)
|
||||
{
|
||||
Name = name;
|
||||
Value = value;
|
||||
Children = new List<TreeNode> ();
|
||||
Parent = null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加子节点
|
||||
/// </summary>
|
||||
public TreeNode AddChild (string name, string value)
|
||||
{
|
||||
TreeNode child = new TreeNode (name, value);
|
||||
child.Parent = this;
|
||||
Children.Add (child);
|
||||
return child;
|
||||
}
|
||||
ITreeNode ITreeNode.AddChild (string name, string value)
|
||||
{
|
||||
return AddChild (name, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 深度优先遍历节点,包括自身
|
||||
/// </summary>
|
||||
public IEnumerable<TreeNode> DescendantsAndSelf ()
|
||||
{
|
||||
yield return this;
|
||||
foreach (TreeNode child in Children)
|
||||
{
|
||||
foreach (TreeNode desc in child.DescendantsAndSelf ())
|
||||
{
|
||||
yield return desc;
|
||||
}
|
||||
}
|
||||
}
|
||||
IEnumerable<ITreeNode> ITreeNode.DescendantsAndSelf ()
|
||||
{
|
||||
foreach (TreeNode n in DescendantsAndSelf ())
|
||||
{
|
||||
yield return n;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 查找第一个匹配节点
|
||||
/// </summary>
|
||||
public TreeNode Find (string name)
|
||||
{
|
||||
foreach (TreeNode n in DescendantsAndSelf ())
|
||||
{
|
||||
if (n.Name == name)
|
||||
return n;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
ITreeNode ITreeNode.Find (string name)
|
||||
{
|
||||
return Find (name);
|
||||
}
|
||||
/// <summary>
|
||||
/// 查找所有匹配节点
|
||||
/// </summary>
|
||||
public IEnumerable<TreeNode> FindAll (string name)
|
||||
{
|
||||
foreach (TreeNode n in DescendantsAndSelf ())
|
||||
{
|
||||
if (n.Name == name)
|
||||
yield return n;
|
||||
}
|
||||
}
|
||||
IEnumerable<ITreeNode> ITreeNode.FindAll (string name)
|
||||
{
|
||||
foreach (TreeNode n in FindAll (name))
|
||||
{
|
||||
yield return n;
|
||||
}
|
||||
}
|
||||
#region IEnumerable<TreeNode>
|
||||
public IEnumerator<TreeNode> GetEnumerator ()
|
||||
{
|
||||
return Children.GetEnumerator ();
|
||||
}
|
||||
IEnumerator IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return GetEnumerator ();
|
||||
}
|
||||
#endregion
|
||||
#region IEnumerable<ITreeNode> 显示实现
|
||||
IEnumerator<ITreeNode> IEnumerable<ITreeNode>.GetEnumerator ()
|
||||
{
|
||||
foreach (TreeNode child in Children)
|
||||
{
|
||||
yield return child;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region XML 序列化
|
||||
public void SaveToXml (string filePath)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer (typeof (TreeNode));
|
||||
using (StreamWriter writer = new StreamWriter (filePath, false, System.Text.Encoding.UTF8))
|
||||
{
|
||||
serializer.Serialize (writer, this);
|
||||
}
|
||||
}
|
||||
|
||||
public static TreeNode LoadFromXml (string filePath)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer (typeof (TreeNode));
|
||||
using (StreamReader reader = new StreamReader (filePath, System.Text.Encoding.UTF8))
|
||||
{
|
||||
TreeNode root = (TreeNode)serializer.Deserialize (reader);
|
||||
SetParentRecursive (root, null);
|
||||
return root;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetParentRecursive (TreeNode node, TreeNode parent)
|
||||
{
|
||||
node.Parent = parent;
|
||||
foreach (TreeNode child in node.Children)
|
||||
{
|
||||
SetParentRecursive (child, node);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region IDisposable
|
||||
public virtual void Dispose ()
|
||||
{
|
||||
foreach (TreeNode child in Children)
|
||||
{
|
||||
child.Dispose ();
|
||||
}
|
||||
Children.Clear ();
|
||||
Parent = null;
|
||||
Children = null;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
/// <summary>
|
||||
/// 树根节点
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class TreeRoot: TreeNode
|
||||
{
|
||||
public TreeRoot ()
|
||||
: base ("Root", "")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,11 +174,15 @@ namespace PriFileFormat
|
||||
}
|
||||
~HierarchicalSchemaSection ()
|
||||
{
|
||||
Version = null;
|
||||
foreach (var item in Items) { item.Parent = null; }
|
||||
foreach (var scope in Scopes) { scope.Parent = null; }
|
||||
Scopes = null;
|
||||
Items = null;
|
||||
try
|
||||
{
|
||||
Version = null;
|
||||
foreach (var item in Items) { item.Parent = null; }
|
||||
foreach (var scope in Scopes) { scope.Parent = null; }
|
||||
Scopes = null;
|
||||
Items = null;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
// Checksum computation is buggy for some files
|
||||
|
||||
|
||||
@@ -35,6 +35,25 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
||||
@@ -30,6 +30,25 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
13
README.md
@@ -12,12 +12,21 @@
|
||||
<p>Download the latest release from the Releases section.</p>
|
||||
<a href="https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/releases" target="_blank"><img src="https://img.shields.io/github/v/release/modernw/App-Installer-For-Windows-8.x-Reset"></a>
|
||||
<p>Note: There is no official release yet, but the test version still does not have the Pre-released label; this is for testing upgrade functionality. Once the official release is complete, previous versions will be marked as Pre-released.</p>
|
||||
<p>Note 2: Ensure that .NET Framework 4.6 is installed on your computer, as the runtime libraries automatically installed by the installer may not actually be installed on your system. Therefore, after completing the installation via the installer, be sure to download and run the .NET Framework 4.6 runtime library installer again.</p>
|
||||
<p>Note 3: The x86 runtime library must be installed, as the program itself is compiled for the x86 architecture. (Unless the program is compiled for the ARM architecture, in which case the ARM runtime library must be installed.)</p>
|
||||
<a href="https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/releases/tag/0.0.0.0" target="blank">Download Runtime Libraries</a><br>
|
||||
<a href="https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/releases/download/0.0.0.1/depsinstaller.zip" target="blank">Download Dependencies for Metro Apps</a>
|
||||
<h2>Attention</h2>
|
||||
<ul>
|
||||
<li>This program is an x86 program, not an ARM application, not cross-platform, and cannot be used on Windows RT.</li>
|
||||
<li>This program uses some third-party libraries and other Github projects, and is completed using AI (ChatGTP). This project can be used for learning and communication purposes.</li>
|
||||
<li><del>This program is an x86 program, not an ARM application, not cross-platform, and cannot be used on Windows RT.</del></li>
|
||||
<li>The program uses some third-party libraries and other GitHub projects, and is completed with the assistance of AI (ChatGTP). This project can be used for learning and communication purposes.</li>
|
||||
<li>(Important) Internet Explorer must support TLS 1.2 (requiring the use of IE's XMLHttpRequest to retrieve update information), especially IE10. You can do this by opening the "Advanced" tab in Control Panel/Internet Explorer's "Internet Options," finding "Use TLS 1.2" and checking the box, then clicking "OK" and saving. The settings will take effect the next time you open the browser.<br><img width="300" height="395" alt="屏幕截图 2025-12-08 103450" src="https://github.com/user-attachments/assets/69ee21ca-7f47-4d56-8dde-37e5704776c1" /></li>
|
||||
</ul>
|
||||
<h2>Special Thanks</h2>
|
||||
<a href="https://github.com/modernw/App-Installer-For-Windows-8.x-Reset/graphs/contributors">
|
||||
<!-- Made with [contrib.rocks](https://contrib.rocks). -->
|
||||
<img src="https://contrib.rocks/image?repo=modernw/App-Installer-For-Windows-8.x-Reset" />
|
||||
</a>
|
||||
<hr>
|
||||
<p>(Translated by Google Translate)</p>
|
||||
<picture>
|
||||
|
||||
6
Reader/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
40
Reader/Polyfill.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
public static class Polyfill
|
||||
{
|
||||
public static T ParseTo <T> (this string src, T dflt = default (T))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (src)) return dflt;
|
||||
try
|
||||
{
|
||||
Type targetType = typeof (T);
|
||||
Type underlying = Nullable.GetUnderlyingType (targetType);
|
||||
if (underlying != null)
|
||||
{
|
||||
object v = Convert.ChangeType (src, underlying, CultureInfo.InvariantCulture);
|
||||
return (T)v;
|
||||
}
|
||||
if (targetType.IsEnum)
|
||||
{
|
||||
object enumValue = Enum.Parse (targetType, src, true);
|
||||
return (T)enumValue;
|
||||
}
|
||||
TypeConverter converter = TypeDescriptor.GetConverter (targetType);
|
||||
if (converter != null && converter.CanConvertFrom (typeof (string)))
|
||||
{
|
||||
object v = converter.ConvertFrom (null, CultureInfo.InvariantCulture, src);
|
||||
return (T)v;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return dflt;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
Reader/Program.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
static public readonly string g_appUserId = "WindowsModern.PracticalToolsProject!Reader";
|
||||
static public readonly string g_appId = "Reader";
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main ()
|
||||
{
|
||||
Directory.SetCurrentDirectory (AppDomain.CurrentDomain.BaseDirectory);
|
||||
DataUtils.BrowserEmulation.SetWebBrowserEmulation ();
|
||||
Application.EnableVisualStyles ();
|
||||
Application.SetCompatibleTextRenderingDefault (false);
|
||||
Application.Run (new ReaderShell ());
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Reader/Project2.ico
Normal file
|
After Width: | Height: | Size: 359 KiB |
36
Reader/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle ("Reader")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("Reader")]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid ("26b3c19d-6182-4db5-8b69-ee098a0fd3bb")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion ("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("1.0.0.0")]
|
||||
99
Reader/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Reader.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal 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>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Reader.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 600 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IDS_DEFAULTHEIGHT {
|
||||
get {
|
||||
return ResourceManager.GetString("IDS_DEFAULTHEIGHT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 800 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IDS_DEFAULTWIDTH {
|
||||
get {
|
||||
return ResourceManager.GetString("IDS_DEFAULTWIDTH", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 412 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IDS_MINHEIGHT {
|
||||
get {
|
||||
return ResourceManager.GetString("IDS_MINHEIGHT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 504 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string IDS_MINWIDTH {
|
||||
get {
|
||||
return ResourceManager.GetString("IDS_MINWIDTH", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
136
Reader/Properties/Resources.resx
Normal file
@@ -0,0 +1,136 @@
|
||||
<?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="IDS_DEFAULTHEIGHT" xml:space="preserve">
|
||||
<value>600</value>
|
||||
<comment>默认窗口高度</comment>
|
||||
</data>
|
||||
<data name="IDS_DEFAULTWIDTH" xml:space="preserve">
|
||||
<value>800</value>
|
||||
<comment>默认窗口宽度</comment>
|
||||
</data>
|
||||
<data name="IDS_MINHEIGHT" xml:space="preserve">
|
||||
<value>412</value>
|
||||
<comment>默认最小窗口高度</comment>
|
||||
</data>
|
||||
<data name="IDS_MINWIDTH" xml:space="preserve">
|
||||
<value>504</value>
|
||||
<comment>默认最小窗口宽度</comment>
|
||||
</data>
|
||||
</root>
|
||||
26
Reader/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Reader.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Reader/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
187
Reader/Reader.csproj
Normal file
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{26B3C19D-6182-4DB5-8B69-EE098A0FD3BB}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Reader</RootNamespace>
|
||||
<AssemblyName>Reader</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Project2.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Polyfill.cs" />
|
||||
<Compile Include="ReaderShell.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ReaderShell.Designer.cs">
|
||||
<DependentUpon>ReaderShell.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="ReaderShell.resx">
|
||||
<DependentUpon>ReaderShell.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.manifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AppxPackage\AppxPackage.csproj">
|
||||
<Project>{bd681a4f-eb60-4bb8-90b5-65968fc7da59}</Project>
|
||||
<Name>AppxPackage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Bridge\Bridge.csproj">
|
||||
<Project>{3c2f5446-33f0-41d5-813a-64a94aa474af}</Project>
|
||||
<Name>Bridge</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataUtils\DataUtils.csproj">
|
||||
<Project>{ffd3fd52-37a8-4f43-883c-de8d996cb0e0}</Project>
|
||||
<Name>DataUtils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\IEHelper\IEHelper.vcxproj">
|
||||
<Project>{e4ca78a9-9408-4f5f-add6-730fd501ff8e}</Project>
|
||||
<Name>IEHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ModernNotice\ModernNotice.csproj">
|
||||
<Project>{c5587b6e-19c4-4484-aa97-5c20fbb07e43}</Project>
|
||||
<Name>ModernNotice</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\PrivateInit\PrivateInit.csproj">
|
||||
<Project>{8e708d9a-6325-4aa9-b5a5-d1b5eca8eef7}</Project>
|
||||
<Name>PrivateInit</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WAShell\WAShell.csproj">
|
||||
<Project>{4ec16578-efbf-41e6-8d7f-976e3646dd1d}</Project>
|
||||
<Name>WAShell</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Project2.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
54
Reader/ReaderShell.Designer.cs
generated
Normal file
@@ -0,0 +1,54 @@
|
||||
namespace Reader
|
||||
{
|
||||
partial class ReaderShell
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose ();
|
||||
}
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReaderShell));
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ReaderShell
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(657, 414);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.Name = "ReaderShell";
|
||||
this.PageScale = 125;
|
||||
this.Text = "Form1";
|
||||
this.WindowIcon = ((System.Drawing.Icon)(resources.GetObject("$this.WindowIcon")));
|
||||
this.Load += new System.EventHandler(this.ManagerShell_Load);
|
||||
this.Resize += new System.EventHandler(this.ManagerShell_Resize);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
102
Reader/ReaderShell.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
public partial class ReaderShell: WAShell.WebAppForm
|
||||
{
|
||||
public ReaderShell ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
//this.PublicObjectForScripting = new BridgeExt (this, this, this, this);
|
||||
try
|
||||
{
|
||||
var relativePath = DataUtils.VisualElementsStore.Vemanifest.SplashScreenImage (Program.g_appId);
|
||||
var img = Image.FromFile (relativePath);
|
||||
SplashScreen.SplashImage = img;
|
||||
} catch (Exception e) {
|
||||
var ex = e;
|
||||
}
|
||||
try
|
||||
{
|
||||
SplashScreen.SplashBackgroundColor = DataUtils.UITheme.StringToColor (DataUtils.VisualElementsStore.Vemanifest.SplashScreenBackgroundColor (Program.g_appId));
|
||||
}
|
||||
catch { }
|
||||
InitSize ();
|
||||
Text = Bridge.ResXmlStore.StringRes.Get ("READER_APPTITLE");
|
||||
this.Load += Form_Load;
|
||||
}
|
||||
private void InitSize ()
|
||||
{
|
||||
uint ww = 0, wh = 0;
|
||||
var ini = Bridge.InitFileStore.Config;
|
||||
var setsect = ini ["Settings"];
|
||||
var savepos = setsect.GetKey ("PackageReader:SavePosAndSizeBeforeCancel");
|
||||
var lastw = setsect.GetKey ("PackageReader:LastWidth");
|
||||
var lasth = setsect.GetKey ("PackageReader:LastHeight");
|
||||
var defw = setsect.GetKey ("PackageReader:DefaultWidth");
|
||||
var defh = setsect.GetKey ("PackageReader:DefaultHeight");
|
||||
var minw = setsect.GetKey ("PackageReader:MinimumWidth");
|
||||
var minh = setsect.GetKey ("PackageReader:MinimumHeight");
|
||||
var lasts = setsect.GetKey ("PackageReader:LastWndState");
|
||||
if (savepos.ReadBool ())
|
||||
{
|
||||
ww = lastw.ReadUInt (defw.ReadUInt (Properties.Resources.IDS_DEFAULTWIDTH.ParseTo <uint> ()));
|
||||
wh = lasth.ReadUInt (defh.ReadUInt (Properties.Resources.IDS_DEFAULTHEIGHT.ParseTo <uint> ()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ww = defw.ReadUInt (Properties.Resources.IDS_DEFAULTWIDTH.ParseTo<uint> ());
|
||||
wh = defh.ReadUInt (Properties.Resources.IDS_DEFAULTHEIGHT.ParseTo<uint> ());
|
||||
}
|
||||
ClientSize = new Size ((int)(ww * DataUtils.UITheme.DPIDouble), (int)(wh * DataUtils.UITheme.DPIDouble));
|
||||
int hborder = Size.Width - ClientSize.Width,
|
||||
vborder = Size.Height - ClientSize.Height;
|
||||
MinimumSize = new Size (
|
||||
(int)(minw.ReadUInt (Properties.Resources.IDS_MINWIDTH.ParseTo <uint> ()) * DataUtils.UITheme.DPIDouble) + hborder,
|
||||
(int)(minh.ReadUInt (Properties.Resources.IDS_MINHEIGHT.ParseTo <uint> ()) * DataUtils.UITheme.DPIDouble) + vborder
|
||||
);
|
||||
WindowState = (FormWindowState)lasts.ReadInt ((int)FormWindowState.Normal);
|
||||
}
|
||||
private void Form_Load (object sender, EventArgs e)
|
||||
{
|
||||
var current = Process.GetCurrentProcess ();
|
||||
var processes = Process.GetProcessesByName (current.ProcessName);
|
||||
int count = processes.Length;
|
||||
int offset = 30; // 每个窗口偏移
|
||||
int x = 20 + (count - 1) * offset;
|
||||
int y = 20 + (count - 1) * offset;
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
this.Location = new Point (x, y);
|
||||
}
|
||||
private void ManagerShell_Load (object sender, EventArgs e)
|
||||
{
|
||||
var root = Path.GetDirectoryName (DataUtils.Utilities.GetCurrentProgramPath ());
|
||||
WebUI.Navigate (Path.Combine (root, "html\\reader.html"));
|
||||
}
|
||||
private void ManagerShell_Resize (object sender, EventArgs e)
|
||||
{
|
||||
var ini = Bridge.InitFileStore.Config;
|
||||
var setsect = ini ["Settings"];
|
||||
var savepos = setsect.GetKey ("PackageReader:SavePosAndSizeBeforeCancel");
|
||||
var lastw = setsect.GetKey ("PackageReader:LastWidth");
|
||||
var lasth = setsect.GetKey ("PackageReader:LastHeight");
|
||||
var lasts = setsect.GetKey ("PackageReader:LastWndState");
|
||||
switch (WindowState)
|
||||
{
|
||||
case FormWindowState.Normal:
|
||||
case FormWindowState.Maximized:
|
||||
lasts.Write ((int)WindowState);
|
||||
break;
|
||||
}
|
||||
if (WindowState == FormWindowState.Normal && savepos.ReadBool ())
|
||||
{
|
||||
lastw.Write ((int)(ClientSize.Width / DataUtils.UITheme.DPIDouble));
|
||||
lasth.Write ((int)(ClientSize.Height / DataUtils.UITheme.DPIDouble));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12369
Reader/ReaderShell.resx
Normal file
75
Reader/app.manifest
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC 清单选项
|
||||
如果想要更改 Windows 用户帐户控制级别,请使用
|
||||
以下节点之一替换 requestedExecutionLevel 节点。n
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> -->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<!-- <requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
||||
如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
|
||||
元素。
|
||||
|
||||
-->
|
||||
<!-- <requestedExecutionLevel level="asInvoker" uiAccess="false" /> -->
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||
Windows 版本的列表。取消评论适当的元素,Windows 将
|
||||
自动选择最兼容的环境。 -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||
选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
|
||||
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
||||
4
Reader/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net40" />
|
||||
</packages>
|
||||
@@ -71,6 +71,45 @@ Original Project:
|
||||
License: MIT License
|
||||
License File: LICENSE.WinJS
|
||||
|
||||
----------------------------------------------------------------------
|
||||
CodeMirror
|
||||
----------------------------------------------------------------------
|
||||
|
||||
This product includes CodeMirror, which is licensed under the MIT License.
|
||||
|
||||
Original Project:
|
||||
Name: CodeMirror
|
||||
Author: Marijn Haverbeke and contributors
|
||||
Project Homepage: https://codemirror.net/
|
||||
License: MIT License
|
||||
License File: LICENSE.CodeMirror
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Json.NET (Newtonsoft.Json)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
This product includes Json.NET (also known as Newtonsoft.Json), which is licensed under the MIT License.
|
||||
|
||||
Original Project:
|
||||
Name: Json.NET
|
||||
Author: James Newton-King
|
||||
Project Homepage: https://www.newtonsoft.com/json
|
||||
License: MIT License
|
||||
License File: LICENSE.Newtonsoft.Json
|
||||
|
||||
----------------------------------------------------------------------
|
||||
SharpZipLib
|
||||
----------------------------------------------------------------------
|
||||
|
||||
This product includes SharpZipLib, which is licensed under the MIT License.
|
||||
|
||||
Original Project:
|
||||
Name: SharpZipLib
|
||||
Author: SharpZipLib Contributors
|
||||
Project Homepage: https://icsharpcode.github.io/SharpZipLib/
|
||||
License: MIT License
|
||||
License File: LICENSE.SharpZipLib
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
End of notices.
|
||||
|
||||
@@ -36,6 +36,24 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Project1.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<LangVersion>default</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
13
WAShell/IMetroIconSupport.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WAShell
|
||||
{
|
||||
interface IMetroIconSupport
|
||||
{
|
||||
Icon WindowIcon { get; set; }
|
||||
}
|
||||
}
|
||||
40
WAShell/ModenForm.Designer.cs
generated
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WAShell
|
||||
{
|
||||
partial class ModernForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method by the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ModernForm));
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ModernForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 600);
|
||||
this.DoubleBuffered = false;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "ModernForm";
|
||||
this.Text = "Modern Custom Form";
|
||||
this.ResumeLayout(false);
|
||||
this.Padding = new Padding (0); // 边框交给系统管理
|
||||
this.BackColor = Color.White;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
1001
WAShell/ModenForm.cs
Normal file
819
WAShell/ModenForm.resx
Normal file
@@ -0,0 +1,819 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAgAAAAAAAEAGAAOCwAAhgAAAEBAAAABABgAKDIAAJQLAAAwMAAAAQAYAKgcAAC8PQAAKCgAAAEA
|
||||
GAAoFAAAZFoAACAgAAABABgAqAwAAIxuAAAYGAAAAQAYAEgHAAA0ewAAFBQAAAEAGAAoBQAAfIIAABAQ
|
||||
AAABABgAaAMAAKSHAACJUE5HDQoaCgAAAA1JSERSAAABAAAAAQAIBgAAAFxyqGYAAAAJcEhZcwAADsMA
|
||||
AA7DAcdvqGQAAArASURBVHic7d2/b5XXHcfxDyRWrSymiMUdAglS1a0UxnbwwB+QSmTGLFGGDu3SpFO9
|
||||
VRmzVSw4YiwDkTIykCFDB0ewkC4BjJLeqkLiWkXIyEroQJ9yfLm+P89zvt9zvu/XihQfRc/nzXNt/DzH
|
||||
9PE3LwQgpOPWBwBghwAAgREAIDACAARGAIDACAAQGAEAAiMAQGAEAAiMAACBEQAgMAIABEYAgMAIABAY
|
||||
AQACIwCBnFtf1fDPP9f2++s689MV6+PAgWM8ECSGc+uruv3B21pbfdX8z77e09atx3r45MDwZLBEAAIY
|
||||
N/4UIYgr/EeAzQtrOre+an2M3kwbvyRdPr+mB388y0eDgMLeAWxeWNPWxVM6fWJFe/s/auPqI90Z7Fsf
|
||||
K6tZxj8OdwRxhAtAOvxUaxFYdPwpQtC+MAE4avipViKQY/wpQtCu5gMwy/BTtUcg9/hThKA9zQZg3uGn
|
||||
ao1An+NPEYJ2NBeAZYafqi0CpcafIgT1ayYAuYafqiUCFuNPEYJ6VR+APoaf8h4B6/GnCEF9qg1A38NP
|
||||
eY2Ap/GnCEE9qgtAyeGnvEXA6/hThMC/agJgNfyUlwjUMP4UIfDLfQA8DD9lHYHaxp8iBP64DYC34aes
|
||||
IlDz+FOEwA93AfA8/FTpCLQy/hQhsOcmALUMP1UqAi2OP0UI7JgHoMbhp/qOQOvjTxGC8swCUPvwU31F
|
||||
INL4U4SgnOIBaGn4qdwRiDr+FCHoX7EAtDr8VK4IMP7DCEF/eg9AhOGnlo0A4z8aIcivtwBEG35q0Qgw
|
||||
/tkQgnyyByDy8FPzRoDxz48QLC9bABj+62aNAONfDiFY3NIBYPiTTYsA48+HEMxv6atu4923GP8Ea6vH
|
||||
dfuDt8e+fITx58ULTuaX5SPA9vvrunx+Lcd5mjV6J8D4+8cdwXTZvgdABKbrIiCJ8RdECI6W9acARGC6
|
||||
u4PnkqRfrv/E+CTxEILXvaHf/G4r13/s5r2neufkStMv21zU7vBAf/ji3/rw5r/0178PtTs80K9+tqoT
|
||||
q29YHy2Mc+ur+v2vT+qdkyu6M3iu4f6P1kcy18s/BOJO4JXd4YG2bj3W9s7e2D/npyh2uCPo8V8CRo/A
|
||||
tOGPIgR2Ioeg198FiBiBeYc/ihDYiRiC3n8ZKEoElh3+KEJgJ1IIivw6cMsRyD38UYTAToQQFHseQGsR
|
||||
6Hv4owiBnZZDUPSJQC1EoPTwRxECOy2GoPgjwWqNgPXwRxECOy2FwOShoDVFwNvwRxECOy2EwOypwN4j
|
||||
4H34owiBnZpDYPpeAI8RqG34owiBnRpDYP5iEC8RqH34owiBnZpCYB4AyTYCrQ1/FCGwU0MIXARAKh+B
|
||||
1oc/ihDY8RwCNwGQykQg2vBHEQI7HkPgKgBSfxGIPvxRhMCOpxC4C4CUNwIMfzJCYMdDCFwGQFo+Agx/
|
||||
PoTAjmUI3AZAWiwCDH85hMCORQhcB0CaPQIMPy9CYOe317/XzXv/KfK13AdAmhwBht8vQlDWZ1/vafNv
|
||||
g2Jfr4oASK9HgOGXRQj6V3r8UkUBkF5GYOPdtxi+IULQD4vxSxneDViSxf8gHLa9s6czn3yrKzcG2h3a
|
||||
/xy7BVbjlyq7A5CkF3/5hSQ+AnjBHcFyLMcvVRyADiHwgRDMz3r8UgMB6BACHwjBbDyMX2ooAB1C4AMh
|
||||
OJqX8UsNBqBDCHwgBId5Gr/UcAA6hMAHQuBv/FKAAHQIgQ9RQ+Bx/FKgAHQIgQ+RQuB1/FLAAHQIgQ+t
|
||||
h8Dz+KXAAegQAh9aDIH38UsE4P8IgQ+thKCG8UsE4DWEwIeaQ1DL+CUCcCRC4ENtIahp/BIBmIoQ+FBD
|
||||
CGobv0QAZkYIfPAaghrHLxGAuRECHzyFoNbxSwRgYYTAB+sQ1Dx+iQAsjRD4YBGC2scvEYBsCIEPpULQ
|
||||
wvglApAdIfChzxC0Mn6JAPSGEPiQOwQtjV8iAL0jBD7kCEFr45cIQDGEwIdFQ9Di+CUCUBwh8GGeELQ6
|
||||
fokAmCEEPkwLQcvjlwiAOULgw7gQtD5+iQC4QQh86EJw+/6z5scvSW9aHwAvnT6xomuX1rV18RQhcODy
|
||||
+bUjX0nvQa6/MLgDcIo7grKsf6dgVrmvCwLgHCHoV9ThdwhAJQhBXtGH3yEAlSEEy2H4hxGAShGC+TD8
|
||||
8QhA5QjBZAx/MgLQCEJwGMOfDQFojPUFZY3hz4cANMrLBVYKw18MAWictwsuN4a/HAIQhNcLcFEMPw8C
|
||||
EIz3C3Iahp8XAQiqlgu0w/D7QQCC837BMvx+EQBI8ncBM/wyCAAOsb6gGX5ZBABjlb7AGb4NAoCJ+r7g
|
||||
Gb4tAoCZ5B4Aw/eBAGAuyw6C4fvCQ0Exl+7hpYsO49ql9cwnyivK8DsEAFC84XcIAEKLOvwOAUBI0Yff
|
||||
IQAIheEfRgAQAsMfjwCgaQx/MgKAoo796R/WR0DiuPUBANghAEBgBAAIjAAAgREAIDACAARGAFDUw4/O
|
||||
avPCmvUx8D8EAEV1v05MCHwgADBBCHwgADBFCGwRALhACGwQALhCCMoiAHCJEJRBAOBa6RBsXljTw4/O
|
||||
9v51vCAAqELfIeiGf+3SuvtHludEAFCV3CGIOvwOAUCVlg1B9OF3CACqNm8IGP5hBABNmBYChj8ezwRE
|
||||
U7oQbF08pa1bjyWpincRWiEAaFIXAkzGRwAgMAIABEYAgMAIABAYAQACIwBAYAQACIwAAIERACAwAgAE
|
||||
RgCAwAgAEBgBAAIjAEBgBAAIjAAAgREAIDACAARGAIDACAAQGAEAAiMAQGAEAAiMAACBEQAgMAIABEYA
|
||||
gMAIABAYAQACIwBAYAQACIwAAIERACAwAgAERgCAwKoLwJcPnlkfAWhGdQG488/n1kcAmlFdALZ39qyP
|
||||
ADSjugDcGezzMQDIpLoASNLWrcfWRwCaUGUAbt9/pk+/emJ9DKB6VQZAenkXcHfANwSBZVQbgOH+D9q4
|
||||
+ogIAEuoNgDSqwh8fu+p9VGAKlUdAOllBN67/p2u3Bhod3hgfRygKtUHoLO9s6czn3xLCIA5NBOADiEA
|
||||
ZtdcADqEAJiu2QB0CAFwtOYD0CEEwOvCBKBDCIBXwgWgQwiAwAHoEAJEFj4AHUKAiAjACEKASAjAEQgB
|
||||
IiAAUxACtIwAzIgQoEUEYE6EAC0hAAsiBGgBAVgSIUDNCEAmhAA1IgCZEQLUhAD0hBDUK9KLZwhAzwhB
|
||||
fSK9f5IAFEII6hHp/ZMEoDBC4NuXD57pzmDf+hjFEAAjhMCnaO+dJADGCIEfn371RLfvx/kGoEQA3CAE
|
||||
tu4Onof7218iAO4QgvLuDp5r4+ojDfd/sD5KcQTAKUJQxuf3noYdv0QA3CME/dgdHujKjYHeu/5d2PFL
|
||||
0pvWB8Bstnf2tL2zp80La9q6eEqnT6xYH6lKu8MDbd16HOpn/ZMQgMoQgsUw/PEIQKUIwWwY/mQEoHKE
|
||||
YDyGPxsC0AhC8BLDnw8BaEzUEDD8xRCARkUJAcNfDgFoXKshYPh5EIAgWgkBw8+LAARTawgYfj8IQFC1
|
||||
hIDh94sABOc1BAy/DAIASX5CwPDLIgA4xCoEDN8GAcBYpULA8G0RAEzUVwgYvg8EADMZDcGiGL4vx/Tx
|
||||
Ny+sDwHABo8EAwIjAEBgBAAIjAAAgREAIDACAARGAIDACAAQGAEAAiMAQGAEAAiMAACBEQAgMAIABEYA
|
||||
gMD+Cwb3Zd+SyYtKAAAAAElFTkSuQmCCKAAAAEAAAACAAAAAAQAYAAAAAAAAMAAAAAAAAAAAAAAAAAAA
|
||||
AAAAANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4Nd4ANd4ANd4
|
||||
APrv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//
|
||||
/////9d4ANd4ANd4AP////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOar
|
||||
YPrv4P///////////////9d4ANd4ANd4AP////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AOarYPrv4P///////////////////////9d4ANd4ANd4AP////////////////////////rv4Oar
|
||||
YNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4AOarYPrv4P///////////////////////////////9d4ANd4ANd4AP//////////////
|
||||
//////////////////rv4N+RMNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AOarYPrv4P///////////////////////////////////////9d4ANd4ANd4
|
||||
AP////////////////////////////////////XewNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////////////////
|
||||
/////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////////
|
||||
/////////////////////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////
|
||||
/////////////////////////////////////9d4ANd4ANd4AP//////////////////////////////
|
||||
/////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////
|
||||
/////////////////////////////////////////////////////9d4ANd4ANd4AP//////////////
|
||||
/////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////
|
||||
/////////////////////////////////////////////////////////////////////9d4ANd4ANd4
|
||||
AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AN+RMPrv4P//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4APXewP//////////////////////////////////////////////////////////////////////
|
||||
/////////////////////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////9d4ANd4ANd4AP//////////////////////////////
|
||||
/////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////9d4ANd4ANd4AP//////////////
|
||||
/////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////9d4ANd4ANd4
|
||||
AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AP//////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////9d4ANd4ANd4AP//////////////////////////////
|
||||
/////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////9d4ANd4ANd4AP//////////////
|
||||
/////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////9d4ANd4ANd4
|
||||
AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AP//////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////9d4ANd4ANd4AP///////////////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////9d4ANd4ANd4AP////////////////////////rv4Prv
|
||||
4P///////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////9d4ANd4ANd4AP//////////////
|
||||
//rv4OarYNd4ANd4AOarYPrv4Nd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////9d4ANd4ANd4
|
||||
AP////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////9d4ANd4ANd4APrv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AP//////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////9d4ANd4ANd4AP//////////////////////////////
|
||||
//rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////
|
||||
//////////////////////////////////////////////rv4OarYNd4ANd4ANd4AOarYPrv4P//////
|
||||
//////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////
|
||||
//////////////////////////////////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AOarYPrv4P////////////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////
|
||||
//////////////////////////////////////////////////////////////rv4OarYNd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////////////////////////rv4Oar
|
||||
YNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AP////////////////////////////////////////////////////////////////rv4OarYNd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////
|
||||
//////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP////////////////////////////////////////////////////////rv
|
||||
4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P////////////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////
|
||||
//////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4AOarYPrv4PDNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////
|
||||
//////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////
|
||||
//////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////////////////DNoNd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4AP////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////
|
||||
//////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AP////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////
|
||||
//////////////////////////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////
|
||||
//////////////////////////////////////////////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APrv4OarYNd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////
|
||||
//////////////////////////////////////////////////////////////////DNoNd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDNoPrv4OarYNd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv
|
||||
4P//////////////////////////////////////////////////////////////////////////////
|
||||
//XewNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDN
|
||||
oP////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P//////////////////////////////////////////////////////////////////////
|
||||
//////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4APDNoP////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AOarYPrv4P//////////////////////////////////////////////////////////////
|
||||
//////////////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4APDNoP////////////////////////////////////rv4OarYNd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////////////////////////////
|
||||
//////////////////////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDNoP//////////////////////////////////////////
|
||||
//////rv4OarYNd4ANd4ANd4AOarYPrv4P//////////////////////////////////////////////
|
||||
//////////////////////////////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDNoP//////////////////////////////
|
||||
//////////////////////////////rv4OmzcPrv4P//////////////////////////////////////
|
||||
//////////////////////////////////////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANyJIPXewP//////////////
|
||||
//////////////////////////////////////////////jm0NyIH/jm0P//////////////////////
|
||||
//////////////////////////////////////////////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOGaQPXewP////////////////////////////////////////////////jm0NqAENd4ANqAEPjm0P//
|
||||
//////////////////////////////////////////////////////////XewOGaQNd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AOGaQPXewP////////////////////////////////////jm0NqAENd4
|
||||
ANd4ANd4ANqAEPjm0P////////////////////////////////////////////////XewOGaQNd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOGaQPXewP//////////////////////
|
||||
//jm0NqAENd4ANd4ANd4ANd4ANd4ANqAEPjm0P////////////////////////////////////XewOGa
|
||||
QNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOGaQPXe
|
||||
wP////////////jm0NqAENd4ANd4ANd4ANd4ANd4ANd4ANd4ANqAEPjm0P//////////////////////
|
||||
//XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4AOGaQPXewPjm0NqAENd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANqAEPjm0P//
|
||||
//////////XewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANqAEPjm0PXewOGaQNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAADAAAABgAAAAAQAYAAAAAAAAGwAAAAAAAAAAAAAAAAAA
|
||||
AAAAANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv
|
||||
4Nd4ANd4APrv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4AOarYPrv4P///////9d4ANd4AP////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P///////////////9d4ANd4AP//////
|
||||
//////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////
|
||||
/////////////////9d4ANd4AP////////////////////////jm0NqAENd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AOarYPrv4P///////////////////////////////9d4ANd4AP//////////////////////
|
||||
/////+7EkNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////////////
|
||||
/9d4ANd4AP///////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////
|
||||
/////////////////////////////////9d4ANd4AP///////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P///////////////////////////////////////////////////////9d4ANd4AP//////
|
||||
/////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANqAEPjm0P//////////////////////////////////////////////
|
||||
/////////////////9d4ANd4AP///////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AO7EkP//////////////////
|
||||
/////////////////////////////////////////////////9d4ANd4AP//////////////////////
|
||||
/////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AP//////////////////////////////////////////////////////////////////////
|
||||
/9d4ANd4AP///////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////
|
||||
/////////////////////////////////9d4ANd4AP///////////////////////////////9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////
|
||||
/////////////////////////////////////////////////////////////////9d4ANd4AP//////
|
||||
/////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////
|
||||
/////////////////9d4ANd4AP///////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////
|
||||
/////////////////////////////////////////////////9d4ANd4AP//////////////////////
|
||||
/////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AP//////////////////////////////////////////////////////////////////////
|
||||
/9d4ANd4AP///////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////
|
||||
/////////////////////////////////9d4ANd4AP////////////////rv4Ou8gPrv4P///9d4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////
|
||||
/////////////////////////////////////////////////////////////////9d4ANd4AP//////
|
||||
//rv4OarYNd4ANd4ANd4AOarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////////////////////
|
||||
/////////////////9d4ANd4APrv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////
|
||||
/////////////////////////////////////////////////9d4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AP//////////////////////////////////////////////////////////////////////
|
||||
/9d4ANd4AP////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////////////////////
|
||||
//////////////////////////rv4OarYNd4ANd4AOarYPrv4P////////////////////rv4OarYNd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////
|
||||
//////////////////////////////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AP////////////////////////////////////////////////rv4Oar
|
||||
YNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////////////rv4OarYNd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////////////////////
|
||||
//////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4AP////////////////////////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4PDNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP////////////////////////rv4OarYNd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////DN
|
||||
oNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AP//////
|
||||
//////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
AOarYPrv4P////////////////////////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AP////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P////////////////////////////////////DNoNd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APrv4OarYNd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////
|
||||
//////////////////////////DNoNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4APDNoPrv4OarYNd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOarYPrv
|
||||
4P///////////////////////////////////////////////////////////+SiUNd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDNoP////////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////////////////////////////
|
||||
//////DNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4APDNoP//////////////
|
||||
//////////rv4OarYNd4ANd4ANd4ANd4ANd4ANd4AOarYPrv4P//////////////////////////////
|
||||
//////////////////////////////DNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4APDNoP////////////////////////////////////rv4OarYNd4ANd4AOarYPrv4P//////
|
||||
//////////////////////////////////////////////////////DNoNyJINd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4AOSiUP//////////////////////////////////////
|
||||
//////////jm0Pjm0P////////////////////////////////////////////////////////////DN
|
||||
oNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANyJIPDN
|
||||
oP////////////////////////////////////338N+RMN+RMP338P//////////////////////////
|
||||
//////////////////////DNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANyJIPDNoP////////////////////////338N+RMNd4ANd4
|
||||
AN+RMP338P////////////////////////////////////DNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANyJIPDN
|
||||
oP////////////338N+RMNd4ANd4ANd4ANd4AN+RMP338P////////////////////////DNoNyJINd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANyJIPDNoP338N+RMNd4ANd4ANd4ANd4ANd4ANd4AN+RMP33
|
||||
8P////////////DNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4AN+RMP338PDNoNyJINd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4ANd4
|
||||
ANd4ANd4ANd4ANd4ANd4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAoAAAAUAAAAAEAGAAAAAAA
|
||||
wBIAAAAAAAAAAAAAAAAAAAAAAADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADmq2D67+DXeADXeAD67+Dmq2DXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADmq2D67+D////////XeADXeAD////////67+Dmq2DXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADmq2D67+D////////////////XeADXeAD////////////////67+DciSDXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADmq2D67+D////////////////////////XeADXeAD////////////////////13sDXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D6
|
||||
7+D////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D/////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADciSD67+D/////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD13sD/////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////////////XeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////67+Dmq2Dmq2D67+DXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD67+Dmq2DXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////////////XeADXeAD////////////////67+Dmq2DXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////////////67+Dmq2DXeADXeADmq2D67+D////////////////67+Dmq2DXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////////////67+Dmq2DXeADXeADXeADXeADXeADXeADmq2D67+D////////////////67+Dm
|
||||
q2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///////////67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D/////////////
|
||||
///67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////
|
||||
///67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+DwzaDXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD////////////////67+Dm
|
||||
q2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////wzaDXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD////////67+Dmq2DXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////////////wzaDX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD67+Dmq2DXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////////////////////////w
|
||||
zaDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD67+Dmq2DXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADmq2D67+D/////////////////////////////////////////////
|
||||
///kolDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD////////////67+Dmq2DXeADX
|
||||
eADXeADXeADXeADXeADmq2D67+D////////////////////////////////////////////////wzaDc
|
||||
iSDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD////////////////////////67+Dm
|
||||
q2DXeADXeADmq2D67+D////////////////////////////////////////////////wzaDciSDXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD/////////////////////////////////
|
||||
///45tD45tD////////////////////////////////////////////////wzaDciSDXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////////////////9
|
||||
9/DfkTDfkTD99/D////////////////////////////////////wzaDciSDXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////99/Df
|
||||
kTDXeADXeADfkTD99/D////////////////////////wzaDciSDXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////99/DfkTDX
|
||||
eADXeADXeADXeADfkTD99/D////////////wzaDciSDXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2DfkTDXeADX
|
||||
eADXeADXeADXeADXeADfkTD99/DwzaDciSDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAgAAAAQAAAAAEAGAAAAAAA
|
||||
AAwAAAAAAAAAAAAAAAAAAAAAAADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+DXeAD67+Dmq2DXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADmq2D67+D////////XeAD////////67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////XeAD/////////
|
||||
///////wzaDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADmq2D67+D////////////////////////XeAD////////////////////XeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D/////////////////////////////
|
||||
///XeAD////////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADwzaD////////////////////////////////////////XeAD////////////////////XeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////////
|
||||
///////////////////XeAD////////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeAD////////////////////////////////////////////XeAD/////////
|
||||
///////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////
|
||||
///////////////////////////////////XeAD////////////////////XeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////////////////////////
|
||||
///XeAD////////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeAD////////////////////////////////////////////XeAD////67+Dmq2DXeADmq2DXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////////
|
||||
///////////////////XeADmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeAD////////////////////////////////////////67+DXeAD67+D/////
|
||||
///////wzaDciSDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////
|
||||
///////////////////////67+Dmq2DXeADXeADXeADmq2D67+D////////////wzaDciSDXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeAD////////////////////////67+Dmq2DXeADXeADX
|
||||
eADXeADXeADXeADXeADmq2D67+D////////////wzaDciSDXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeAD////////////////67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+DwzaDX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD////////67+Dmq2DXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADmq2D67+D////////////wzaDXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeAD67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D/////
|
||||
///////////////////wzaDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD67+Dmq2DX
|
||||
eADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////////////////////13sDciSDXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADwzaD////////////67+Dmq2DXeADXeADXeADmq2D67+D/////
|
||||
///////////////////////////13sDhmkDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADwzaD/
|
||||
///////////////////////67+Dps3D67+D////////////////////////////////13sDhmkDXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////////45tDciB/4
|
||||
5tD////////////////////////13sDhmkDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADmq2D67+D////////45tDagBDXeADagBD45tD////////////13sDhmkDXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2Dz
|
||||
1bDagBDXeADXeADXeADagBD45tD13sDhmkDXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAYAAAAMAAAAAEAGAAAAAAA
|
||||
wAYAAAAAAAAAAAAAAAAAAAAAAADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADmq2D67+DXeAD67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////XeAD////////67+DkolDXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D////////////////XeAD/////////
|
||||
///99/DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADmq2D67+D/////////////////////
|
||||
///XeAD////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD13sD/////////////
|
||||
///////////////////XeAD////////////////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/
|
||||
///////////////////////////////////XeAD////////////////XeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeAD////////////////////////////////////XeAD////////////////XeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeAD////////////////////////////////////XeAD/////////
|
||||
///////XeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////////////////////
|
||||
///XeAD////////67+D67+DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/////////////////
|
||||
///////////////////XeAD67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeAD/
|
||||
///////////////////////////67+Dmq2DXeADmq2D67+D////67+Dmq2DXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeAD////////////////////67+Dmq2DXeADXeADXeADXeADXeADmq2D67+D////67+Dm
|
||||
q2DXeADXeADXeADXeADXeADXeADXeAD////////////67+Dmq2DXeADXeADXeADXeADXeADXeADXeADm
|
||||
q2D67+DwzaDXeADXeADXeADXeADXeADXeADXeADXeADXeAD////67+Dmq2DXeADXeADXeADXeADXeADX
|
||||
eADXeADmq2D67+D////////////wzaDXeADXeADXeADXeADXeADXeADXeADfkTDvy5zXeADXeADXeADX
|
||||
eADXeADXeADXeADmq2D67+D////////////////////////wzaDXeADXeADXeADXeADXeADfkTD99/D/
|
||||
///67+Dmq2DXeADXeADXeADmq2D67+D////////////////////////////67+Dmq2DXeADXeADXeADX
|
||||
eADfkTD99/D////////////////67+Dps3D67+D////////////////////////////67+Dmq2DXeADX
|
||||
eADXeADXeADXeADXeADciSDwzaD////////////////45tDciB/45tD////////////////////67+Dm
|
||||
q2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADciSDwzaD////45tDagBDXeADagBD45tD/////
|
||||
///67+Dmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADciSDagBDXeADX
|
||||
eADXeADagBDz1bDmq2DXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADXeADX
|
||||
eADXeADXeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAAACgAAAABABgA
|
||||
AAAAALAEAAAAAAAAAAAAAAAAAAAAAAAA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA5qtg+u/g13gA
|
||||
+u/g5qtg13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA5qtg+u/g////////13gA
|
||||
////////+ObQ13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA5qtg+u/g////////////////13gA
|
||||
////////////13gA13gA13gA13gA13gA13gA13gA13gA13gA+ObQ////////////////////////13gA
|
||||
////////////13gA13gA13gA13gA13gA13gA13gA13gA13gA////////////////////////////13gA
|
||||
////////////13gA13gA13gA13gA13gA13gA13gA13gA13gA////////////////////////////13gA
|
||||
////////////13gA13gA13gA13gA13gA13gA13gA13gA13gA////////////////////////////13gA
|
||||
////+u/g+u/g13gA13gA13gA13gA13gA13gA13gA13gA13gA////////////////////////////13gA
|
||||
5qtg13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA////////////////////////+u/g13gA
|
||||
+u/g////+u/g5qtg13gA13gA13gA13gA13gA13gA13gA13gA////////////////+u/g5qtg13gA13gA
|
||||
13gA5qtg+u/g////+u/g5qtg13gA13gA13gA13gA13gA13gA////////+u/g5qtg13gA13gA13gA13gA
|
||||
13gA5qtg+u/g8M2g13gA13gA13gA13gA13gA13gA13gA13gA+u/g5qtg13gA13gA13gA13gA13gA5qtg
|
||||
+u/g////////////8M2g13gA13gA13gA13gA13gA13gA8M2g+u/g5qtg13gA13gA13gA5qtg+u/g////
|
||||
////////////////9d7A3Ikg13gA13gA13gA13gA8M2g////////////+u/g6bNw+u/g////////////
|
||||
////////9d7A4ZpA13gA13gA13gA13gA13gA13gA5qtg+u/g////////+ObQ3Igf+ObQ////////////
|
||||
9d7A4ZpA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA5qtg89Ww2oAQ13gA2oAQ+ObQ9d7A4ZpA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAEAAAACAAAAABABgA
|
||||
AAAAAAADAAAAAAAAAAAAAAAAAAAAAAAA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA2oAQ67yA/ffw13gA/ffw67yA2oAQ13gA13gA13gA
|
||||
13gA13gA13gA13gA2oAQ67yA/ffw////////13gA////////+u/g13gA13gA13gA13gA13gA13gA6bNw
|
||||
/ffw////////////////13gA////////////13gA13gA13gA13gA13gA13gA////////////////////
|
||||
////13gA////////////13gA13gA13gA13gA13gA13gA////////////////////////13gA////////
|
||||
////13gA13gA13gA13gA13gA13gA////////////////////////13gA////////////13gA13gA13gA
|
||||
13gA13gA13gA////////////////////////13gA+u/g4ZpA5qtg13gA13gA13gA13gA13gA13gA////
|
||||
/////////////ffw8M2g13gA/ffw////89Ww3Ikg13gA13gA13gA13gA13gA/////////ffw67yA2oAQ
|
||||
13gA13gA2oAQ7sSQ/////ffw67yA13gA13gA13gA13gA/ffw67yA2oAQ13gA13gA13gA13gA4ZpA9d7A
|
||||
/ffw35Ew13gA13gA13gA13gA5KJQ46BM13gA13gA13gA13gA5qtg+u/g/////////////ffw35Ew13gA
|
||||
13gA5qtg////////9d7A4ZpA5qtg+u/g/////////////////ffw67yA2oAQ13gA13gA8M2g////////
|
||||
////8tOs/ffw////////////+u/g5qtg13gA13gA13gA13gA13gA13gA3Ikg8M2g8M2g13gA35Ew+ObQ
|
||||
+u/g5qtg13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA13gA
|
||||
13gA13gA13gA13gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAA==
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="blank_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\blank_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="blank_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\blank_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_ban" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel_ban.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_ban_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel_ban_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cancel_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cancel_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max_ban" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max_ban.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max_ban_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max_ban_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="max_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\max_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min_ban" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min_ban.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min_ban_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min_ban_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="min_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\min_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options_ban" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options_ban.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options_ban_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options_ban_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="options_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\options_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore_ban" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore_ban.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore_ban_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore_ban_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore_light" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="restore_press" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\restore_press.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
38
WAShell/NormalForm.Designer.cs
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace WAShell
|
||||
{
|
||||
partial class NormalForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose ();
|
||||
}
|
||||
base.Dispose (disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container ();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "NormalForm";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
25
WAShell/NormalForm.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WAShell
|
||||
{
|
||||
public partial class NormalForm: Form, IMetroIconSupport
|
||||
{
|
||||
public NormalForm ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
private Icon _iconForMetro = null;
|
||||
public virtual Icon WindowIcon
|
||||
{
|
||||
get { return _iconForMetro; }
|
||||
set { _iconForMetro = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
WAShell/Resources/blank.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/blank_light.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/blank_press.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/cancel.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
WAShell/Resources/cancel_back.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/cancel_ban.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/cancel_ban_back.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/cancel_light.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/cancel_press.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
WAShell/Resources/max.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
WAShell/Resources/max_back.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/max_ban.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/max_ban_back.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/max_light.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/max_press.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/min.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
WAShell/Resources/min_back.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/min_ban.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/min_ban_back.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/min_light.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/min_press.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
WAShell/Resources/options.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
WAShell/Resources/options_back.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |