Compare commits

...

266 Commits
v1.1 ... master

Author SHA1 Message Date
JFronny
2fe4fa4592 Implement queue management UI and app upload for eto 2021-02-14 16:29:09 +01:00
JFronny
531a1c1e34 Implement app controls and filters in UpToolEto 2021-02-13 14:36:12 +01:00
JFronny
5814336814 Fix download dialog, fix threaded invokes of Eto UTLibFunctions, use UTLibFunctions instead of console logging and direct msgbox calls 2021-02-13 13:05:38 +01:00
JFronny
6af8eba6c6 Split UpToolLib into v1 (basically an interface over XElements with rudementary parsing) and v2 (more object-oriented, less hacky API, will allow easier migration to a more suited information backend) and start work on a new eto-based UI (not functional currently) 2021-02-08 19:00:52 +01:00
J. Fronny
ba106c1783 Path 2021-02-04 14:41:34 +00:00
J. Fronny
3d710854b3 CI: no longer try to add /runtimes 2021-02-03 21:55:05 +00:00
JFronny
f9b56c91af Upgrade System.Commandline 2021-02-03 22:47:53 +01:00
JFronny
3ddc958e0b Switch to CC-Functions.Core 2021-02-03 22:42:22 +01:00
J. Fronny
536b549114 Specify dotnet path to dotnet-install output 2021-02-03 21:31:56 +00:00
J. Fronny
94c0273304 Readd dotnet download because maybe that fixes it 2021-02-03 21:19:07 +00:00
JFronny
e92a074544 net5.0 attempt 2 2021-02-03 22:14:47 +01:00
J. Fronny
9b1935e7a7 Hopefully fix 2021-02-03 20:55:22 +00:00
J. Fronny
3bd245b277 [attempt] install .net using dotnet-install 2020-12-13 19:29:59 +00:00
JFronny
9d42aefe24 .Net 5 - This is to test if gitlab CI has this available now 2020-12-13 21:21:46 +01:00
JFronny
ef5947f54c Remove #if (compile-time) conditions. This should make testing scenarios slightly more accurate. This does NOT mean that things like self-updating will suddenly work, just that it won't be ignored when compiling for debug 2020-09-10 20:16:19 +02:00
JFronny
f38a0e054d Remove repo link unshortening, noticably reducing load time (way less requests have to be made) 2020-09-10 20:05:48 +02:00
J. Fronny
5e31ff3b45 Merge branch 'renovate/system.commandline-2.x' into 'master'
Update dependency System.CommandLine to v2.0.0-beta1.20427.1

See merge request JFronny/UpTool2!20
2020-09-07 09:44:44 +00:00
Renovate Bot
c602b59f21
Update dependency System.CommandLine to v2.0.0-beta1.20427.1 2020-09-07 06:52:50 +00:00
JFronny
042b126634 Add support for starting apps with arguments and custom file names to UpToolLib and UpToolCLI (the UpToolCLI impl is limited due to System.Commandline: values starting with dashes need to share a string with the option switch) 2020-08-31 22:11:40 +02:00
JFronny
0976297348 Fix CLI Installer 2020-08-31 21:14:27 +02:00
JFronny
ddbfb39e87 Correct the type for --waitForExit in Start (UpToolCLI) 2020-08-31 21:12:00 +02:00
JFronny
14b2643cbf Fix bug where Basic was used before being set
- Set Basic before FixXml (was accesed before being set)
- Move Basic to Program.cs
2020-08-31 20:40:58 +02:00
JFronny
0eccafa9ea Various CLI improvements
- Show dialog before adding default repo
- Prevent edge-case where --basic is used later in a CLI command
- Fix RemoveRepo in basic mode
- Use default instead of true in basic YesNoDialog
2020-08-31 20:22:37 +02:00
JFronny
b2d353b0bb --basic option to disable advanced output (UpToolCLI) 2020-08-31 19:56:10 +02:00
JFronny
c5de2e6886 Better logging for debugging, partially reworked interface for UpToolCLI 2020-08-31 18:58:15 +02:00
J. Fronny
73669e16ea Merge branch 'renovate/sixlabors.imagesharp-1.x' into 'master'
Update dependency SixLabors.ImageSharp to v1.0.1

See merge request JFronny/UpTool2!19
2020-08-22 16:31:57 +00:00
Renovate Bot
ffa645c991
Update dependency SixLabors.ImageSharp to v1.0.1 2020-08-21 16:17:53 +00:00
J. Fronny
e642161206 Merge branch 'renovate/sixlabors.imagesharp-1.x' into 'master'
Update dependency SixLabors.ImageSharp to v1.0.0

See merge request JFronny/UpTool2!18
2020-08-05 08:07:27 +00:00
Renovate Bot
568d17e3fa
Update dependency SixLabors.ImageSharp to v1.0.0 2020-08-04 22:42:51 +00:00
J. Fronny
08dfef1498 Merge branch 'renovate/system.commandline-2.x' into 'master'
Update dependency System.CommandLine to v2.0.0-beta1.20371.2

See merge request JFronny/UpTool2!17
2020-07-23 04:49:24 +00:00
Renovate Bot
2670a04542
Update dependency System.CommandLine to v2.0.0-beta1.20371.2 2020-07-23 02:40:03 +00:00
JFronny
e36005558d Prevent a bug with mainBin being a global path instead of local 2020-07-16 17:12:31 +02:00
J. Fronny
da1dbca8f6 Add LICENSE 2020-06-27 16:22:04 +00:00
J. Fronny
2fd34f5576 Merge branch 'renovate/system.commandline-2.x' into 'master'
Update dependency System.CommandLine to v2.0.0-beta1.20303.1

See merge request JFronny/UpTool2!16
2020-06-23 12:14:53 +00:00
J. Fronny
bc7875c512 Update renovate.json 2020-06-23 12:13:46 +00:00
Renovate Bot
2dea7f8138
Update dependency System.CommandLine to v2.0.0-beta1.20303.1 2020-06-23 12:07:00 +00:00
J. Fronny
07ef29d807 Merge branch 'renovate/configure' into 'master'
Configure Renovate

See merge request JFronny/UpTool2!15
2020-06-23 12:06:41 +00:00
Renovate Bot
c59bb90032
Add renovate.json 2020-06-23 09:19:30 +00:00
JFronny
b3bf4f7026 Kleen 2020-06-21 16:46:34 +02:00
J. Fronny
0f48d64121 Generate Installer-gui Zip for usage in website 2020-06-21 13:22:06 +00:00
J. Fronny
984044f1b0 GitHub to GitLab in Installer 2020-06-21 06:51:16 +00:00
J. Fronny
a8479cd577 Update .gitlab-ci.yml 2020-06-21 06:21:12 +00:00
J. Fronny
12b946fdf0 Update README.md, UpToolLib/Tool/XmlTool.cs, UpTool2/Program.cs files 2020-06-21 06:05:35 +00:00
J. Fronny
651992285c Update .gitlab-ci.yml 2020-06-20 11:16:00 +00:00
J. Fronny
4afa77abca Update .gitlab-ci.yml 2020-06-20 11:09:59 +00:00
J. Fronny
bc418aaef6 Update .gitlab-ci.yml 2020-06-20 11:07:38 +00:00
J. Fronny
3291f7c460 Update .gitlab-ci.yml 2020-06-20 10:47:35 +00:00
J. Fronny
50c422b701 Add .gitlab-ci.yml 2020-06-20 10:01:52 +00:00
J. Fronny
24529a59e7 Update README.md 2020-06-20 09:45:38 +00:00
dependabot-preview[bot]
c8eaeebbde Bump CC-Functions.Misc from 1.1.7450.31626 to 1.1.7468.32091
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7450.31626 to 1.1.7468.32091.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7450.31626...1.1.7468.32091)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-15 06:53:52 +02:00
dependabot-preview[bot]
df8099e3d0 Bump SixLabors.ImageSharp from 1.0.0-rc0001 to 1.0.0-rc0002
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 1.0.0-rc0001 to 1.0.0-rc0002.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 11:38:55 +02:00
J. Fronny
5364fa250c
Only add needed files to Release.zip 2020-06-08 12:07:50 +02:00
dependabot-preview[bot]
90a3aacce0 Bump CC-Functions.Misc from 1.1.7448.24408 to 1.1.7450.31626
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7448.24408 to 1.1.7450.31626.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7448.24408...1.1.7450.31626)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-26 08:41:54 +02:00
dependabot-preview[bot]
55cf52df26 Bump CC-Functions.Misc from 1.1.7409.23118 to 1.1.7448.24408
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7409.23118 to 1.1.7448.24408.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7409.23118...1.1.7448.24408)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-24 14:18:39 +02:00
JFronny
802340e418 Hide CLI in GUI-Installer (no longer used) 2020-05-16 18:29:50 +02:00
JFronny
a42b9b624d Fix release builds, clean 2020-05-16 18:19:43 +02:00
JFronny
0ac90790b8 Bugfix, better CLI 2020-05-16 18:04:24 +02:00
dependabot-preview[bot]
8d3bc22af7 Bump SixLabors.ImageSharp from 1.0.0-beta0007 to 1.0.0-rc0001
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 1.0.0-beta0007 to 1.0.0-rc0001.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 14:46:29 +02:00
dependabot-preview[bot]
f58334c8a4 Bump CC-Functions.Misc from 1.1.7399.26972 to 1.1.7409.23118
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7399.26972 to 1.1.7409.23118.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7399.26972...1.1.7409.23118)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-17 10:27:48 +02:00
CreepyCrafter24
eca073fab3 Separate installer CLI 2020-04-09 13:58:06 +02:00
CreepyCrafter24
c186afa8b4 Stage changes 2020-04-08 20:57:50 +02:00
CreepyCrafter24
daca8d5b9a Add install option for app-updates 2020-04-08 19:22:38 +02:00
CreepyCrafter24
a76a09051b Add installer-option for PATH and self-updating on logon 2020-04-08 19:16:14 +02:00
CreepyCrafter24
0fc0b9eead Class containing some duplicate code for Update Checks 2020-04-08 18:41:57 +02:00
CreepyCrafter24
a64d3ab4bc Sleep before install 2020-04-08 18:15:21 +02:00
CreepyCrafter24
b395ab2d81 Fix Version 2020-04-08 18:11:30 +02:00
CreepyCrafter24
2ca1bd5408 Self-update using installer 2020-04-08 18:03:50 +02:00
CreepyCrafter24
29e35dbec0 CLI-Output for Installer 2020-04-08 17:56:54 +02:00
CreepyCrafter24
1ad1d0f8f8 Main.yml: reference installer in main.yml 2020-04-08 17:14:51 +02:00
CreepyCrafter24
5619de376a Init repos from installer 2020-04-08 17:08:51 +02:00
CreepyCrafter24
21dc22965d Create "Platform"-Property for Repos 2020-04-08 16:32:16 +02:00
CreepyCrafter24
5cae428440 Partially untested code for Linux support without Wine 2020-04-08 16:05:09 +02:00
J. Fronny
f931169ebe
fix typo 2020-04-07 21:37:08 +02:00
CreepyCrafter24
1d690c738d Add update count to UpTool2-update 2020-04-07 21:26:25 +02:00
dependabot-preview[bot]
ca89e1c94d Bump CC-Functions.Misc from 1.1.7397.24614 to 1.1.7399.26972
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7397.24614 to 1.1.7399.26972.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7397.24614...1.1.7399.26972)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 18:46:40 +02:00
dependabot-preview[bot]
ac5fc1cd5e Bump CC-Functions.Misc from 1.1.7396.23808 to 1.1.7397.24614
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7396.23808 to 1.1.7397.24614.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7396.23808...1.1.7397.24614)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-04 15:46:20 +02:00
J. Fronny
ff2e7e63de Attempt in GitHub online, will prob. not work 2020-04-02 22:36:11 +02:00
dependabot-preview[bot]
f6acde934e Bump CC-Functions.Misc from 1.1.7388.28729 to 1.1.7396.23808
Bumps [CC-Functions.Misc](https://github.com/JFronny/CC-Functions) from 1.1.7388.28729 to 1.1.7396.23808.
- [Release notes](https://github.com/JFronny/CC-Functions/releases)
- [Commits](https://github.com/JFronny/CC-Functions/compare/1.1.7388.28729...1.1.7396.23808)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-02 15:44:11 +02:00
J. Fronny
b6d2c18b31
Maybe fix 2020-04-02 15:38:51 +02:00
CreepyCrafter24
86009c2d88 Fix major issue 2020-03-24 23:14:40 +01:00
CreepyCrafter24
18c8419495 Random stuff 2020-03-24 22:43:57 +01:00
J. Fronny
4b7980d138
Also add UpToolCLI artifacts to release.zip 2020-03-24 22:03:59 +01:00
CreepyCrafter24
3210028469 Fix a strange edge-case 2020-03-24 21:57:52 +01:00
CreepyCrafter24
101ea5843a Fix some stuff 2020-03-24 21:27:41 +01:00
CreepyCrafter24
d7306150e8 Fix Usings 2020-03-24 20:54:52 +01:00
CreepyCrafter24
023f452b26 Add CLI Tool 2020-03-24 20:53:23 +01:00
CreepyCrafter24
af4b9238be Some misc changes 2020-03-24 14:01:52 +01:00
CreepyCrafter24
f78d68211c Fix download-dialog and hide cmd on removal 2020-03-20 13:03:44 +01:00
CreepyCrafter24
217a088f1e Fancier splash 2020-03-20 12:35:46 +01:00
CreepyCrafter24
8fff6b1500 wot? 2020-03-16 20:31:00 +01:00
CreepyCrafter24
84ab3faf5e improve AppNameDialog 2020-03-16 20:27:10 +01:00
CreepyCrafter24
83552b7c7d fix extension 2020-03-16 20:16:39 +01:00
CreepyCrafter24
723ae1ce7f Some fixes 2020-03-16 20:13:41 +01:00
J. Fronny
50d56aa638
move less important steps to end 2020-03-16 16:23:57 +01:00
J. Fronny
3af40df9da
maybe fix 2020-03-16 16:17:30 +01:00
J. Fronny
e718dd9410
Upload installers 2020-03-16 16:11:29 +01:00
CreepyCrafter24
ecc2512bba Add simple installer 2020-03-16 15:53:32 +01:00
J. Fronny
cd93b126e2
Maybe we don't need nuget 2020-03-16 15:42:43 +01:00
J. Fronny
dd87771004
Maybe we don't need nuget restore? 2020-03-16 15:39:00 +01:00
J. Fronny
cac16d7ce4
Release.zip fix 2020-03-16 15:34:51 +01:00
J. Fronny
b0ed8963df
use dotnet build 2020-03-16 14:12:21 +01:00
CreepyCrafter24
541d1b4bca Change install check to .dll 2020-03-16 14:11:48 +01:00
CreepyCrafter24
c490df56d0 Maybe fix build tools 2020-03-16 13:42:37 +01:00
CreepyCrafter24
59809bf9ec Fix applinks 2020-03-13 20:58:18 +01:00
J. Fronny
07d8649bb2
Clean up main.yml a bit 2020-03-13 20:47:03 +01:00
CreepyCrafter24
81840fe0e8 Fix compile bug 2020-03-13 20:45:15 +01:00
J. Fronny
2c8833f424
Wöt ës wrönk!? 2020-03-13 20:32:20 +01:00
J. Fronny
b5119182a0
Fak u 2020-03-13 20:30:04 +01:00
J. Fronny
e41d68ee73
Wot is wröng? 2020-03-13 20:27:29 +01:00
J. Fronny
4b5819a39b
Update main.yml 2020-03-13 20:20:25 +01:00
CreepyCrafter24
fb17b6daa8 NET Core and some improvements (Build scripts will need to be updated) 2020-03-13 20:16:45 +01:00
J. Fronny
3adf64eda4
Wy are u gae 2020-03-11 21:06:36 +01:00
J. Fronny
7dd664773b
Rename app.xml to tools.xml 2020-03-11 21:02:04 +01:00
CreepyCrafter24
c8f7e149f5 New release-based meta.xml deployment 2020-03-11 20:58:28 +01:00
J. Fronny
73bfbb4bda
Attempt to fix CD 2020-03-11 20:51:42 +01:00
CreepyCrafter24
a32a66062c Add tutorial for auto-deployment to README 2020-03-11 20:40:02 +01:00
CreepyCrafter24
a98c56e6cd Tweak some package-tool scripts 2020-03-11 20:13:42 +01:00
CreepyCrafter24
068d5de355 Fix mainBin when not specified 2020-03-11 19:42:06 +01:00
J. Fronny
43a3f99d1b
Update README.md 2020-03-08 18:07:31 +01:00
CreepyCrafter24
fcaccea7c4 Fix README links 2020-03-08 17:48:48 +01:00
CreepyCrafter24
926a03d19b Clean up some dirs 2020-03-08 17:46:29 +01:00
J. Fronny
d935a710b6
fix Tools hash path 2020-03-08 13:25:33 +01:00
J. Fronny
cc14b94a03
Update deps 2020-03-08 13:23:03 +01:00
J. Fronny
8b1bf15047
Maybe actually fix build 2020-03-08 13:15:21 +01:00
J. Fronny
dc1b4c41b7
Fix build maybe 2020-03-08 13:12:41 +01:00
CreepyCrafter24
441e595f22 Add stopwatch for debugging 2020-03-08 13:10:51 +01:00
CreepyCrafter24
6b75302b3f Fix package build 2020-03-08 13:05:14 +01:00
J. Fronny
c42416bb99
Setup nuget 2020-03-08 13:00:03 +01:00
J. Fronny
cdec7c1188
add nuget restore 2020-03-08 12:54:58 +01:00
CreepyCrafter24
34a7b806e9 Add cool command-line-parser, switch to netcoreapp 2020-03-08 12:51:49 +01:00
J. Fronny
0aef0daf07
Maybe finish package tool autobuild 2020-03-08 11:21:19 +01:00
CreepyCrafter24
abe65a5d38 Merge remote-tracking branch 'origin/master' 2020-03-08 10:17:09 +01:00
J. Fronny
d338be8652
Change msbuild parameters 2020-03-08 10:48:27 +01:00
J. Fronny
583d542029
Maybe output tools zip 2020-03-08 10:42:24 +01:00
CreepyCrafter24
84613264b4 Auto-increment build tool version 2020-03-08 10:16:55 +01:00
CreepyCrafter24
60d0dae5d4 Merge remote-tracking branch 'origin/master' 2020-03-08 09:34:53 +01:00
J. Fronny
74ad681a11
Update main.yml 2020-03-08 10:20:05 +01:00
J. Fronny
e79a5c978c
Clean out some echos 2020-03-08 10:13:43 +01:00
CreepyCrafter24
2ac3118d92 Add post-build script for package tools 2020-03-08 09:34:42 +01:00
CreepyCrafter24
0135092ba2 Merge remote-tracking branch 'origin/master' 2020-03-08 09:05:31 +01:00
CreepyCrafter24
3e63ccbd31 Add package build tools 2020-03-08 09:05:19 +01:00
J. Fronny
d38e575ed2
Move "git config" 2020-02-28 15:01:38 +01:00
J. Fronny
b7f0ce2fbf
Removed code that was most likely very important 2020-02-28 14:59:43 +01:00
J. Fronny
60ba394f48
removed extra args of push-command in main.yml 2020-02-28 14:53:46 +01:00
CreepyCrafter24
44bf5ff322 Fix Release build 2020-02-28 14:31:52 +01:00
CreepyCrafter24
fea9f80001 Maybe fix everything 2020-02-28 14:26:16 +01:00
CreepyCrafter24
46a9bf099b Maybe fix 2020-02-28 13:25:20 +01:00
CreepyCrafter24
af1f9fbfea Improve code 2020-02-28 12:59:59 +01:00
CreepyCrafter24
c87a3790ce update Meta.xml to get all installs to update 2019-12-20 16:52:49 +01:00
CreepyCrafter24
a38be7119b Update readme with links, discord invite might be broken 2019-12-20 16:50:09 +01:00
CreepyCrafter24
9f141b96e7 That one line looks slightly better now 2019-12-20 16:41:39 +01:00
CreepyCrafter24
fa231bfce3 Merge branch 'master' of https://github.com/JFronny/UpTool2 2019-12-20 16:24:57 +01:00
CreepyCrafter24
83583ecb8e Maybe improved updates 2019-12-20 16:24:55 +01:00
J. Fronny
4e7d10a712
Remove useless line 2019-12-20 16:00:39 +01:00
J. Fronny
41229db92e
Works but crashes somehow 2019-12-20 15:51:18 +01:00
J. Fronny
7c6e2feb06
This fixed it on my machine 2019-12-20 15:47:48 +01:00
J. Fronny
febdcbae58
Debugging xml not writing 2019-12-20 15:32:23 +01:00
J. Fronny
a8dde0c008
Wy u no work 2019-12-20 15:27:43 +01:00
J. Fronny
72390bc78e
Plz plz plz work 2019-12-20 15:25:06 +01:00
J. Fronny
2b03f1efde
Wot is remote 2019-12-20 15:18:57 +01:00
J. Fronny
4d73114e8a
Update main.yml 2019-12-20 15:12:38 +01:00
J. Fronny
4cf7b066c2
wood 2019-12-20 15:05:36 +01:00
J. Fronny
ff11222c36
Ouwe 2019-12-20 14:56:35 +01:00
J. Fronny
8b9df336be
Plz wörk 2019-12-20 14:53:30 +01:00
J. Fronny
761669aa5f
This will not work. 2019-12-20 14:49:00 +01:00
J. Fronny
89eebf2f43
Maybe fix
Copy/Paste from https://github.com/marketplace/actions/github-push
2019-12-20 14:21:25 +01:00
J. Fronny
509e262f95
Do it work now? 2019-12-20 14:02:14 +01:00
J. Fronny
1b32911711
wy doe 2019-12-20 13:56:58 +01:00
J. Fronny
928a53faed
were do error be? 2019-12-20 13:55:17 +01:00
J. Fronny
b9c2682e43
Wy u no work 2019-12-20 13:45:07 +01:00
J. Fronny
9536c668ea
Do not delete Release.zip as changes will no longer be pushed 2019-12-20 13:39:21 +01:00
J. Fronny
9af0e9c44a
Attempt to move Meta files to GitHub Gists 2019-12-20 13:37:20 +01:00
Equal
3ef9747c76 This a commit from Github Actions 2019-12-20 12:30:16 +00:00
CreepyCrafter24
fec2d7dcdc Minor stuffs 2019-12-20 13:29:13 +01:00
Equal
6a2a988e9f This a commit from Github Actions 2019-12-20 11:49:30 +00:00
J. Fronny
39e2f72d17
Removed trailing white space in line 34 2019-12-20 12:48:34 +01:00
Equal
f8da8eb6a9 This a commit from Github Actions 2019-12-19 20:46:28 +00:00
J. Fronny
904c4c235e
Maybe fix crash 2019-12-19 21:45:32 +01:00
J. Fronny
2c6913da24
Temporary. Should deliver updates now 2019-12-19 21:43:27 +01:00
J. Fronny
114743c9dd
I don't know how any of this works 2019-12-19 21:28:25 +01:00
J. Fronny
b6cd6a0514
Note to self: that was not a good idea 2019-12-19 21:03:03 +01:00
J. Fronny
405d14c7ce
I dunno what this is supposed to do but the tutorial tells you to do it 2019-12-19 21:00:17 +01:00
J. Fronny
29f4b9ca05
Might work, might not. 2019-12-19 20:53:50 +01:00
J. Fronny
d6b082fcff
Trying to improve main.yml again 2019-12-19 20:46:42 +01:00
Equal
72e3174905 This a commit from Github Actions 2019-12-19 19:18:48 +00:00
CreepyCrafter24
98014ef50b Merge branch 'master' of https://github.com/JFronny/UpTool2 2019-12-19 20:17:49 +01:00
CreepyCrafter24
3533737c79 minor improvement 2019-12-19 20:17:46 +01:00
Equal
cec79b18a1 This a commit from Github Actions 2019-12-19 19:11:33 +00:00
CreepyCrafter24
58673b587b Fixed a bit. I will have to try this in the main branch now! 2019-12-19 20:10:27 +01:00
CreepyCrafter24
92cbacd6f2 did some stuff to automatically install 2019-12-19 19:11:50 +01:00
CreepyCrafter24
aa273fb72a Fixed command 2019-12-19 18:44:28 +01:00
CreepyCrafter24
98c0035d18 No longer create some temporary files. Everything else still needs to be set up to allow for this! 2019-12-19 18:36:43 +01:00
CreepyCrafter24
7d0c62cab7 Removed some old code for updates. This might break stuff 2019-12-19 18:12:17 +01:00
Equal
16e76794d5 This a commit from Github Actions 2019-12-13 12:24:47 +00:00
CreepyCrafter24
ddfed530cc Merge branch 'master' of https://github.com/JFronny/UpTool2 2019-12-13 13:23:50 +01:00
CreepyCrafter24
00287c77a0 Fix CC-F hash 2019-12-13 13:23:20 +01:00
Equal
f5f0d1fc44 This a commit from Github Actions 2019-12-13 12:23:09 +00:00
CreepyCrafter24
76fa6197e7 Updated repo 2019-12-13 13:22:11 +01:00
Equal
7f267ffa3c This a commit from Github Actions 2019-12-11 16:05:22 +00:00
CreepyCrafter24
5cd243fd19 Test 2019-12-11 16:04:10 +01:00
Equal
64a49b7dde This a commit from Github Actions 2019-12-11 15:54:52 +00:00
J. Fronny
f06d0591f9
Use new name in build script 2019-12-11 16:53:54 +01:00
CreepyCrafter24
041ed1ed10 Stuffs to move to new username 2019-12-11 16:00:14 +01:00
Equal
0c5a19adad This a commit from Github Actions 2019-12-01 15:27:45 +00:00
CreepyCrafter24
a18635c280 Merge branch 'master' of https://github.com/CreepyCrafter24/UpTool2 2019-12-01 16:26:51 +01:00
CreepyCrafter24
6051983e81 Update Repo 2019-12-01 16:26:48 +01:00
Equal
6ce735c983 This a commit from Github Actions 2019-11-14 17:53:49 +00:00
CreepyCrafter24
e43178a774 Upd8 2019-11-14 18:53:00 +01:00
Equal
d608284d3c This a commit from Github Actions 2019-11-14 17:21:49 +00:00
CreepyCrafter24
9daa74335d
Why were i still building debug versions? 2019-11-14 18:20:57 +01:00
Equal
88f106b345 This a commit from Github Actions 2019-11-14 17:20:17 +00:00
CreepyCrafter24
f403be8c08
Remove UTF8 BOM 2019-11-14 18:19:24 +01:00
Equal
5aafc1b6a4 This a commit from Github Actions 2019-11-14 17:02:21 +00:00
CreepyCrafter24
c389321273
Update main.yml 2019-11-14 18:01:31 +01:00
CreepyCrafter24
3f9627e072
Maybe automatic updates are now done 2019-11-14 17:57:54 +01:00
CreepyCrafter24
c8b7226b0d
Update Meta.xml 2019-11-13 15:10:09 +01:00
CreepyCrafter24
da0643bbcc
Update Meta.xml 2019-11-13 15:09:25 +01:00
Equal
968ccfea78 This a commit from Github Actions 2019-11-13 14:03:56 +00:00
CreepyCrafter24
ccef7be1c7
Please work please work please work 2019-11-13 15:02:36 +01:00
CreepyCrafter24
a3a8fd511d
Create main.yml 2019-11-13 14:34:29 +01:00
CreepyCrafter24
2036847802
Delete main.yml 2019-11-13 14:18:04 +01:00
CreepyCrafter24
41d7f226f1 Basically nothing 2019-11-13 14:15:45 +01:00
CreepyCrafter24
28a5d3c3f7 Fixes, semantic Versions for apps 2019-11-12 21:23:14 +01:00
CreepyCrafter24
efb9262c2e Refactoving, support for semantic versions in update checks 2019-11-12 20:41:57 +01:00
CreepyCrafter24
8490c54df2 more changes 2019-11-11 16:06:15 +01:00
CreepyCrafter24
2453b05f1c Starting to split up MainForm.cs 2019-11-11 15:48:49 +01:00
CreepyCrafter24
1300a8ab0c More ToDos 2019-11-11 15:23:14 +01:00
CreepyCrafter24
128434f1f7 Improved Updates 2019-11-11 14:41:11 +01:00
CreepyCrafter24
ec18671b4f Updated some apps 2019-11-10 17:38:46 +01:00
CreepyCrafter24
401a2a0be6 More debugging code 2019-11-09 23:46:49 +01:00
CreepyCrafter24
51e8706bee Inproved code quality a bit 2019-11-09 22:52:10 +01:00
CreepyCrafter24
0dccd546ee Updated hash for previous fix 2019-11-09 21:44:10 +01:00
CreepyCrafter24
c9c8e53c4d Fixed 2019-11-09 21:42:28 +01:00
CreepyCrafter24
523f5d1a09 Update Meta 2019-11-09 21:30:29 +01:00
CreepyCrafter24
66276643c5 Possibly fixed 2019-11-09 21:28:41 +01:00
CreepyCrafter24
fdea54711e Moved Update source in code 2019-11-09 21:16:37 +01:00
CreepyCrafter24
fd97986631 Added Meta/Repo files 2019-11-09 21:03:26 +01:00
CreepyCrafter24
66b832a283 General improvements 2019-11-09 20:51:53 +01:00
CreepyCrafter24
77637d1d8a
Added Action for Building
Automatic Builds
2019-11-09 20:40:33 +01:00
CreepyCrafter24
6efa834935
Update ToDo.txt 2019-11-03 10:52:05 +01:00
CreepyCrafter24
7b004a8bda
Update ToDo.txt 2019-11-03 10:47:26 +01:00
CreepyCrafter24
0cffceec40 Allow offline usage 2019-10-21 16:12:07 +02:00
CreepyCrafter24
aa825de124 implemented the worst possible solution for hiding command prompt 2019-10-21 15:35:59 +02:00
CreepyCrafter24
6d9ab20e14 Improved Settings Form a bit 2019-10-21 15:33:09 +02:00
CreepyCrafter24
75c558b8c2 Changed config files a bit 2019-10-21 15:27:52 +02:00
CreepyCrafter24
43fe5c4117 Reworked Settings view 2019-10-21 15:18:08 +02:00
CreepyCrafter24
4e654eebf6 Removed settings file
Save Icons to info.xml
Fixed Bug
2019-10-21 14:39:33 +02:00
CreepyCrafter24
25153e6998 Hide updaters Command-Prompt 2019-10-20 19:20:42 +02:00
CreepyCrafter24
c000acf098 Show Download progress on updates (needs to be tested) 2019-10-20 18:31:32 +02:00
CreepyCrafter24
df04a2002f More changes to speed up usage 2019-10-20 18:25:00 +02:00
CreepyCrafter24
9973bf5d3e Fixed Crash 2019-10-20 15:20:54 +02:00
CreepyCrafter24
be9f76879c Create local repo when fetching Apps 2019-10-20 15:18:21 +02:00
CreepyCrafter24
c91573cff9 Fixed a strange bug 2019-10-12 10:38:38 +02:00
CreepyCrafter24
d8cce87b63 Fixed crash 2019-09-29 16:32:16 +02:00
CreepyCrafter24
8f3075b2eb Added local packages and fixed bugs 2019-09-29 16:19:57 +02:00
CreepyCrafter24
64cefd87f3 Synced files 2019-09-14 14:11:20 +02:00
CreepyCrafter24
114b283715
Update ToDo.txt 2019-09-13 22:43:18 +02:00
CreepyCrafter24
50d5fd6991 Sorted 2019-09-10 12:20:00 +02:00
CreepyCrafter24
cc0201cfb5 Progress Bars 2019-09-10 12:06:15 +02:00
CreepyCrafter24
75c7e2bec8 I dunno 2019-09-10 11:40:04 +02:00
CreepyCrafter24
f4bb25f94a Misc improvements 2019-09-10 10:02:24 +02:00
CreepyCrafter24
617bdb82de visual improvements, new ToDos 2019-09-09 19:18:33 +02:00
CreepyCrafter24
6032a9f03c Scrollbars 2019-09-09 18:07:30 +02:00
CreepyCrafter24
2d6135443f Fixed strange bug (hopefully) 2019-09-09 17:56:41 +02:00
CreepyCrafter24
abbab087e0 Added splash and search 2019-09-09 17:50:33 +02:00
CreepyCrafter24
6c21ecc39d Fixed typo, better debugging 2019-09-09 17:05:53 +02:00
120 changed files with 7218 additions and 858 deletions

103
.gitignore vendored
View File

@ -1,6 +1,6 @@
# Created by https://www.gitignore.io/api/csharp,visualstudio
# Edit at https://www.gitignore.io/?templates=csharp,visualstudio
# Created by https://www.gitignore.io/api/rider,csharp,windows,visualstudio
# Edit at https://www.gitignore.io/?templates=rider,csharp,windows,visualstudio
### Csharp ###
## Ignore Visual Studio temporary files, build results, and
@ -73,7 +73,6 @@ StyleCopReport.xml
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
@ -353,6 +352,102 @@ healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
### VisualStudio ###
# User-specific files
@ -509,4 +604,4 @@ MigrationBackup/
# Backup folder for Package Reference Convert tool in Visual Studio 2017
# End of https://www.gitignore.io/api/csharp,visualstudio
# End of https://www.gitignore.io/api/rider,csharp,windows,visualstudio

72
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,72 @@
.shared_windows_runners:
tags:
- windows
uptool:
extends:
- .shared_windows_runners
stage: deploy
script: |
Invoke-WebRequest -Uri https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
Set-ExecutionPolicy Unrestricted -Scope Process
.\dotnet-install.ps1 -Channel 5.0
$env:Path = "C:\Users\gitlab_runner\AppData\Local\Microsoft\dotnet;" + $env:Path + ";C:\Users\gitlab_runner\AppData\Local\Microsoft\dotnet"
dotnet build --verbosity:m -p:Configuration=Release
cp ".\UpTool build tool\bin\Release\net5.0\package.zip" .\Tools.zip
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpTool2\bin\Release\net5.0-windows\UpTool2.exe
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpTool2\bin\Release\net5.0-windows\*.dll
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpTool2\bin\Release\net5.0-windows\UpTool2.runtimeconfig.json
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpToolCLI\bin\Release\net5.0\uptool.exe
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpToolCLI\bin\Release\net5.0\*.dll
& "C:\Program Files\7-Zip\7z" a .\Release.zip .\UpToolCLI\bin\Release\net5.0\uptool.runtimeconfig.json
$asmver = $([Reflection.Assembly]::Loadfile($(pwd).Path + "\\UpTool2\\bin\\Release\\net5.0-windows\\UpTool2.dll").GetName().version.ToString())
$pkgtoolver = $([Reflection.Assembly]::Loadfile($(pwd).Path + "\\UpTool build tool\\bin\\Release\\net5.0\\pkgtool.dll").GetName().version.ToString())
& "C:\Program Files\7-Zip\7z" a .\Installer-generic.zip .\InstallerCLI\bin\Release\net5.0\Installer.exe
& "C:\Program Files\7-Zip\7z" a .\Installer-generic.zip .\InstallerCLI\bin\Release\net5.0\*.dll
& "C:\Program Files\7-Zip\7z" a .\Installer-generic.zip .\InstallerCLI\bin\Release\net5.0\Installer.runtimeconfig.json
& "C:\Program Files\7-Zip\7z" a .\Installer-generic.zip .\InstallerCLI\Info.txt
& "C:\Program Files\7-Zip\7z" a .\Installer-gui.zip .\Installer\bin\Release\net5.0-windows\Installer.exe
& "C:\Program Files\7-Zip\7z" a .\Installer-gui.zip .\Installer\bin\Release\net5.0-windows\*.dll
& "C:\Program Files\7-Zip\7z" a .\Installer-gui.zip .\Installer\bin\Release\net5.0-windows\Installer.runtimeconfig.json
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
[System.XML.XMLElement]$app=$xml.CreateElement("app")
$xml.appendChild($app)
$app.appendChild($xml.CreateElement("Name")).InnerText = "UpTool2 package tools"
$app.appendChild($xml.CreateElement("Description")).InnerText = "Tools for automating package creation"
$app.appendChild($xml.CreateElement("Version")).InnerText = $pkgtoolver
$app.appendChild($xml.CreateElement("ID")).InnerText = "0e35d154-d0d3-45e0-b080-62f521263a44"
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/Tools.zip"
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\Tools.zip).Hash
$app.appendChild($xml.CreateElement("MainFile")).InnerText = "pkgtool.exe"
$app.appendChild($xml.CreateElement("Icon")).InnerText = "https://gitlab.com/JFronny/UpTool2/-/raw/master/UpTool2.ico"
echo NULL > tools.xml
$xml.save($(gi .\tools.xml).Fullname)
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
[System.XML.XMLElement]$app=$xml.CreateElement("meta")
$xml.appendChild($app)
$app.appendChild($xml.CreateElement("Version")).InnerText = $asmver
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/Release.zip"
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\Release.zip).Hash
$app.appendChild($xml.CreateElement("Installer")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/Installer-generic.zip"
$app.appendChild($xml.CreateElement("InstallerHash")).InnerText = $(Get-FileHash .\Installer-generic.zip).Hash
$app.appendChild($xml.CreateElement("InstallerGui")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/Installer-gui.zip"
$app.appendChild($xml.CreateElement("InstallerGuiHash")).InnerText = $(Get-FileHash .\Installer-gui.zip).Hash
echo NULL > meta.xml
$xml.save($(gi .\meta.xml).Fullname)
#cd Installer
#dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true
#dotnet publish -r win-x86 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true
#cp .\bin\Release\net5.0-windows\win-x64\publish\Installer.exe ..\Installer-x64.exe
#cp .\bin\Release\net5.0-windows\win-x86\publish\Installer.exe ..\Installer-x86.exe
#cd ..
#Installer-x64 and Installer-x86 were also originally artifacts but there doesn't seem to be a x86-64 windows runner
artifacts:
paths:
- Release.zip
- Tools.zip
- Installer-generic.zip
- Installer-gui.zip
- meta.xml
- tools.xml
only:
- master

0
.idea/.gitignore vendored Normal file
View File

2
.idea/.idea.UpTool2/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Default ignored files
/workspace.xml

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
</component>
<component name="ProjectNotificationSettings">
<option name="askShowProject" value="false" />
</component>
</project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.UpTool2/.idea/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.UpTool2/.idea/riderModule.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

39
CLI.md Normal file
View File

@ -0,0 +1,39 @@
# CLI
### Package Management
Installing a package (set \<package> to a file for local): uptool install \<package>
Upgrading a package: uptool upgrade \<package>
Reinstalling a package: uptool reinstall \<package>
Removing a package: uptool remove \<package>
Removing a package and all its configuration and data files: uptool purge \<package>
Upgrade all packages: uptool dist-upgrade
### Cache Management
List installed packages: uptool list
Search for a package: uptool search \<text>
Show package info: uptool show \<package>
Updating the cache: uptool update
### Repos Management
Add a repository: uptool add-repo \<name> \<link>
Remove a repository: uptool remove-repo \<name>
List repositories: uptool list-repo
### Other
Upgrading UpToolCLI: uptool upgrade-self
Start an app: uptool start \<package>

View File

@ -1,14 +0,0 @@
%APPDATA%\UpTool2
- Apps
- __APPNAME
- info.xml
- Version
- package.zip
- Install.bat
- Remove.bat
- Data
- __APPFILES
- app
- __APPFILES
- info.xml
- Version

View File

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>..\UpTool2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UpToolLib\UpToolLib.csproj" />
</ItemGroup>
</Project>

134
Installer/InstallerForm.Designer.cs generated Normal file
View File

@ -0,0 +1,134 @@
namespace Installer
{
partial class InstallerForm
{
/// <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();
}
_lib.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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Installer.InstallerForm));
this.install = new System.Windows.Forms.Button();
this.installLabel = new System.Windows.Forms.Label();
this.progress = new System.Windows.Forms.ProgressBar();
this.processLabel = new System.Windows.Forms.Label();
this.log = new System.Windows.Forms.Button();
this.startupBox = new System.Windows.Forms.CheckBox();
this.pathBox = new System.Windows.Forms.CheckBox();
this.updateAppsBox = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
this.install.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.install.Location = new System.Drawing.Point(12, 116);
this.install.Name = "install";
this.install.Size = new System.Drawing.Size(539, 27);
this.install.TabIndex = 0;
this.install.Text = "Install";
this.install.UseVisualStyleBackColor = true;
this.install.Click += new System.EventHandler(this.install_Click);
this.installLabel.AutoSize = true;
this.installLabel.Location = new System.Drawing.Point(12, 9);
this.installLabel.Name = "installLabel";
this.installLabel.Size = new System.Drawing.Size(550, 75);
this.installLabel.TabIndex = 1;
this.installLabel.Text = resources.GetString("installLabel.Text");
this.progress.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.progress.Location = new System.Drawing.Point(12, 116);
this.progress.Maximum = 8;
this.progress.Name = "progress";
this.progress.Size = new System.Drawing.Size(539, 27);
this.progress.TabIndex = 2;
this.progress.Visible = false;
this.processLabel.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.processLabel.ForeColor = System.Drawing.SystemColors.ControlText;
this.processLabel.Location = new System.Drawing.Point(386, 91);
this.processLabel.Name = "processLabel";
this.processLabel.Size = new System.Drawing.Size(165, 22);
this.processLabel.TabIndex = 3;
this.processLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.log.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.log.Location = new System.Drawing.Point(524, 3);
this.log.Name = "log";
this.log.Size = new System.Drawing.Size(36, 23);
this.log.TabIndex = 4;
this.log.Text = "Log";
this.log.UseVisualStyleBackColor = true;
this.log.Visible = false;
this.log.Click += new System.EventHandler(this.log_Click);
this.startupBox.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.startupBox.AutoSize = true;
this.startupBox.Enabled = false;
this.startupBox.Location = new System.Drawing.Point(130, 91);
this.startupBox.Name = "startupBox";
this.startupBox.Size = new System.Drawing.Size(122, 19);
this.startupBox.TabIndex = 5;
this.startupBox.Text = "Update on Startup";
this.startupBox.CheckedChanged += new System.EventHandler(this.startupBox_CheckedChanged);
this.pathBox.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pathBox.AutoSize = true;
this.pathBox.Location = new System.Drawing.Point(12, 91);
this.pathBox.Name = "pathBox";
this.pathBox.Size = new System.Drawing.Size(112, 19);
this.pathBox.TabIndex = 6;
this.pathBox.Text = "Register in PATH";
this.pathBox.CheckedChanged += new System.EventHandler(this.pathBox_CheckedChanged);
this.updateAppsBox.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.updateAppsBox.AutoSize = true;
this.updateAppsBox.Enabled = false;
this.updateAppsBox.Location = new System.Drawing.Point(258, 91);
this.updateAppsBox.Name = "updateAppsBox";
this.updateAppsBox.Size = new System.Drawing.Size(94, 19);
this.updateAppsBox.TabIndex = 5;
this.updateAppsBox.Text = "Update Apps";
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(563, 156);
this.Controls.Add(this.updateAppsBox);
this.Controls.Add(this.log);
this.Controls.Add(this.processLabel);
this.Controls.Add(this.progress);
this.Controls.Add(this.installLabel);
this.Controls.Add(this.install);
this.Controls.Add(this.startupBox);
this.Controls.Add(this.pathBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Name = "InstallerForm";
this.ShowIcon = false;
this.Text = "UpTool2 Installer";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Button install;
private System.Windows.Forms.Label installLabel;
private System.Windows.Forms.Button log;
private System.Windows.Forms.CheckBox pathBox;
private System.Windows.Forms.Label processLabel;
private System.Windows.Forms.ProgressBar progress;
private System.Windows.Forms.CheckBox startupBox;
private System.Windows.Forms.CheckBox updateAppsBox;
#endregion
}
}

142
Installer/InstallerForm.cs Normal file
View File

@ -0,0 +1,142 @@
using System;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Threading;
using System.Windows.Forms;
using System.Xml.Linq;
using Microsoft.Win32;
using UpToolLib;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace Installer
{
public partial class InstallerForm : Form
{
private const string AppName = "UpTool2";
private readonly RegistryKey _rkApp;
private string _log = "";
private UpToolLibMain _lib;
public InstallerForm()
{
_lib = new UpToolLibMain(new UtLibFunctionsGui(Log));
InitializeComponent();
Step(0, "Initialized");
_log = _log.TrimStart(Environment.NewLine.ToCharArray());
_rkApp = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
pathBox.Checked = !File.Exists(_lib.V1.PathTool.InfoXml) ||
Path.Content.Contains(Path.GetName(_lib.V1.PathTool.GetRelative("Install")));
startupBox.Checked = pathBox.Checked && _rkApp.GetValue(AppName) != null;
updateAppsBox.Checked = pathBox.Checked && startupBox.Checked &&
(string) _rkApp.GetValue(AppName) == "uptool dist-upgrade";
}
private void install_Click(object sender, EventArgs e)
{
log.Visible = false;
try
{
progress.Visible = true;
WebClient client = new();
Step(1, "Downloading metadata");
XElement meta = XDocument
.Load("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/meta.xml?job=uptool")
.Element("meta");
Step(2, "Downloading binary");
byte[] dl = client.DownloadData(meta.Element("File").Value);
Step(3, "Verifying integrity");
using (SHA256CryptoServiceProvider sha256 = new())
{
string pkgHash = BitConverter.ToString(sha256.ComputeHash(dl)).Replace("-", string.Empty).ToUpper();
if (pkgHash != meta.Element("Hash").Value.ToUpper())
throw new Exception(
$@"The hash is not equal to the one stored in the repo:
Package: {pkgHash}
Online: {meta.Element("Hash").Value.ToUpper()}");
}
Step(4, "Extracting");
if (Directory.Exists(_lib.V1.PathTool.GetRelative("Install")))
Directory.Delete(_lib.V1.PathTool.GetRelative("Install"), true);
Directory.CreateDirectory(_lib.V1.PathTool.GetRelative("Install"));
using (MemoryStream ms = new(dl))
{
using ZipArchive ar = new(ms);
ar.ExtractToDirectory(_lib.V1.PathTool.GetRelative("Install"), true);
}
Step(5, "Creating shortcut");
Shortcut.Make(_lib.V1.PathTool.GetRelative("Install", "UpTool2.exe"),
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Programs),
"UpTool2.lnk"));
Step(6, "Preparing Repos");
_lib.V1.XmlTool.FixXml();
_lib.V2.RepoManagement.FetchRepos();
if (pathBox.Checked)
{
Step(7, startupBox.Checked ? "Creating PATH & Autostart entry" : "Creating PATH entry");
if (!Path.Content.Contains(Path.GetName(_lib.V1.PathTool.GetRelative("Install"))))
Path.Append(_lib.V1.PathTool.GetRelative("Install"));
if (startupBox.Checked)
_rkApp.SetValue(AppName, updateAppsBox.Checked ? "uptool dist-upgrade" : "uptool upgrade-self");
else if (_rkApp.GetValue(AppName) != null)
_rkApp.DeleteValue(AppName, false);
}
Step(8, "Done!");
}
catch (Exception ex)
{
Step(progress.Value, $"Failed!{Environment.NewLine}{ex}");
BackColor = Color.Red;
processLabel.Text = "Failed";
new Thread(() =>
{
Thread.Sleep(1000);
Invoke(new Action(() =>
{
BackColor = SystemColors.Control;
progress.Visible = false;
}));
}).Start();
}
finally
{
log.Visible = true;
}
}
private void Step(int p, string text)
{
progress.Value = p;
processLabel.Text = text;
Log(text);
}
private void Log(string text) => _log +=
$"{Environment.NewLine}[{DateTime.Now.ToString(CultureInfo.InvariantCulture).Split(' ')[1]}] {text}";
private void log_Click(object sender, EventArgs e) => new Thread(() => MessageBox.Show(_log)).Start();
private void pathBox_CheckedChanged(object sender, EventArgs e)
{
startupBox.Enabled = pathBox.Checked;
if (!pathBox.Checked)
{
startupBox.Checked = false;
updateAppsBox.Checked = false;
updateAppsBox.Enabled = false;
}
}
private void startupBox_CheckedChanged(object sender, EventArgs e)
{
updateAppsBox.Enabled = startupBox.Checked;
if (!startupBox.Checked)
updateAppsBox.Checked = false;
}
}
}

View File

@ -0,0 +1,355 @@
<root>
<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="installLabel.Text" xml:space="preserve">
<value>Thank you for downloading UpTool2.
To prevent inconsistent behavior you will need to install this before running.
Files will be placed in %appdata%\UpTool2 and %appdata%\Microsoft\Windows\Start Menu\Programs
There will also be a new PATH Entry for your user.
Do you want to continue?</value>
</data>
<assembly alias="System.Drawing.Common" name="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/vDoAPzdyQD6yqkA+bqHAPisYwD4oT0A95wWAPecFgD4oT0A+KxjAPm6
hwD6yqkA/N3JAP7w6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP3s4gD7zrAA/wAADf8AAEv/AACB/wAArf8AAND/AADq/wAA+f8A
AP//AAD5/wAA6v8AAND/AACt/wAAgf8AAEv/AAAN+K5pAPvOsAD97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/OLSAP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACfm8
jAD84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD959sA/wAAG/8AAIH/AADh/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAOH/AACB/wAAG/m9jwD959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP749QD/AAAD/wAAdP8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOH/AAB0/wAAA/vPsgD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r
4AD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
ALf/AABA+byMAP3r4AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////APzj0wD/AABp/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA5f8AAGn4r20A/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAP/AACA/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAgP8AAAP8384A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AACH/wAAA/zj0wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r4AD/AACA/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAID4r20A/evgAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP74
9QD/AABp/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAafm8jAD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA+8+yAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AAAD/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAAt/8AAAP959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAdP8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAB0+b2PAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAG/8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8A
ABv84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAIH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACB+byMAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AADh/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8AAAn97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg+86wAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAsP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAsPiuaQD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A/wAADf8AAPn/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAPn/AAAN/vDoAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/zdyQD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AACB/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AIH6yqkA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAArf8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACt+bqHAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAND/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA0PisYwD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AADq/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOr4oT0A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAA+f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD595wWAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//ecFgD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AAD5/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPn4oT0A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAA6v8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADq+KxjAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8AAND/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA0Pm6hwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACt/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAK36yqkA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAgf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACB/N3JAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/7w
6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAA+f8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA+f8AAA3///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AALD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AALD7zrAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg/eziAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAACf8AAOH/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAACf//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACB/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAgfzi0gD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAG/8AAOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AABv///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAB0/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAHT959sA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8A
ALf/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AALf/AAAD////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAGn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAgP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACH/wAAA////wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8AAID/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/wAAA///
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAaf8A
AOX/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AALf/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AAB0/wAA4f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AAHT/AAAD////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
ABv/AACB/wAA4f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAAgf8AABv///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACf///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAAS/8A
AIH/AACt/wAA0P8AAOr/AAD5/wAA//8AAPn/AADq/wAA0P8AAK3/AACB/wAAS/8AAA3///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////////////////////////////////////////////////////////////////////////
//////8AAf//////+AAAP//////gAAAP/////4AAAAP/////AAAAAf////4AAAAA////+AAAAAA////w
AAAAAB////AAAAAAH///4AAAAAAP///AAAAAAAf//4AAAAAAA///gAAAAAAD//8AAAAAAAH//wAAAAAA
Af/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wA
AAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAA
AH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP//AAAAAAAB//8A
AAAAAAH//4AAAAAAA///gAAAAAAD///AAAAAAAf//+AAAAAAD///8AAAAAAf///wAAAAAB////gAAAAA
P////gAAAAD/////AAAAAf////+AAAAD/////+AAAA//////+AAAP///////AAH/////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

19
Installer/PATH.cs Normal file
View File

@ -0,0 +1,19 @@
using System;
using System.Linq;
namespace Installer
{
public static class Path
{
public static string[] Content
{
get => Environment.GetEnvironmentVariable("path", EnvironmentVariableTarget.User).Split(';');
set => Environment.SetEnvironmentVariable("path", string.Join(';', value), EnvironmentVariableTarget.User);
}
public static void Append(string path, bool escape = true) =>
Content = Content.Append(escape ? GetName(path) : path).ToArray();
public static string GetName(string path) => System.IO.Path.GetFullPath(path);
}
}

21
Installer/Program.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Windows.Forms;
using UpToolLib;
namespace Installer
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new InstallerForm());
}
}
}

124
Installer/Shortcut.cs Normal file
View File

@ -0,0 +1,124 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Installer
{
internal static class Shortcut
{
private static readonly Type MType = Type.GetTypeFromProgID("WScript.Shell");
private static readonly object MShell = Activator.CreateInstance(MType);
public static void Make(string target, string fileName)
{
IWshShortcut shortcut = (IWshShortcut) MType.InvokeMember("CreateShortcut", BindingFlags.InvokeMethod,
null, MShell, new object[] {fileName});
shortcut.TargetPath = target;
shortcut.Save();
}
[ComImport]
[TypeLibType(0x1040)]
[Guid("F935DC23-1CF0-11D0-ADB9-00C04FD58A0B")]
private interface IWshShortcut
{
[DispId(0)]
string FullName
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0)]
get;
}
[DispId(0x3e8)]
string Arguments
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3e8)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3e8)]
set;
}
[DispId(0x3e9)]
string Description
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3e9)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3e9)]
set;
}
[DispId(0x3ea)]
string Hotkey
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ea)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ea)]
set;
}
[DispId(0x3eb)]
string IconLocation
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3eb)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3eb)]
set;
}
[DispId(0x3ec)]
string RelativePath
{
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ec)]
set;
}
[DispId(0x3ed)]
string TargetPath
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ed)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ed)]
set;
}
[DispId(0x3ee)] int WindowStyle { [DispId(0x3ee)] get; [param: In] [DispId(0x3ee)] set; }
[DispId(0x3ef)]
string WorkingDirectory
{
[return: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ef)]
get;
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
[DispId(0x3ef)]
set;
}
[TypeLibFunc(0x40)]
[DispId(0x7d0)]
void Load([In] [MarshalAs(UnmanagedType.BStr)] string pathLink);
[DispId(0x7d1)]
void Save();
}
}
}

View File

@ -0,0 +1,65 @@
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Net;
using System.Windows.Forms;
using UpToolLib.DataStructures;
namespace Installer
{
internal class UtLibFunctionsGui : IExternalFunctionality
{
private readonly Action<string> _log;
public UtLibFunctionsGui(Action<string> log) => _log = log;
public Tuple<bool, byte[]> Download(Uri link)
{
using WebClient cli = new();
try
{
return new Tuple<bool, byte[]>(true, cli.DownloadData(link));
}
catch
{
return new Tuple<bool, byte[]>(false, new byte[0]);
}
}
public string FetchImageB64(Uri link)
{
using WebClient client = new();
Image src = Image.FromStream(
client.OpenRead(link));
Bitmap dest = new(70, 70);
dest.SetResolution(src.HorizontalResolution, src.VerticalResolution);
using (Graphics g = Graphics.FromImage(dest))
{
g.CompositingMode = CompositingMode.SourceCopy;
g.CompositingQuality = CompositingQuality.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
using ImageAttributes wrapMode = new();
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
g.DrawImage(src, new Rectangle(0, 0, 70, 70), 0, 0, src.Width, src.Height,
GraphicsUnit.Pixel, wrapMode);
}
using MemoryStream ms = new();
dest.Save(ms, ImageFormat.Png);
return Convert.ToBase64String(ms.ToArray());
}
public bool YesNoDialog(string text, bool _) =>
MessageBox.Show(text, "", MessageBoxButtons.YesNo) == DialogResult.Yes;
public void OkDialog(string text) => MessageBox.Show(text);
public object GetDefaultIcon() => 0;
public object ImageFromB64(string b64) =>
(Bitmap) new ImageConverter().ConvertFrom(Convert.FromBase64String(b64));
public void Log(string text) => _log(text);
}
}

2
InstallerCLI/Info.txt Normal file
View File

@ -0,0 +1,2 @@
Use "Installer --help" for info
(on non-windows platforms, use the dotnet CLI to run Installer.dll)

View File

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Installer</AssemblyName>
<RootNamespace>Installer</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UpToolLib\UpToolLib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.2" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20574.7" />
</ItemGroup>
</Project>

90
InstallerCLI/Program.cs Normal file
View File

@ -0,0 +1,90 @@
using System;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Security.Cryptography;
using System.Threading;
using UpToolLib;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace Installer
{
public static class Program
{
public static bool Basic;
private static UpToolLibMain _lib;
public static int Main(string[] args)
{
Thread.Sleep(2000);
try
{
Basic = args.Length > 0 && args[0].ToLower() == "--basic";
_lib = new UpToolLibMain(new UtLibFunctions());
RootCommand rootCommand = new();
rootCommand.AddGlobalOption(new Option<bool>("--basic",
"Use only basic console functionality. Must be the first parameter in the call"));
Command install = new("install", "Install UpTool")
{
new Option<bool>(new[] {"--noPrep", "-p"}, "Doesn't initialize repos. Use with caution!")
};
install.AddAlias("-i");
install.AddAlias("i");
install.Handler = CommandHandler.Create<bool>(Install);
rootCommand.AddCommand(install);
return rootCommand.InvokeAsync(args).Result;
}
catch (Exception e)
{
Console.WriteLine($"FAILED: {e}");
return 1;
}
finally
{
_lib?.Dispose();
}
}
private static void Install(bool noPrep)
{
WebClient client = new();
Console.WriteLine("Downloading metadata");
UpdateCheck check =
_lib.V2.UpdateChecker.Check(
"https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/meta.xml?job=uptool");
PathTool pathTool = _lib.V1.PathTool;
Console.WriteLine("Downloading binary");
byte[] dl = client.DownloadData(check.App);
Console.WriteLine("Verifying integrity");
using (SHA256CryptoServiceProvider sha256 = new())
{
string pkgHash = BitConverter.ToString(sha256.ComputeHash(dl)).Replace("-", string.Empty)
.ToUpper();
if (pkgHash != check.AppHash)
throw new Exception($@"The hash is not equal to the one stored in the repo:
Package: {pkgHash}
Online: {check.AppHash}");
}
Console.WriteLine("Extracting");
if (Directory.Exists(pathTool.GetRelative("Install")))
{
foreach (string file in Directory.GetFiles(pathTool.GetRelative("Install"))) File.Delete(file);
foreach (string dir in Directory.GetDirectories(pathTool.GetRelative("Install")))
if (Path.GetFileName(dir) != "tmp")
Directory.Delete(dir, true);
}
Directory.CreateDirectory(pathTool.GetRelative("Install"));
using (MemoryStream ms = new(dl))
{
using ZipArchive ar = new(ms);
ar.ExtractToDirectory(pathTool.GetRelative("Install"), true);
}
if (noPrep) return;
Console.WriteLine("Preparing Repos");
_lib.V1.XmlTool.FixXml();
_lib.V2.RepoManagement.FetchRepos();
}
}
}

View File

@ -0,0 +1,116 @@
using System;
using System.IO;
using System.Net;
using System.Threading;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using UpToolLib.DataStructures;
using static Installer.Program;
namespace Installer
{
public class UtLibFunctions : IExternalFunctionality
{
public Tuple<bool, byte[]> Download(Uri link)
{
using WebClient client = new();
byte[] result = new byte[0];
bool finished = false;
bool success = true;
client.DownloadDataCompleted += (sender, e) =>
{
success = !e.Cancelled;
if (success)
result = e.Result;
finished = true;
};
client.DownloadProgressChanged += (sender, e) =>
{
if (!Basic)
{
Console.Write(
$"{new string('=', e.ProgressPercentage / 10)}[{e.ProgressPercentage}]{new string('-', 10 - e.ProgressPercentage / 10)}");
Console.CursorLeft = 0;
}
};
client.DownloadDataAsync(link);
while (!finished)
Thread.Sleep(100);
return new Tuple<bool, byte[]>(success, result);
}
public string FetchImageB64(Uri link)
{
using WebClient client = new();
using Image image = Image.Load(client.OpenRead(link));
using MemoryStream ms = new();
image.SaveAsPng(ms);
return Convert.ToBase64String(ms.ToArray());
}
public bool YesNoDialog(string text, bool defaultVal)
{
if (Basic)
{
Console.WriteLine(text);
Console.WriteLine($"Selecting: {defaultVal}");
return defaultVal;
}
else
{
bool choosing = true;
bool current = defaultVal;
Console.WriteLine(text);
while (choosing)
{
Console.CursorLeft = 0;
Console.BackgroundColor = current ? ConsoleColor.White : ConsoleColor.Black;
Console.ForegroundColor = current ? ConsoleColor.Black : ConsoleColor.White;
Console.Write("Yes");
Console.ResetColor();
Console.Write(" ");
Console.BackgroundColor = current ? ConsoleColor.Black : ConsoleColor.White;
Console.ForegroundColor = current ? ConsoleColor.White : ConsoleColor.Black;
Console.Write("No");
Console.ResetColor();
switch (Console.ReadKey().Key)
{
case ConsoleKey.LeftArrow:
case ConsoleKey.RightArrow:
current = !current;
break;
case ConsoleKey.Enter:
choosing = false;
break;
case ConsoleKey.Escape:
current = defaultVal;
choosing = false;
break;
}
}
Console.ResetColor();
Console.WriteLine($" Selecting: {current}");
return current;
}
}
public void OkDialog(string text)
{
if (Basic)
Console.WriteLine(text);
else
{
Console.WriteLine(text);
Console.BackgroundColor = ConsoleColor.White;
Console.Write("OK");
Console.ResetColor();
Console.ReadKey();
}
}
public object GetDefaultIcon() => 0;
public object ImageFromB64(string b64) => 0;
public void Log(string text) => Console.WriteLine(text);
}
}

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 J. Fronny
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.

View File

@ -1 +1,58 @@
# UpTool2
Downloading software from online repos since 2019\
[![GitLab pipeline](https://img.shields.io/gitlab/pipeline/JFronny/UpTool2)](https://gitlab.com/JFronny/UpTool2/builds)
[![Discord](https://img.shields.io/discord/466965965658128384)](https://discordapp.com/invite/UjhHBqt)
[![Default Repo](https://img.shields.io/badge/Default-Repo-informational)](https://gitlab.com/JFronny/UpTool2/snippets/1988600)
## How to automate UpTool2 deployments
You will want the assembly version to automatically increment.
To achieve this you have to add this:\
`<Deterministic>false</Deterministic>`\
to your csproj in the main PropertyGroup and change your AssemblyVersion to `1.0.*` or something like this\
Now you can add this\
```if exist "$(SolutionDir)Data\pkgtool.exe" ($(SolutionDir)Data\pkgtool.exe build --noLogo --binDir .) else if exist "%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" ("%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" build --noLogo --binDir .) else echo Cound not find Package build tools, skipping```\
as a PostBuild event to automatically run pkgtool. Customize this if you need to.\
For GitHub actions I wrote [this](https://github.com/JFronny/CC-Clicker/blob/master/.github/workflows/main.yml).\
If you copy it, make sure to replace the descriptions and ID under the `Generate XML` step\
You can also add something like this to your Readme: [![UpTool2](https://img.shields.io/badge/Get%20it-on%20UpTool2-blue)](https://jfronny.gitlab.io/home/uptool)\
(Look at the source for the MD Code)
## Folder layout
- %APPDATA%\UpTool2
- Apps
- __APPGUID
- `info.xml` Local copy of some app information, like [this](https://gitlab.com/JFronny/UpTool2#app-layout) but missing ID, File, Hash, Platform and Icon
- [`package.zip`](https://gitlab.com/JFronny/UpTool2#package-layout) The package that was downloaded on install
- `app` The app install path
- `__APPFILES` Copy of the app files from above, may contain user-configs
- `info.xml` File used by UpTool2 for saving info
- `Version` The installed version. Not used anymore
- `Repos` The list of package repos
- `__REPO` A repository
- `Name` The display name of the repository
- `Link` The source of the repo xml
- `Local Repo` A preprocessed copy of the online repos
- [`__APP`](https://gitlab.com/JFronny/UpTool2#app-layout) A normal app with the icon processed as Base64
- `Install` The folder containing the actual tool
- `__ZIP CONTENTS` The app files
- `tmp` A temporary folder used during updates
- `__FILES FOR UPDATE` The downloaded update files
## Repo layout
- `repo` The main repo tag
- `__APPLINK` Links to external app XMLs
- `__REPOLINK` Links to external repos
- [`__APP`](https://gitlab.com/JFronny/UpTool2#app-layout) Apps
## App layout
- app
- `Name` Name of the application
- `Description` Description that gets displayed on the right panel
- `Version` Version for update checking, might get removed
- `ID` The Guid used for identification
- `File` A link to the package file
- `Hash` The files SHA256 Hash
- `Icon` The apps icon, (optional)
- `MainFile` Main binary, used for starting, (optional)
- `Platform` The platform this works on (optional, defaults to current)
## Package layout
- `Install.bat` The script for installing the app
- `Remove.bat` The script for removing the app
- `Data` The folder containing binaries
- `__APPFILES` The binaries

View File

@ -1,5 +0,0 @@
Automatic Updates for UpTool
ProgressBar for Downloads
Icons
Splash screen
Search

View File

@ -0,0 +1,31 @@
using System;
using System.IO;
namespace UpTool_build_tool
{
internal static class BatchScripts
{
public static Tuple<string, string> Create(bool shortcuts, string? mainBin, string programName,
string? postInstall, string? postRemove)
{
string installBat = "@echo off\r\necho INSTALL";
string removeBat = "@echo off\r\necho REMOVE";
if (shortcuts)
{
installBat += "\r\n";
installBat +=
$@"powershell ""$s=(New-Object -COM WScript.Shell).CreateShortcut('%appdata%\Microsoft\Windows\Start Menu\Programs\{programName}.lnk');$s.TargetPath='%cd%\{Path.GetFileName(mainBin)}';$s.Save()""";
removeBat += "\r\n";
removeBat += $@"del ""%appdata%\Microsoft\Windows\Start Menu\Programs\{programName}.lnk""";
}
if (!string.IsNullOrWhiteSpace(mainBin))
{
removeBat += "\r\n";
removeBat += $@"taskkill /f /im ""{Path.GetFileName(mainBin)}""";
}
installBat += $"\r\n{postInstall}";
removeBat += $"\r\n{postRemove}";
return new Tuple<string, string>(installBat, removeBat);
}
}
}

View File

@ -0,0 +1,95 @@
using System;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using CC_Functions.Core;
namespace UpTool_build_tool
{
internal static class Program
{
public static int Main(string[] args)
{
RootCommand rootCommand = new RootCommand();
Command build = new Command("build", "Builds a generic package with or without shortcuts from a directory")
{
new Option<string>("--binDir", "Directory to package"),
new Option<string>("--mainBin", () => "FIND_BIN", "The applications main binary"),
new Option<string>("--packageFile", "Directory to package"),
new Option<string>("--postInstall", () => "",
"Command(s) to run after installing the package (This will be pasted into the .bat AND .sh file)"),
new Option<string>("--postRemove", () => "",
"Command(s) to run after removing the package (This will be pasted into the .bat AND .sh file)"),
new Option<bool>("--noLogo", "Disables the logo"),
new Option<bool>("--noShortcuts",
"When this is enabled the scripts will not generate a start-menu item"),
new Option<bool>("--noWine",
"This indicates that your program supports multiple platforms natively and doesn't require WINE")
};
build.Handler =
CommandHandler.Create((Action<string?, string, string, string, string, bool, bool, bool>) Build);
rootCommand.AddCommand(build);
return rootCommand.InvokeAsync(args).Result;
}
private static void Build(string? binDir, string? mainBin, string? packageFile, string? postInstall,
string? postRemove, bool noLogo, bool noShortcuts, bool noWine)
{
Stopwatch watch = Stopwatch.StartNew();
if (!noLogo)
{
Console.WriteLine("-------------------------------");
Console.WriteLine("| UpTool2 package build tools |");
Console.WriteLine("-------------------------------");
Console.WriteLine();
Console.WriteLine($"Using version {Assembly.GetExecutingAssembly().GetName().Version}");
Console.WriteLine();
}
Console.WriteLine("Parsing arguments...");
packageFile ??= Path.Combine(binDir, "package.zip");
if (File.Exists(packageFile))
{
Console.WriteLine("Removing previous package...");
File.Delete(packageFile);
}
Console.WriteLine("Copying binary dir...");
using ZipArchive archive = ZipFile.Open(packageFile, ZipArchiveMode.Create);
{
archive.AddDirectory(binDir, "Data", new[] {".xml", ".pdb"}, new[] {packageFile});
Console.WriteLine("Creating batch scripts...");
if (mainBin == "FIND_BIN")
{
string[] tmp = Directory.GetFiles(binDir, "*.exe");
if (tmp.Length > 0)
mainBin = Directory.GetFiles(binDir, "*.exe")[0];
if (tmp.Length > 1)
{
Console.WriteLine(
"Detected multiple EXEs. This is not recommended as all processes running in the app folder will need to be terminated for uninstall to succeed");
Console.WriteLine(
"Please consider removing unnecessary EXEs or notify me that anyone is actually using this.");
}
}
string programName = Path.GetFileNameWithoutExtension(mainBin);
(string installBat, string removeBat) =
BatchScripts.Create(!noShortcuts, mainBin, programName, postInstall, postRemove);
archive.AddFile("Install.bat", installBat);
archive.AddFile("Remove.bat", removeBat);
ShScripts.Create(archive.AddFile, !noShortcuts, mainBin, programName, postInstall, postRemove, !noWine);
}
watch.Stop();
Console.WriteLine($"Completed package creation in {watch.Elapsed}");
Console.WriteLine($"Output file: {Path.GetFullPath(packageFile)}");
}
private static void AddFile(this ZipArchive archive, string fileName, string content)
{
using Stream s = archive.CreateEntry(fileName).Open();
using StreamWriter writer = new StreamWriter(s);
writer.Write(content);
}
}
}

View File

@ -0,0 +1,41 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace UpTool_build_tool
{
internal static class ShScripts
{
public static void Create(Action<string, string> fileSave, bool shortcuts, string? mainBin, string programName,
string? postInstall, string? postRemove, bool wine)
{
Regex rgx = new Regex("[^a-z0-9]");
Regex upRgx = new Regex("[^a-zA-Z0-9 -]");
string lnkName = $"~/.local/share/applications/{rgx.Replace(programName.ToLower(), "")}.desktop";
string installSh = "#!/bin/bash\necho INSTALL";
string removeSh = "#!/bin/bash\necho REMOVE";
if (shortcuts)
{
installSh += $@"
echo ""[Desktop Entry]"" > {lnkName}
echo ""Exec={(wine ? "wine " : "")}{Path.GetFileName(mainBin)}"" >> {lnkName}
echo ""Icon=application/x-shellscript"" >> {lnkName}
echo ""Name={upRgx.Replace(programName, "")}"" >> {lnkName}
echo ""StartupNotify=false"" >> {lnkName}
echo ""Terminal=false"" >> {lnkName}
echo ""Type=Application"" >> {lnkName}";
removeSh += "\r\n";
removeSh += $@"rm {lnkName}";
}
if (!string.IsNullOrWhiteSpace(mainBin))
{
removeSh += "\r\n";
removeSh += $@"pkill -f ""{Path.GetFileName(mainBin)}""";
}
installSh += $"\r\n{postInstall}";
removeSh += $"\r\n{postRemove}";
fileSave("Install.sh", installSh);
fileSave("Remove.sh", removeSh);
}
}
}

View File

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>UpTool_build_tool</RootNamespace>
<AssemblyName>pkgtool</AssemblyName>
<Deterministic>false</Deterministic>
<LangVersion>8</LangVersion>
<Nullable>enable</Nullable>
<AssemblyVersion>1.0.*</AssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent Condition="'$(OS)' != 'Windows_NT'">.\pkgtool build --noLogo --noShortcuts --binDir . --mainBin ""</PostBuildEvent>
<PostBuildEvent Condition="'$(OS)' == 'Windows_NT'">pkgtool.exe build --noLogo --noShortcuts --binDir . --mainBin ""</PostBuildEvent>
<ApplicationIcon>..\UpTool2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CC-Functions.Core" Version="1.1.7628.34181" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20574.7" />
</ItemGroup>
</Project>

BIN
UpTool2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -3,14 +3,38 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpTool2", "UpTool2\UpTool2.csproj", "{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UpTool2", "UpTool2\UpTool2.csproj", "{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9841227C-3F1B-4C32-8123-3DB2CF4E15EE}"
ProjectSection(SolutionItems) = preProject
FolderLayout.txt = FolderLayout.txt
ToDo.txt = ToDo.txt
.gitignore = .gitignore
README.md = README.md
CLI.md = CLI.md
.gitlab-ci.yml = .gitlab-ci.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UpTool build tool", "UpTool build tool\UpTool build tool.csproj", "{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Installer", "Installer\Installer.csproj", "{1D273392-3796-4BE9-A67F-BB402315D52D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpToolLib", "UpToolLib\UpToolLib.csproj", "{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpToolCLI", "UpToolCLI\UpToolCLI.csproj", "{3EC369B9-D927-4A53-BE1A-7E7006081BCE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GUI", "GUI", "{EA919DFD-766B-423C-99DF-C99356592842}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CLI", "CLI", "{3CFAB991-C12A-4B51-BC91-6965133DAF53}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{0E778462-504C-4183-A27E-44EEE7B8CCDD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InstallerCLI", "InstallerCLI\InstallerCLI.csproj", "{493B2CC5-29E9-4F10-A2F5-E10B9584D667}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpToolEto", "UpToolEto\UpToolEto\UpToolEto.csproj", "{213FF69B-426E-475F-8A77-0A20EA4257C2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpToolEto.Gtk", "UpToolEto\UpToolEto.Gtk\UpToolEto.Gtk.csproj", "{8A544AEA-3081-45C9-BED2-7E424EB287B1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpToolEto.Wpf", "UpToolEto\UpToolEto.Wpf\UpToolEto.Wpf.csproj", "{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +45,38 @@ Global
{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}.Release|Any CPU.Build.0 = Release|Any CPU
{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD}.Release|Any CPU.Build.0 = Release|Any CPU
{1D273392-3796-4BE9-A67F-BB402315D52D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D273392-3796-4BE9-A67F-BB402315D52D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D273392-3796-4BE9-A67F-BB402315D52D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D273392-3796-4BE9-A67F-BB402315D52D}.Release|Any CPU.Build.0 = Release|Any CPU
{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2}.Release|Any CPU.Build.0 = Release|Any CPU
{3EC369B9-D927-4A53-BE1A-7E7006081BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EC369B9-D927-4A53-BE1A-7E7006081BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EC369B9-D927-4A53-BE1A-7E7006081BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EC369B9-D927-4A53-BE1A-7E7006081BCE}.Release|Any CPU.Build.0 = Release|Any CPU
{493B2CC5-29E9-4F10-A2F5-E10B9584D667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{493B2CC5-29E9-4F10-A2F5-E10B9584D667}.Debug|Any CPU.Build.0 = Debug|Any CPU
{493B2CC5-29E9-4F10-A2F5-E10B9584D667}.Release|Any CPU.ActiveCfg = Release|Any CPU
{493B2CC5-29E9-4F10-A2F5-E10B9584D667}.Release|Any CPU.Build.0 = Release|Any CPU
{213FF69B-426E-475F-8A77-0A20EA4257C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{213FF69B-426E-475F-8A77-0A20EA4257C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{213FF69B-426E-475F-8A77-0A20EA4257C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{213FF69B-426E-475F-8A77-0A20EA4257C2}.Release|Any CPU.Build.0 = Release|Any CPU
{8A544AEA-3081-45C9-BED2-7E424EB287B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A544AEA-3081-45C9-BED2-7E424EB287B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A544AEA-3081-45C9-BED2-7E424EB287B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A544AEA-3081-45C9-BED2-7E424EB287B1}.Release|Any CPU.Build.0 = Release|Any CPU
{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -28,4 +84,15 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {008127DC-F473-4709-A763-75F5FCED93AB}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{FACD621F-6C6D-4D4B-B322-4364A0F9B4C2} = {0E778462-504C-4183-A27E-44EEE7B8CCDD}
{AAB8D6BA-3A43-4DC4-95EE-6757482B77FD} = {0E778462-504C-4183-A27E-44EEE7B8CCDD}
{C0C1E002-9E13-4E8F-A035-DBDC5128E00E} = {EA919DFD-766B-423C-99DF-C99356592842}
{3EC369B9-D927-4A53-BE1A-7E7006081BCE} = {3CFAB991-C12A-4B51-BC91-6965133DAF53}
{1D273392-3796-4BE9-A67F-BB402315D52D} = {EA919DFD-766B-423C-99DF-C99356592842}
{493B2CC5-29E9-4F10-A2F5-E10B9584D667} = {3CFAB991-C12A-4B51-BC91-6965133DAF53}
{213FF69B-426E-475F-8A77-0A20EA4257C2} = {EA919DFD-766B-423C-99DF-C99356592842}
{8A544AEA-3081-45C9-BED2-7E424EB287B1} = {EA919DFD-766B-423C-99DF-C99356592842}
{C89EC79F-CC2B-4B8E-B4CB-D4DFD30A58AB} = {EA919DFD-766B-423C-99DF-C99356592842}
EndGlobalSection
EndGlobal

2
UpTool2.sln.DotSettings Normal file
View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=pkgtool/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

BIN
UpTool2.xcf Normal file

Binary file not shown.

View File

@ -1,23 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="UpTool2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings>
<UpTool2.Properties.Settings>
<setting name="Repos" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>https://github.com/CreepyCrafter24/UpTool2/releases/download/Repo/Repo.xml</string>
</ArrayOfString>
</value>
</setting>
</UpTool2.Properties.Settings>
</userSettings>
</configuration>

72
UpTool2/AppNameDialog.Designer.cs generated Normal file
View File

@ -0,0 +1,72 @@
using System.ComponentModel;
namespace UpTool2
{
partial class AppNameDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private 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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppNameDialog));
this.nameBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// nameBox
//
this.nameBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.nameBox.Location = new System.Drawing.Point(12, 12);
this.nameBox.Name = "nameBox";
this.nameBox.Size = new System.Drawing.Size(375, 23);
this.nameBox.TabIndex = 0;
this.nameBox.TextChanged += new System.EventHandler(this.nameBox_TextChanged);
this.nameBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.nameBox_KeyDown);
//
// AppNameDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(399, 41);
this.Controls.Add(this.nameBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AppNameDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "App Name";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AppNameDialog_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AppNameDialog_FormClosed);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox nameBox;
}
}

31
UpTool2/AppNameDialog.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Windows.Forms;
namespace UpTool2
{
internal partial class AppNameDialog : Form
{
private string _name;
private AppNameDialog() => InitializeComponent();
public new static string Show()
{
using AppNameDialog dialog = new AppNameDialog();
dialog.ShowDialog();
return dialog._name;
}
private void AppNameDialog_FormClosed(object sender, FormClosedEventArgs e) => _name = nameBox.Text;
private void AppNameDialog_FormClosing(object sender, FormClosingEventArgs e) => _name = nameBox.Text;
private void nameBox_TextChanged(object sender, EventArgs e) => _name = nameBox.Text;
private void nameBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
Close();
}
}
}

348
UpTool2/AppNameDialog.resx Normal file
View File

@ -0,0 +1,348 @@
<root>
<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.Common" name="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/vDoAPzdyQD6yqkA+bqHAPisYwD4oT0A95wWAPecFgD4oT0A+KxjAPm6
hwD6yqkA/N3JAP7w6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP3s4gD7zrAA/wAADf8AAEv/AACB/wAArf8AAND/AADq/wAA+f8A
AP//AAD5/wAA6v8AAND/AACt/wAAgf8AAEv/AAAN+K5pAPvOsAD97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/OLSAP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACfm8
jAD84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD959sA/wAAG/8AAIH/AADh/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAOH/AACB/wAAG/m9jwD959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP749QD/AAAD/wAAdP8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOH/AAB0/wAAA/vPsgD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r
4AD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
ALf/AABA+byMAP3r4AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////APzj0wD/AABp/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA5f8AAGn4r20A/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAP/AACA/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAgP8AAAP8384A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AACH/wAAA/zj0wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r4AD/AACA/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAID4r20A/evgAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP74
9QD/AABp/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAafm8jAD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA+8+yAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AAAD/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAAt/8AAAP959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAdP8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAB0+b2PAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAG/8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8A
ABv84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAIH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACB+byMAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AADh/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8AAAn97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg+86wAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAsP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAsPiuaQD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A/wAADf8AAPn/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAPn/AAAN/vDoAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/zdyQD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AACB/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AIH6yqkA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAArf8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACt+bqHAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAND/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA0PisYwD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AADq/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOr4oT0A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAA+f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD595wWAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//ecFgD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AAD5/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPn4oT0A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAA6v8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADq+KxjAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8AAND/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA0Pm6hwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACt/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAK36yqkA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAgf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACB/N3JAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/7w
6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAA+f8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA+f8AAA3///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AALD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AALD7zrAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg/eziAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAACf8AAOH/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAACf//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACB/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAgfzi0gD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAG/8AAOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AABv///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAB0/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAHT959sA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8A
ALf/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AALf/AAAD////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAGn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAgP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACH/wAAA////wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8AAID/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/wAAA///
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAaf8A
AOX/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AALf/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AAB0/wAA4f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AAHT/AAAD////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
ABv/AACB/wAA4f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAAgf8AABv///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACf///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAAS/8A
AIH/AACt/wAA0P8AAOr/AAD5/wAA//8AAPn/AADq/wAA0P8AAK3/AACB/wAAS/8AAA3///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////////////////////////////////////////////////////////////////////////
//////8AAf//////+AAAP//////gAAAP/////4AAAAP/////AAAAAf////4AAAAA////+AAAAAA////w
AAAAAB////AAAAAAH///4AAAAAAP///AAAAAAAf//4AAAAAAA///gAAAAAAD//8AAAAAAAH//wAAAAAA
Af/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wA
AAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAA
AH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP//AAAAAAAB//8A
AAAAAAH//4AAAAAAA///gAAAAAAD///AAAAAAAf//+AAAAAAD///8AAAAAAf///wAAAAAB////gAAAAA
P////gAAAAD/////AAAAAf////+AAAAD/////+AAAA//////+AAAP///////AAH/////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

View File

@ -1,6 +1,6 @@
namespace UpTool2
{
partial class MainForm
sealed partial class MainForm
{
/// <summary>
/// Required designer variable.
@ -28,8 +28,11 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.sidebarPanel = new System.Windows.Forms.FlowLayoutPanel();
this.infoPanel = new System.Windows.Forms.Panel();
this.action_run = new System.Windows.Forms.Button();
this.action_remove = new System.Windows.Forms.Button();
this.action_update = new System.Windows.Forms.Button();
this.action_install = new System.Windows.Forms.Button();
@ -37,27 +40,39 @@
this.infoPanel_Title = new System.Windows.Forms.Label();
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.optionsPanel = new System.Windows.Forms.Panel();
this.controls_upload = new System.Windows.Forms.Button();
this.filterBox = new System.Windows.Forms.ComboBox();
this.searchBox = new System.Windows.Forms.TextBox();
this.controls_settings = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.controls_reload = new System.Windows.Forms.Button();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.changesButton = new System.Windows.Forms.Button();
this.searchPackageDialog = new System.Windows.Forms.OpenFileDialog();
this.changesPanel = new System.Windows.Forms.Panel();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.changesLabel = new System.Windows.Forms.Label();
this.infoPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
this.optionsPanel.SuspendLayout();
this.changesPanel.SuspendLayout();
this.SuspendLayout();
//
// sidebarPanel
//
this.sidebarPanel.AutoScroll = true;
this.sidebarPanel.BackColor = System.Drawing.SystemColors.ControlLight;
this.sidebarPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.sidebarPanel.Location = new System.Drawing.Point(0, 34);
this.sidebarPanel.Location = new System.Drawing.Point(0, 68);
this.sidebarPanel.Name = "sidebarPanel";
this.sidebarPanel.Size = new System.Drawing.Size(266, 416);
this.sidebarPanel.Size = new System.Drawing.Size(312, 425);
this.sidebarPanel.TabIndex = 0;
//
// infoPanel
//
this.infoPanel.Controls.Add(this.action_run);
this.infoPanel.Controls.Add(this.action_remove);
this.infoPanel.Controls.Add(this.action_update);
this.infoPanel.Controls.Add(this.action_install);
@ -66,18 +81,29 @@
this.infoPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.infoPanel.Location = new System.Drawing.Point(0, 0);
this.infoPanel.Name = "infoPanel";
this.infoPanel.Size = new System.Drawing.Size(530, 450);
this.infoPanel.Size = new System.Drawing.Size(616, 493);
this.infoPanel.TabIndex = 1;
//
// action_run
//
this.action_run.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_run.Location = new System.Drawing.Point(491, 6);
this.action_run.Name = "action_run";
this.action_run.Size = new System.Drawing.Size(27, 27);
this.action_run.TabIndex = 5;
this.action_run.Text = "↗";
this.action_run.UseVisualStyleBackColor = true;
this.action_run.Click += new System.EventHandler(this.Action_run_Click);
//
// action_remove
//
this.action_remove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_remove.Enabled = false;
this.action_remove.Location = new System.Drawing.Point(281, 12);
this.action_remove.Location = new System.Drawing.Point(523, 6);
this.action_remove.Name = "action_remove";
this.action_remove.Size = new System.Drawing.Size(75, 23);
this.action_remove.Size = new System.Drawing.Size(27, 27);
this.action_remove.TabIndex = 4;
this.action_remove.Text = "Remove";
this.action_remove.Text = "🗑";
this.action_remove.UseVisualStyleBackColor = true;
this.action_remove.Click += new System.EventHandler(this.Action_remove_Click);
//
@ -85,11 +111,11 @@
//
this.action_update.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_update.Enabled = false;
this.action_update.Location = new System.Drawing.Point(362, 12);
this.action_update.Location = new System.Drawing.Point(554, 6);
this.action_update.Name = "action_update";
this.action_update.Size = new System.Drawing.Size(75, 23);
this.action_update.Size = new System.Drawing.Size(27, 27);
this.action_update.TabIndex = 3;
this.action_update.Text = "Update";
this.action_update.Text = "";
this.action_update.UseVisualStyleBackColor = true;
this.action_update.Click += new System.EventHandler(this.Action_update_Click);
//
@ -97,26 +123,29 @@
//
this.action_install.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_install.Enabled = false;
this.action_install.Location = new System.Drawing.Point(443, 12);
this.action_install.Location = new System.Drawing.Point(586, 6);
this.action_install.Name = "action_install";
this.action_install.Size = new System.Drawing.Size(75, 23);
this.action_install.Size = new System.Drawing.Size(27, 27);
this.action_install.TabIndex = 2;
this.action_install.Text = "Install";
this.action_install.Text = "";
this.action_install.UseVisualStyleBackColor = true;
this.action_install.Click += new System.EventHandler(this.Action_install_Click);
//
// infoPanel_Description
//
this.infoPanel_Description.Location = new System.Drawing.Point(3, 40);
this.infoPanel_Description.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.infoPanel_Description.Location = new System.Drawing.Point(3, 51);
this.infoPanel_Description.Name = "infoPanel_Description";
this.infoPanel_Description.Size = new System.Drawing.Size(524, 401);
this.infoPanel_Description.Size = new System.Drawing.Size(611, 439);
this.infoPanel_Description.TabIndex = 1;
//
// infoPanel_Title
//
this.infoPanel_Title.AutoSize = true;
this.infoPanel_Title.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.infoPanel_Title.Location = new System.Drawing.Point(3, 9);
this.infoPanel_Title.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.infoPanel_Title.Location = new System.Drawing.Point(2, 1);
this.infoPanel_Title.Name = "infoPanel_Title";
this.infoPanel_Title.Size = new System.Drawing.Size(0, 31);
this.infoPanel_Title.TabIndex = 0;
@ -131,53 +160,155 @@
//
this.splitContainer.Panel1.Controls.Add(this.sidebarPanel);
this.splitContainer.Panel1.Controls.Add(this.optionsPanel);
this.splitContainer.Panel1MinSize = 160;
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.infoPanel);
this.splitContainer.Size = new System.Drawing.Size(800, 450);
this.splitContainer.SplitterDistance = 266;
this.splitContainer.Panel2MinSize = 160;
this.splitContainer.Size = new System.Drawing.Size(933, 493);
this.splitContainer.SplitterDistance = 312;
this.splitContainer.SplitterWidth = 5;
this.splitContainer.TabIndex = 0;
this.splitContainer.TabStop = false;
//
// optionsPanel
//
this.optionsPanel.Controls.Add(this.controls_upload);
this.optionsPanel.Controls.Add(this.filterBox);
this.optionsPanel.Controls.Add(this.searchBox);
this.optionsPanel.Controls.Add(this.controls_settings);
this.optionsPanel.Controls.Add(this.button1);
this.optionsPanel.Controls.Add(this.controls_reload);
this.optionsPanel.Dock = System.Windows.Forms.DockStyle.Top;
this.optionsPanel.Location = new System.Drawing.Point(0, 0);
this.optionsPanel.Name = "optionsPanel";
this.optionsPanel.Size = new System.Drawing.Size(266, 34);
this.optionsPanel.Size = new System.Drawing.Size(312, 68);
this.optionsPanel.TabIndex = 0;
//
// controls_upload
//
this.controls_upload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.controls_upload.Location = new System.Drawing.Point(284, 6);
this.controls_upload.Name = "controls_upload";
this.controls_upload.Size = new System.Drawing.Size(27, 27);
this.controls_upload.TabIndex = 4;
this.controls_upload.Text = "↑";
this.controls_upload.UseVisualStyleBackColor = true;
this.controls_upload.Click += new System.EventHandler(this.controls_upload_Click);
//
// filterBox
//
this.filterBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.filterBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.filterBox.FormattingEnabled = true;
this.filterBox.Location = new System.Drawing.Point(68, 7);
this.filterBox.Name = "filterBox";
this.filterBox.Size = new System.Drawing.Size(209, 23);
this.filterBox.TabIndex = 3;
this.filterBox.SelectedIndexChanged += new System.EventHandler(this.UpdateSidebarV);
//
// searchBox
//
this.searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.searchBox.Location = new System.Drawing.Point(3, 38);
this.searchBox.Name = "searchBox";
this.searchBox.Size = new System.Drawing.Size(307, 23);
this.searchBox.TabIndex = 2;
this.searchBox.TextChanged += new System.EventHandler(this.UpdateSidebarV);
//
// controls_settings
//
this.controls_settings.Location = new System.Drawing.Point(3, 5);
this.controls_settings.Location = new System.Drawing.Point(3, 6);
this.controls_settings.Name = "controls_settings";
this.controls_settings.Size = new System.Drawing.Size(75, 23);
this.controls_settings.Size = new System.Drawing.Size(27, 27);
this.controls_settings.TabIndex = 1;
this.controls_settings.Text = "Settings";
this.controls_settings.Text = "";
this.controls_settings.UseVisualStyleBackColor = true;
this.controls_settings.Click += new System.EventHandler(this.Controls_settings_Click);
//
// button1
// controls_reload
//
this.button1.Location = new System.Drawing.Point(84, 5);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Reload";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
this.controls_reload.Location = new System.Drawing.Point(34, 6);
this.controls_reload.Name = "controls_reload";
this.controls_reload.Size = new System.Drawing.Size(27, 27);
this.controls_reload.TabIndex = 0;
this.controls_reload.Text = "↻";
this.controls_reload.UseVisualStyleBackColor = true;
this.controls_reload.Click += new System.EventHandler(this.Controls_reload_Click);
//
// toolTip
//
this.toolTip.AutoPopDelay = 5000;
this.toolTip.InitialDelay = 300;
this.toolTip.ReshowDelay = 100;
this.toolTip.ShowAlways = true;
//
// changesButton
//
this.changesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.changesButton.Location = new System.Drawing.Point(906, 0);
this.changesButton.Name = "changesButton";
this.changesButton.Size = new System.Drawing.Size(27, 26);
this.changesButton.TabIndex = 4;
this.changesButton.Text = "→";
this.toolTip.SetToolTip(this.changesButton, "Perform changes");
this.changesButton.UseVisualStyleBackColor = true;
this.changesButton.Click += new System.EventHandler(this.changesButton_Click);
//
// searchPackageDialog
//
this.searchPackageDialog.Filter = "Packages (*.zip)|*.zip";
//
// changesPanel
//
this.changesPanel.Controls.Add(this.progressBar1);
this.changesPanel.Controls.Add(this.changesButton);
this.changesPanel.Controls.Add(this.changesLabel);
this.changesPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.changesPanel.Location = new System.Drawing.Point(0, 493);
this.changesPanel.Name = "changesPanel";
this.changesPanel.Size = new System.Drawing.Size(933, 26);
this.changesPanel.TabIndex = 1;
this.changesPanel.Visible = false;
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(714, 0);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(186, 26);
this.progressBar1.Step = 1;
this.progressBar1.TabIndex = 5;
//
// changesLabel
//
this.changesLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.changesLabel.AutoSize = true;
this.changesLabel.Location = new System.Drawing.Point(7, 5);
this.changesLabel.Name = "changesLabel";
this.changesLabel.Size = new System.Drawing.Size(119, 15);
this.changesLabel.TabIndex = 0;
this.changesLabel.Text = "No Changes Selected";
this.changesLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.changesLabel.Click += new System.EventHandler(this.changesLabel_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ClientSize = new System.Drawing.Size(933, 519);
this.Controls.Add(this.splitContainer);
this.Controls.Add(this.changesPanel);
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(631, 269);
this.Name = "MainForm";
this.ShowIcon = false;
this.Text = "UpTool 2";
this.Load += new System.EventHandler(this.MainForm_Load);
this.infoPanel.ResumeLayout(false);
this.infoPanel.PerformLayout();
this.splitContainer.Panel1.ResumeLayout(false);
@ -185,11 +316,14 @@
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
this.optionsPanel.ResumeLayout(false);
this.optionsPanel.PerformLayout();
this.changesPanel.ResumeLayout(false);
this.changesPanel.PerformLayout();
this.ResumeLayout(false);
}
#endregion
#endregion
private System.Windows.Forms.FlowLayoutPanel sidebarPanel;
private System.Windows.Forms.Panel infoPanel;
@ -198,10 +332,20 @@
private System.Windows.Forms.Label infoPanel_Description;
private System.Windows.Forms.Panel optionsPanel;
private System.Windows.Forms.Button controls_settings;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button controls_reload;
private System.Windows.Forms.Button action_install;
private System.Windows.Forms.Button action_remove;
private System.Windows.Forms.Button action_update;
private System.Windows.Forms.TextBox searchBox;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.ComboBox filterBox;
private System.Windows.Forms.Button action_run;
private System.Windows.Forms.Button controls_upload;
private System.Windows.Forms.OpenFileDialog searchPackageDialog;
private System.Windows.Forms.Panel changesPanel;
private System.Windows.Forms.Label changesLabel;
private System.Windows.Forms.Button changesButton;
private System.Windows.Forms.ProgressBar progressBar1;
}
}

View File

@ -1,216 +1,347 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UpTool2.Properties;
using System.Xml;
using System.Xml.Linq;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using UpToolLib;
using UpToolLib.DataStructures;
using System.Diagnostics;
using System.IO.Compression;
using System.Security.Cryptography;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpTool2
{
public partial class MainForm : Form
public sealed partial class MainForm : Form
{
List<App> apps = new List<App>();
string dir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\UpTool2";
private readonly HelpEventHandler _help;
private List<AppTask> _tasks;
public MainForm()
{
InitializeComponent();
reloadElements();
if (!Directory.Exists(dir + @"\Apps"))
Directory.CreateDirectory(dir + @"\Apps");
}
void reloadElements()
{
//remove
action_install.Enabled = false;
action_remove.Enabled = false;
action_update.Enabled = false;
infoPanel_Title.Text = "";
infoPanel_Description.Text = "";
int F = sidebarPanel.Controls.Count;
for (int i = 0; i < F; i++)
_tasks = new List<AppTask>();
_help = MainForm_HelpRequested;
HelpRequested += _help;
filterBox.DataSource = Enum.GetValues(typeof(Status));
if (Program.Online)
{
sidebarPanel.Controls[0].Dispose();
Program.SetSplash(8, "Fetching repositories");
Program.Lib.V2.RepoManagement.FetchRepos();
}
apps.Clear();
//add
WebClient client = new WebClient();
for (int i = 0; i < Settings.Default.Repos.Count; i++)
else
{
try
{
//extract info
XDocument repo = XDocument.Load(Settings.Default.Repos[i]);
foreach (XElement el in repo.Element("repo").Elements("app"))
{
string name = el.Element("Name").Value;
string description = el.Element("Description").Value;
int version = int.Parse(el.Element("Version").Value);
string file = el.Element("File").Value;
string hash = el.Element("Hash").Value;
Guid ID = Guid.Parse(el.Element("ID").Value);
Color color = ColorTranslator.FromHtml(el.Element("Color").Value);
Image icon = Image.FromStream(client.OpenRead(el.Element("Icon").Value));
App app = new App(name, description, version, file, hash, ID, color, icon);
apps.Add(app);
//generate UI elements
Panel sidebarIcon = new Panel();
sidebarIcon.BackColor = color;
sidebarIcon.Size = new Size(70, 70);
sidebarIcon.Click += (object sender, EventArgs e) => {
infoPanel_Title.Text = name;
infoPanel_Description.Text = description;
action_install.Tag = app;
action_install.Enabled = !Directory.Exists(dir + @"\Apps\" + ID.ToString());
action_remove.Tag = app;
action_remove.Enabled = Directory.Exists(dir + @"\Apps\" + ID.ToString());
action_update.Tag = app;
string xml = dir + @"\Apps\" + ID.ToString() + @"\info.xml";
action_update.Enabled = File.Exists(xml) && int.Parse(XDocument.Load(xml).Element("app").Element("Version").Value) < version;
};
sidebarIcon.Paint += (object sender, PaintEventArgs e) => {
e.Graphics.DrawImage(icon, 0, 0, sidebarIcon.Width, sidebarIcon.Height);
string text = "NGL";
Font font = new Font(FontFamily.GenericSansSerif, 10);
SizeF tmp = e.Graphics.MeasureString(text, font);
e.Graphics.DrawString(text, font, new SolidBrush(Color.Black), (sidebarIcon.Width - tmp.Width) / 2, sidebarIcon.Height - tmp.Height);
};
sidebarPanel.Controls.Add(sidebarIcon);
}
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), "Failed to load repo: " + Settings.Default.Repos[i]);
}
MessageBox.Show("Starting in offline mode!");
controls_reload.Enabled = false;
filterBox.Enabled = false;
filterBox.SelectedIndex = 2;
}
client.Dispose();
}
private void Controls_settings_Click(object sender, EventArgs e) => new SettingsForm().Show();
private void Button1_Click(object sender, EventArgs e) => reloadElements();
private struct App : IEquatable<App>
{
public string name;
public string description;
public int version;
public string file;
public string hash;
public Guid ID;
public Color color;
public Image Icon;
public App(string name, string description, int version, string file, string hash, Guid iD, Color color, Image icon)
{
this.name = name ?? throw new ArgumentNullException(nameof(name));
this.description = description ?? throw new ArgumentNullException(nameof(description));
this.version = version;
this.file = file ?? throw new ArgumentNullException(nameof(file));
this.hash = hash ?? throw new ArgumentNullException(nameof(hash));
ID = iD;
this.color = color;
Icon = icon ?? throw new ArgumentNullException(nameof(icon));
}
public override bool Equals(object obj) => obj is App app && Equals(app);
public bool Equals(App other) => ID.Equals(other.ID);
public override int GetHashCode() => 1213502048 + EqualityComparer<Guid>.Default.GetHashCode(ID);
public static bool operator ==(App left, App right) => left.Equals(right);
public static bool operator !=(App left, App right) => !(left == right);
}
bool relE = true;
private void Action_remove_Click(object sender, EventArgs e)
{
try
{
string app = dir + @"\Apps\" + ((App)action_remove.Tag).ID.ToString();
string tmp = dir + @"\tmp";
if (Directory.Exists(tmp))
Directory.Delete(tmp, true);
Directory.CreateDirectory(tmp);
ZipFile.ExtractToDirectory(app + @"\package.zip", tmp);
Process.Start(new ProcessStartInfo { FileName = "cmd.exe", Arguments = "/C \"" + tmp + "\\Remove.bat\"", WorkingDirectory = app + @"\app" }).WaitForExit();
Directory.Delete(tmp, true);
Directory.Delete(app, true);
if (relE)
reloadElements();
}
catch (Exception e1)
{
if (!relE)
throw;
MessageBox.Show(e1.ToString(), "Removal failed");
}
}
private void Action_update_Click(object sender, EventArgs e)
{
try
{
relE = false;
Action_remove_Click(sender, e);
Action_install_Click(sender, e);
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString(), "Install failed");
}
relE = true;
Program.SetSplash(9, "Reloading data");
ReloadElements();
if (!Directory.Exists(Program.Lib.V1.PathTool.AppsPath))
Directory.CreateDirectory(Program.Lib.V1.PathTool.AppsPath);
}
private void Action_install_Click(object sender, EventArgs e)
{
string app = "";
string tmp = "";
App tmp = (App) action_install.Tag;
if (_tasks.Any(s => s is InstallTask t && t.App == tmp))
{
_tasks = _tasks.Where(s => !(s is InstallTask t) || t.App != tmp).ToList();
action_install.ResetBackColor();
}
else
{
_tasks.Add(Program.Lib.V2.TaskFactory.CreateInstall(tmp, ReloadElements));
action_install.BackColor = Color.Green;
}
UpdateChangesLabel();
}
private void Action_remove_Click(object sender, EventArgs e)
{
App tmp = (App) action_install.Tag;
if (_tasks.Any(s => s is RemoveTask t && t.App == tmp))
{
_tasks = _tasks.Where(s => !(s is RemoveTask t) || t.App != tmp).ToList();
action_remove.ResetBackColor();
}
else
{
_tasks.Add(Program.Lib.V2.TaskFactory.CreateRemove(tmp, ReloadElements));
action_remove.BackColor = Color.Green;
}
UpdateChangesLabel();
}
private void controls_upload_Click(object sender, EventArgs e)
{
if (searchPackageDialog.ShowDialog() != DialogResult.OK)
return;
if (!_tasks.Any(s => s is UploadTask t && t.ZipFile == searchPackageDialog.FileName))
_tasks.Add(Program.Lib.V2.TaskFactory.CreateUpload(searchPackageDialog.FileName, AppNameDialog.Show(), ReloadElements));
UpdateChangesLabel();
}
private void Action_update_Click(object sender, EventArgs e)
{
App tmp = (App) action_install.Tag;
if (_tasks.Any(s => s is UpdateTask t && t.App == tmp))
{
_tasks = _tasks.Where(s => !(s is UpdateTask t) || t.App != tmp).ToList();
action_update.ResetBackColor();
}
else
{
_tasks.Add(Program.Lib.V2.TaskFactory.CreateUpdate(tmp, ReloadElements));
action_update.BackColor = Color.Green;
}
UpdateChangesLabel();
}
private void ReloadElements()
{
//remove
toolTip.RemoveAll();
ClearSelection();
infoPanel_Title.Invalidate();
infoPanel_Description.Invalidate();
int f = sidebarPanel.Controls.Count;
for (int i = 0; i < f; i++) sidebarPanel.Controls[0].Dispose();
Program.Lib.V1.Apps.Clear();
//add
toolTip.SetToolTip(controls_settings, "Settings");
toolTip.SetToolTip(controls_reload, "Refresh repositories");
toolTip.SetToolTip(controls_upload, "Install package from disk");
toolTip.SetToolTip(filterBox, "Filter");
toolTip.SetToolTip(action_install, "Install");
toolTip.SetToolTip(action_remove, "Remove");
toolTip.SetToolTip(action_update, "Update");
toolTip.SetToolTip(action_run, "Run");
Program.Lib.V2.RepoManagement.GetReposFromDisk();
int availableUpdates = 0;
foreach (App app in Program.Lib.V1.Apps.Values)
{
Panel sidebarIcon = new Panel
{
Tag = app,
BackColor = app.Color,
Size = new Size(70, 70),
BackgroundImage = (Bitmap) app.Icon,
BackgroundImageLayout = ImageLayout.Stretch
};
sidebarIcon.Paint += (sender, args) =>
{
args.Graphics.Clear(sidebarIcon.BackColor);
args.Graphics.DrawImage(sidebarIcon.BackgroundImage, args.ClipRectangle,
new Rectangle(new Point(0, 0), sidebarIcon.BackgroundImage.Size), GraphicsUnit.Pixel);
};
bool updateable = !app.Local && app.Status.Contains(Status.Updatable);
sidebarIcon.Click += (sender, e) =>
{
infoPanel_Title.Text = app.Name;
infoPanel_Title.ForeColor = app.Local ? Color.Red : Color.Black;
infoPanel_Description.Text = app.Description;
action_install.Tag = app;
action_install.Enabled = !(app.Local || Directory.Exists(app.AppPath));
if (_tasks.Any(s => s is InstallTask t && t.App == app))
action_install.BackColor = Color.Green;
else
action_install.ResetBackColor();
action_remove.Tag = app;
action_remove.Enabled = Directory.Exists(app.AppPath);
if (_tasks.Any(s => s is RemoveTask t && t.App == app))
action_remove.BackColor = Color.Green;
else
action_remove.ResetBackColor();
action_update.Tag = app;
action_update.Enabled = updateable;
if (_tasks.Any(s => s is UpdateTask t && t.App == app))
action_update.BackColor = Color.Green;
else
action_update.ResetBackColor();
action_run.Tag = app;
action_run.Enabled = app.Status.Contains(Status.Installed) && !app.Local &&
app.Runnable && Directory.Exists(app.AppPath);
};
if (updateable)
availableUpdates++;
toolTip.SetToolTip(sidebarIcon, app.Name);
sidebarPanel.Controls.Add(sidebarIcon);
}
UpdateSidebarV(null, null);
Text =
$"UpTool2 {(availableUpdates == 0 ? "(All up-to-date)" : $"({availableUpdates} Updates)")}";
}
private void Action_run_Click(object sender, EventArgs e)
{
try
{
App appI = (App)action_install.Tag;
app = dir + @"\Apps\" + appI.ID.ToString();
tmp = dir + @"\tmp";
if (Directory.Exists(tmp))
Directory.Delete(tmp, true);
Directory.CreateDirectory(tmp);
if (Directory.Exists(app))
Directory.Delete(app, true);
Directory.CreateDirectory(app);
using (var client = new WebClient())
{
client.DownloadFile(appI.file, app + @"\package.zip");
}
SHA256CryptoServiceProvider sha256 = new SHA256CryptoServiceProvider();
if (BitConverter.ToString(sha256.ComputeHash(File.ReadAllBytes(app + @"\package.zip"))).Replace("-", string.Empty).ToUpper() != appI.hash)
throw new Exception("The hash is not equal to the one stored in the repo");
sha256.Dispose();
ZipFile.ExtractToDirectory(app + @"\package.zip", tmp);
Directory.Move(tmp + @"\Data", app + @"\app");
Process.Start(new ProcessStartInfo { FileName = "cmd.exe", Arguments = "/C \"" + tmp + "\\Install.bat\"", WorkingDirectory = app + @"\app" }).WaitForExit();
new XElement("app", new XElement("Version", appI.version)).Save(app + @"\info.xml");
Directory.Delete(tmp, true);
if (relE)
reloadElements();
Program.Lib.V1.AppExtras.RunApp((App) action_run.Tag);
}
catch (Exception e1)
{
if (!relE)
throw;
if (Directory.Exists(tmp))
Directory.Delete(tmp, true);
if (Directory.Exists(app))
Directory.Delete(app, true);
MessageBox.Show(e1.ToString(), "Install failed");
MessageBox.Show($"{e1}Failed to start!");
}
}
private void Controls_reload_Click(object sender, EventArgs e)
{
Enabled = false;
if (MessageBox.Show("This may take a few minutes. Are you sure?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
new Thread(() =>
{
Program.Lib.V2.RepoManagement.FetchRepos();
Invoke((Action) (() =>
{
ReloadElements();
Enabled = true;
}));
}).Start();
}
}
private void Controls_settings_Click(object sender, EventArgs e) => new SettingsForms().ShowDialog();
private void ClearSelection()
{
action_install.Enabled = false;
action_install.ResetBackColor();
action_remove.Enabled = false;
action_remove.ResetBackColor();
action_update.Enabled = false;
action_update.ResetBackColor();
action_run.Enabled = false;
action_run.ResetBackColor();
infoPanel_Title.Text = "";
infoPanel_Description.Text = "";
}
private void UpdateSidebarV(object sender, EventArgs e)
{
if (searchBox.Text == "!DEBUG:PRINT!")
{
searchBox.Text = "!DEBUG:PRINT";
string tmpFile = Path.GetTempFileName();
File.WriteAllText(tmpFile,
string.Join("\r\n\r\n",
Program.Lib.V1.Apps.Values.Select(app => app.ToString()).Concat(new[]
{
$"Assembly version: {Assembly.GetExecutingAssembly().GetName().Version}"
}).ToArray()));
new Thread(() =>
{
Process.Start("notepad", tmpFile).WaitForExit();
File.Delete(tmpFile);
}).Start();
}
else
{
App[] apps = Program.Lib.V1.AppExtras.FindApps(searchBox.Text);
Enum.TryParse(filterBox.SelectedValue.ToString(), out Status status);
for (int i = 0; i < sidebarPanel.Controls.Count; i++)
{
Panel sidebarIcon = (Panel) sidebarPanel.Controls[i];
App app = (App) sidebarIcon.Tag;
sidebarIcon.Visible = apps.Contains(app) && app.Status.Contains(Program.Online ? status : Status.Installed);
}
ClearSelection();
}
}
private void MainForm_Load(object sender, EventArgs e)
{
if (Program.Splash.IsDisposed)
Close();
else
{
Program.Splash.Invoke((Action) Program.Splash.Hide);
BringToFront();
UpdateChangesLabel(false);
}
}
private static DateTime GetBuildDateTime(Assembly assembly)
{
string location = assembly.Location;
const int headerOffset = 60;
const int linkerTimestampOffset = 8;
byte[] buffer = new byte[2048];
Stream? stream = null;
try
{
stream = new FileStream(location, FileMode.Open, FileAccess.Read);
stream.Read(buffer, 0, 2048);
}
finally
{
stream?.Close();
}
int i = BitConverter.ToInt32(buffer, headerOffset);
int secondsSince1970 = BitConverter.ToInt32(buffer, i + linkerTimestampOffset);
DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0);
dt = dt.AddSeconds(secondsSince1970);
dt = TimeZoneInfo.ConvertTimeToUtc(dt);
return dt;
}
private void MainForm_HelpRequested(object sender, HelpEventArgs hlpEvent)
{
HelpRequested -= _help;
try
{
DateTime buildTime = GetBuildDateTime(Assembly.GetExecutingAssembly());
MessageBox.Show($@"UpTool2 by JFronny
Version: {Assembly.GetExecutingAssembly().GetName().Version}
Build Date: {buildTime:dd.MM.yyyy}", "UpTool2");
}
finally
{
HelpRequested += _help;
hlpEvent.Handled = true;
}
}
private void changesButton_Click(object sender, EventArgs e)
{
if (TaskPreview.Show(ref _tasks, true))
{
progressBar1.Maximum = _tasks.Count;
progressBar1.Value = 0;
foreach (AppTask task in _tasks)
{
task.Run();
progressBar1.PerformStep();
}
_tasks.Clear();
UpdateChangesLabel();
}
}
private void changesLabel_Click(object sender, EventArgs e)
{
TaskPreview.Show(ref _tasks, false);
UpdateChangesLabel();
}
private void UpdateChangesLabel(bool showPanel = true)
{
changesPanel.Visible = showPanel;
changesButton.Enabled = _tasks.Count > 0;
progressBar1.Maximum = _tasks.Count;
changesLabel.Text = _tasks.Count switch
{
0 => "No Changes Selected",
1 => "1 Change Selected",
_ => $"{_tasks.Count} Changes Selected"
};
}
}
}
}

View File

@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">
@ -117,4 +57,292 @@
<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.Common" name="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/vDoAPzdyQD6yqkA+bqHAPisYwD4oT0A95wWAPecFgD4oT0A+KxjAPm6
hwD6yqkA/N3JAP7w6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP3s4gD7zrAA/wAADf8AAEv/AACB/wAArf8AAND/AADq/wAA+f8A
AP//AAD5/wAA6v8AAND/AACt/wAAgf8AAEv/AAAN+K5pAPvOsAD97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/OLSAP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACfm8
jAD84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD959sA/wAAG/8AAIH/AADh/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAOH/AACB/wAAG/m9jwD959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP749QD/AAAD/wAAdP8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOH/AAB0/wAAA/vPsgD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r
4AD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
ALf/AABA+byMAP3r4AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////APzj0wD/AABp/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA5f8AAGn4r20A/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAP/AACA/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAgP8AAAP8384A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AACH/wAAA/zj0wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r4AD/AACA/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAID4r20A/evgAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP74
9QD/AABp/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAafm8jAD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA+8+yAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AAAD/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAAt/8AAAP959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAdP8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAB0+b2PAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAG/8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8A
ABv84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAIH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACB+byMAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AADh/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8AAAn97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg+86wAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAsP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAsPiuaQD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A/wAADf8AAPn/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAPn/AAAN/vDoAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/zdyQD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AACB/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AIH6yqkA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAArf8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACt+bqHAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAND/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA0PisYwD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AADq/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOr4oT0A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAA+f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD595wWAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//ecFgD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AAD5/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPn4oT0A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAA6v8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADq+KxjAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8AAND/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA0Pm6hwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACt/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAK36yqkA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAgf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACB/N3JAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/7w
6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAA+f8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA+f8AAA3///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AALD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AALD7zrAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg/eziAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAACf8AAOH/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAACf//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACB/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAgfzi0gD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAG/8AAOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AABv///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAB0/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAHT959sA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8A
ALf/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AALf/AAAD////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAGn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAgP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACH/wAAA////wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8AAID/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/wAAA///
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAaf8A
AOX/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AALf/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AAB0/wAA4f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AAHT/AAAD////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
ABv/AACB/wAA4f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAAgf8AABv///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACf///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAAS/8A
AIH/AACt/wAA0P8AAOr/AAD5/wAA//8AAPn/AADq/wAA0P8AAK3/AACB/wAAS/8AAA3///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////////////////////////////////////////////////////////////////////////
//////8AAf//////+AAAP//////gAAAP/////4AAAAP/////AAAAAf////4AAAAA////+AAAAAA////w
AAAAAB////AAAAAAH///4AAAAAAP///AAAAAAAf//4AAAAAAA///gAAAAAAD//8AAAAAAAH//wAAAAAA
Af/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wA
AAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAA
AH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP//AAAAAAAB//8A
AAAAAAH//4AAAAAAA///gAAAAAAD///AAAAAAAf//+AAAAAAD///8AAAAAAf///wAAAAAB////gAAAAA
P////gAAAAD/////AAAAAf////+AAAAD/////+AAAA//////+AAAP///////AAH/////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

View File

@ -1,87 +1,219 @@
using System;
using System.Collections.Generic;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.IO.Compression;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security.Cryptography;
using System.Security.Principal;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using System.Xml;
using UpTool2.Tool;
using UpToolLib;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace UpTool2
{
static class Program
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
public static Form? Splash;
private static int _splashProgress;
private static string? _splashMessage;
public static bool Online;
public static UpToolLibMain Lib;
[STAThread]
static void Main()
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string appGuid = ((GuidAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), false).GetValue(0)).Value.ToString();
string mutexId = string.Format("Global\\{{{0}}}", appGuid);
bool createdNew;
var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);
var securitySettings = new MutexSecurity();
securitySettings.AddAccessRule(allowEveryoneRule);
using (var mutex = new Mutex(false, mutexId, out createdNew, securitySettings))
BuildSplash();
Splash.Show();
try
{
var hasHandle = false;
Lib = new UpToolLibMain(new UtLibFunctions());
}
catch (MutexLockLockedException)
{
Console.WriteLine("Mutex property of other process, quitting");
Process[] processes = Process.GetProcessesByName("UpTool2");
if (processes.Length > 0)
WindowHelper.BringProcessToFront(Process.GetProcessesByName("UpTool2")[0]);
return;
}
#if !DEBUG
try
{
#endif
SetSplash(1, "Initializing paths");
if (!Directory.Exists(Lib.V1.PathTool.Dir))
Directory.CreateDirectory(Lib.V1.PathTool.Dir);
FixXml();
SetSplash(2, "Performing checks");
try
{
try
{
hasHandle = mutex.WaitOne(5000, false);
if (hasHandle == false)
throw new TimeoutException("Timeout waiting for exclusive access");
}
catch (AbandonedMutexException)
{
#if DEBUG
Console.WriteLine("Mutex abandoned");
Lib.V2.UpdateChecker.Check();
Online = true;
}
catch
{
Online = false;
}
if (!Directory.Exists(Lib.V1.PathTool.GetRelative("Apps")))
Directory.CreateDirectory(Lib.V1.PathTool.GetRelative("Apps"));
if (!Online)
SetSplash(7, "Opening");
if (!Online || UpdateCheck())
Application.Run(new MainForm());
#if !DEBUG
}
catch (Exception e1)
{
try
{
Splash.Invoke((Action) Splash.Hide);
}
catch
{
Console.WriteLine("Failed to hide splash");
}
MessageBox.Show(e1.ToString());
}
finally
{
Lib.Dispose();
}
#endif
hasHandle = true;
}
string dir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\UpTool2";
string xml = dir + @"\info.xml";
if (!File.Exists(xml))
new XElement("meta", new XElement("Version", 0)).Save(xml);
XElement meta = XDocument.Load("https://github.com/CreepyCrafter24/UpTool2/releases/download/Repo/Repo.xml").Element("meta");
int version = int.Parse(meta.Element("Version").Value);
if (int.Parse(XDocument.Load(xml).Element("meta").Element("Version").Value) < version)
}
private static void BuildSplash()
{
Splash = new Form
{
StartPosition = FormStartPosition.CenterScreen,
FormBorderStyle = FormBorderStyle.None,
ControlBox = false,
MaximizeBox = false,
MinimizeBox = false,
ShowIcon = false,
ShowInTaskbar = false,
Size = new Size(700, 400),
BackColor = Color.Black
};
Splash.MaximumSize = Splash.Size;
Splash.MinimumSize = Splash.Size;
Splash.Paint += (sender, e) =>
{
Graphics g = e.Graphics;
//Draw background
Brush[] brushes =
{Brushes.Purple, Brushes.MediumPurple, Brushes.Indigo, Brushes.Fuchsia, Brushes.OrangeRed};
const int barWidth = 50;
const int topOffset = 100;
for (int i = 0; i < Splash.Width + topOffset; i += barWidth)
g.FillPolygon(brushes[i / barWidth % brushes.Length], new[]
{
using (var client = new WebClient())
{
client.DownloadFile(meta.Element("File").Value, dir + @"\update.exe");
}
SHA256CryptoServiceProvider sha256 = new SHA256CryptoServiceProvider();
if (BitConverter.ToString(sha256.ComputeHash(File.ReadAllBytes(dir + @"\update.exe"))).Replace("-", string.Empty).ToUpper() != meta.Element("Hash").Value)
throw new Exception("The hash is not equal to the one stored in the repo");
sha256.Dispose();
new XElement("meta", new XElement("Version", version)).Save(xml);
Process.Start(new ProcessStartInfo { FileName = "cmd.exe", Arguments = "/C echo Running Update & timeout /t 4 & copy /b/v/y \"" + dir + @"\update.exe" + "\" \"" + Application.ExecutablePath + "\" & echo Done Updating, please restart & pause" });
}
else
Application.Run(new MainForm());
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString());
}
finally
{
if (hasHandle)
mutex.ReleaseMutex();
}
new PointF(i, 0),
new PointF(i + barWidth, 0),
new PointF(i, Splash.Height),
new PointF(i - topOffset, Splash.Height)
});
//Draw Text: UpTool2 (by JFronny)^
Font font = new Font(FontFamily.GenericSansSerif, 40, FontStyle.Bold);
const string text = "UpTool2";
SizeF size = g.MeasureString(text, font);
RectangleF rect = new RectangleF(Splash.Width / 2f - size.Width / 2,
Splash.Height / 2f - size.Height / 2, size.Width, size.Height);
g.DrawString(text, font, Brushes.White, rect);
Font smallFont = new Font(FontFamily.GenericSansSerif, 10);
const string subtitle = "by JFronny";
SizeF size2 = g.MeasureString(subtitle, smallFont);
g.DrawString(subtitle, smallFont, Brushes.White,
new RectangleF(rect.Right - size2.Width, rect.Bottom - size2.Height, size2.Width, size2.Height));
//Draw progress bar
Rectangle bar = new Rectangle(3 * Splash.Width / 8, Splash.Height * 3 / 4 - 10, Splash.Width / 4,
20);
g.FillRectangle(Brushes.Gray, bar);
g.FillRectangle(Brushes.Black,
new Rectangle(bar.X, bar.Y, bar.Width * _splashProgress / 10, bar.Height));
g.DrawRectangle(Pens.DimGray, bar);
//g.DrawString(SplashMessage, smallFont, Brushes.White, new PointF(bar.Left, bar.Bottom));
g.DrawString(_splashMessage, smallFont, Brushes.White, bar,
new StringFormat {Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center});
};
Splash.Load += (sender, e) => Splash.BringToFront();
Splash.FormClosed += (sender, e) => Splash.Dispose();
}
public static void SetSplash(int progress, string status) => Splash.Invoke(new Action(() =>
{
Console.WriteLine($"{progress} - {status}");
Debug.WriteLine($"{progress} - {status}");
_splashProgress = progress;
_splashMessage = status;
Splash.Invoke((Action) Splash.Invalidate);
}));
public static void FixXml(bool throwOnError = false)
{
try
{
Lib.V1.XmlTool.FixXml();
}
catch (XmlException)
{
if (throwOnError) throw;
MessageBox.Show("Something went wrong while trying to parse XML. Retrying...");
File.Delete(Lib.V1.PathTool.InfoXml);
FixXml();
}
}
private static bool UpdateCheck()
{
UpdateCheck check = Lib.V2.UpdateChecker.Check();
SetSplash(3, "Comparing online version");
if (Assembly.GetExecutingAssembly().GetName().Version >= check.OnlineVersion)
{
SetSplash(7, "Opening");
return true;
}
byte[] dl;
SetSplash(4, "Downloading latest");
using (DownloadDialog dlg = new DownloadDialog(check.Installer.AbsoluteUri))
{
if (dlg.ShowDialog() != DialogResult.OK)
throw new Exception("Failed to update");
dl = dlg.Result;
}
SetSplash(8, "Verifying");
using (SHA256CryptoServiceProvider sha256 = new SHA256CryptoServiceProvider())
{
string pkgHash = BitConverter.ToString(sha256.ComputeHash(dl)).Replace("-", string.Empty).ToUpper();
if (pkgHash != check.InstallerHash)
throw new Exception(
$"The hash is not equal to the one stored in the repo:\r\nPackage: {pkgHash}\r\nOnline: {check.InstallerHash}");
}
SetSplash(9, "Installing");
if (Directory.Exists(Lib.V1.PathTool.GetRelative("Install", "tmp")))
Directory.Delete(Lib.V1.PathTool.GetRelative("Install", "tmp"), true);
Directory.CreateDirectory(Lib.V1.PathTool.GetRelative("Install", "tmp"));
using (MemoryStream ms = new MemoryStream(dl))
{
using ZipArchive ar = new ZipArchive(ms);
ar.ExtractToDirectory(Lib.V1.PathTool.GetRelative("Install", "tmp"), true);
}
Splash.Hide();
Process.Start(new ProcessStartInfo
{
FileName = Lib.V1.PathTool.GetRelative("Install", "tmp", "Installer.exe"),
Arguments = "i -p",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
WorkingDirectory = Lib.V1.PathTool.GetRelative("Install")
});
SetSplash(7, "Installing");
return false;
}
}
}
}

View File

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("UpTool2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UpTool2")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c0c1e002-9e13-4e8f-a035-dbdc5128e00e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -59,5 +59,15 @@ namespace UpTool2.Properties {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon C_64 {
get {
object obj = ResourceManager.GetObject("C_64", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View File

@ -117,4 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="C_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\C_64.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -1,41 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UpTool2.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.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;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(@"<?xml version=""1.0"" encoding=""utf-16""?>
<ArrayOfString xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<string>https://github.com/CreepyCrafter24/UpTool2/releases/download/Repo/Repo.xml</string>
</ArrayOfString>")]
public global::System.Collections.Specialized.StringCollection Repos {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["Repos"]));
}
set {
this["Repos"] = value;
}
}
}
}

View File

@ -1,12 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UpTool2.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="Repos" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;string&gt;https://github.com/CreepyCrafter24/UpTool2/releases/download/Repo/Repo.xml&lt;/string&gt;
&lt;/ArrayOfString&gt;</Value>
</Setting>
</Settings>
</SettingsFile>

BIN
UpTool2/Resources/C_64.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,110 +0,0 @@
namespace UpTool2
{
partial class SettingsForm
{
/// <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.repoList = new System.Windows.Forms.ListBox();
this.minusButton = new System.Windows.Forms.Button();
this.plusButton = new System.Windows.Forms.Button();
this.repoBox = new System.Windows.Forms.TextBox();
this.okButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// repoList
//
this.repoList.FormattingEnabled = true;
this.repoList.Location = new System.Drawing.Point(12, 12);
this.repoList.Name = "repoList";
this.repoList.Size = new System.Drawing.Size(432, 95);
this.repoList.TabIndex = 0;
this.repoList.SelectedIndexChanged += new System.EventHandler(this.RepoList_SelectedIndexChanged);
//
// minusButton
//
this.minusButton.Location = new System.Drawing.Point(421, 113);
this.minusButton.Name = "minusButton";
this.minusButton.Size = new System.Drawing.Size(23, 23);
this.minusButton.TabIndex = 1;
this.minusButton.Text = "-";
this.minusButton.UseVisualStyleBackColor = true;
this.minusButton.Click += new System.EventHandler(this.MinusButton_Click);
//
// plusButton
//
this.plusButton.Location = new System.Drawing.Point(392, 113);
this.plusButton.Name = "plusButton";
this.plusButton.Size = new System.Drawing.Size(23, 23);
this.plusButton.TabIndex = 2;
this.plusButton.Text = "+";
this.plusButton.UseVisualStyleBackColor = true;
this.plusButton.Click += new System.EventHandler(this.PlusButton_Click);
//
// repoBox
//
this.repoBox.Location = new System.Drawing.Point(12, 115);
this.repoBox.Name = "repoBox";
this.repoBox.Size = new System.Drawing.Size(320, 20);
this.repoBox.TabIndex = 3;
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(338, 113);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(48, 23);
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButton_Click);
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(456, 146);
this.Controls.Add(this.okButton);
this.Controls.Add(this.repoBox);
this.Controls.Add(this.plusButton);
this.Controls.Add(this.minusButton);
this.Controls.Add(this.repoList);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SettingsForm";
this.Text = "Settings";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox repoList;
private System.Windows.Forms.Button minusButton;
private System.Windows.Forms.Button plusButton;
private System.Windows.Forms.TextBox repoBox;
private System.Windows.Forms.Button okButton;
}
}

View File

@ -1,57 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UpTool2.Properties;
namespace UpTool2
{
public partial class SettingsForm : Form
{
int ind;
public SettingsForm()
{
InitializeComponent();
SaveAndReload();
}
private void RepoList_SelectedIndexChanged(object sender, EventArgs e)
{
repoBox.Text = (string)repoList.SelectedItem;
ind = repoList.SelectedIndex;
}
private void OkButton_Click(object sender, EventArgs e)
{
if (!string.IsNullOrWhiteSpace(repoBox.Text))
{
Settings.Default.Repos[ind] = repoBox.Text;
SaveAndReload();
}
}
private void PlusButton_Click(object sender, EventArgs e)
{
Settings.Default.Repos.Add("New Repo");
SaveAndReload();
}
private void MinusButton_Click(object sender, EventArgs e)
{
Settings.Default.Repos.RemoveAt(ind);
SaveAndReload();
}
void SaveAndReload()
{
Settings.Default.Save();
repoList.Items.Clear();
repoList.Items.AddRange(Settings.Default.Repos.Cast<object>().ToArray());
}
}
}

View File

@ -1,120 +0,0 @@
<?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>
</root>

64
UpTool2/SourcesForm.Designer.cs generated Normal file
View File

@ -0,0 +1,64 @@
namespace UpTool2
{
partial class SettingsForms
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpTool2.SettingsForms));
this.sourceGrid = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize) (this.sourceGrid)).BeginInit();
this.SuspendLayout();
this.sourceGrid.BackgroundColor = System.Drawing.Color.White;
this.sourceGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.sourceGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.sourceGrid.GridColor = System.Drawing.Color.White;
this.sourceGrid.Location = new System.Drawing.Point(0, 0);
this.sourceGrid.MultiSelect = false;
this.sourceGrid.Name = "sourceGrid";
this.sourceGrid.Size = new System.Drawing.Size(933, 519);
this.sourceGrid.TabIndex = 0;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(933, 519);
this.Controls.Add(this.sourceGrid);
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Name = "SettingsForms";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Sources";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SettingsForms_FormClosing);
((System.ComponentModel.ISupportInitialize) (this.sourceGrid)).EndInit();
this.ResumeLayout(false);
}
private System.Windows.Forms.DataGridView sourceGrid;
#endregion
private System.Windows.Forms.DataGridViewTextBoxColumn sbName;
private System.Windows.Forms.DataGridViewTextBoxColumn sbLink;
}
}

27
UpTool2/SourcesForm.cs Normal file
View File

@ -0,0 +1,27 @@
using System.Collections.Generic;
using System.Windows.Forms;
using UpToolLib.DataStructures;
namespace UpTool2
{
public partial class SettingsForms : Form
{
private readonly List<Repo> _repos = new List<Repo>();
public SettingsForms()
{
InitializeComponent();
Program.FixXml();
_repos.AddRange(Program.Lib.V2.RepoManagement.GetRepos());
sourceGrid.Columns.Clear();
sourceGrid.Columns.Add("name", "Name");
sourceGrid.Columns.Add("link", "Link");
foreach (Repo repo in _repos)
sourceGrid.Rows.Add(repo.Name, repo.Url);
}
private void SettingsForms_FormClosing(object sender, FormClosingEventArgs e)
{
Program.Lib.V2.RepoManagement.Save(_repos);
}
}
}

348
UpTool2/SourcesForm.resx Normal file
View File

@ -0,0 +1,348 @@
<root>
<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.Common" name="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/vDoAPzdyQD6yqkA+bqHAPisYwD4oT0A95wWAPecFgD4oT0A+KxjAPm6
hwD6yqkA/N3JAP7w6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP3s4gD7zrAA/wAADf8AAEv/AACB/wAArf8AAND/AADq/wAA+f8A
AP//AAD5/wAA6v8AAND/AACt/wAAgf8AAEv/AAAN+K5pAPvOsAD97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/OLSAP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACfm8
jAD84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD959sA/wAAG/8AAIH/AADh/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAOH/AACB/wAAG/m9jwD959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP749QD/AAAD/wAAdP8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOH/AAB0/wAAA/vPsgD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r
4AD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
ALf/AABA+byMAP3r4AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////APzj0wD/AABp/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA5f8AAGn4r20A/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAP/AACA/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAgP8AAAP8384A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AACH/wAAA/zj0wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r4AD/AACA/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAID4r20A/evgAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP74
9QD/AABp/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAafm8jAD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA+8+yAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AAAD/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAAt/8AAAP959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAdP8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAB0+b2PAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAG/8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8A
ABv84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAIH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACB+byMAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AADh/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8AAAn97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg+86wAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAsP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAsPiuaQD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A/wAADf8AAPn/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAPn/AAAN/vDoAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/zdyQD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AACB/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AIH6yqkA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAArf8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACt+bqHAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAND/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA0PisYwD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AADq/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOr4oT0A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAA+f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD595wWAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//ecFgD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AAD5/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPn4oT0A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAA6v8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADq+KxjAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8AAND/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA0Pm6hwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACt/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAK36yqkA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAgf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACB/N3JAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/7w
6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAA+f8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA+f8AAA3///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AALD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AALD7zrAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg/eziAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAACf8AAOH/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAACf//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACB/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAgfzi0gD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAG/8AAOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AABv///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAB0/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAHT959sA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8A
ALf/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AALf/AAAD////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAGn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAgP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACH/wAAA////wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8AAID/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/wAAA///
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAaf8A
AOX/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AALf/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AAB0/wAA4f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AAHT/AAAD////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
ABv/AACB/wAA4f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAAgf8AABv///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACf///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAAS/8A
AIH/AACt/wAA0P8AAOr/AAD5/wAA//8AAPn/AADq/wAA0P8AAK3/AACB/wAAS/8AAA3///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////////////////////////////////////////////////////////////////////////
//////8AAf//////+AAAP//////gAAAP/////4AAAAP/////AAAAAf////4AAAAA////+AAAAAA////w
AAAAAB////AAAAAAH///4AAAAAAP///AAAAAAAf//4AAAAAAA///gAAAAAAD//8AAAAAAAH//wAAAAAA
Af/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wA
AAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAA
AH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP//AAAAAAAB//8A
AAAAAAH//4AAAAAAA///gAAAAAAD///AAAAAAAf//+AAAAAAD///8AAAAAAf///wAAAAAB////gAAAAA
P////gAAAAD/////AAAAAf////+AAAAD/////+AAAA//////+AAAP///////AAH/////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

32
UpTool2/TaskPreview.cs Normal file
View File

@ -0,0 +1,32 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using UpToolLib.v2.TaskQueue;
namespace UpTool2
{
internal static class TaskPreview
{
public static bool Show(ref List<AppTask> tasks, bool showOk)
{
bool ok = false;
using Form tmp = new Form {Size = new Size(600, 300), MinimumSize = new Size(300, showOk ? 138 : 133)};
using CheckedListBox list = new CheckedListBox {Dock = DockStyle.Fill};
using Button okButton = new Button {Dock = DockStyle.Bottom, Text = "OK"};
list.Items.AddRange(tasks.ToArray());
for (int i = 0; i < tasks.Count; i++)
list.SetItemChecked(i, true);
tmp.Controls.Add(list);
okButton.Click += (sender, args) =>
{
ok = true;
tmp.Close();
};
if (showOk) tmp.Controls.Add(okButton);
tmp.ShowDialog();
tasks = list.Items.OfType<AppTask>().Where((s, i) => list.GetItemChecked(i)).ToList();
return !showOk || ok;
}
}
}

72
UpTool2/Tool/DownloadDialog.Designer.cs generated Normal file
View File

@ -0,0 +1,72 @@
using System.Drawing;
namespace UpTool2.Tool
{
partial class DownloadDialog
{
/// <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();
_client.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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DownloadDialog));
this.progressBar = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// progressBar
//
this.progressBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.progressBar.Location = new System.Drawing.Point(0, 0);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(346, 30);
this.progressBar.Step = 1;
this.progressBar.TabIndex = 0;
//
// DownloadDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(346, 30);
this.ControlBox = false;
this.Controls.Add(this.progressBar);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DownloadDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Downloading...";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DownloadDialog_FormClosing);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ProgressBar progressBar;
}
}

View File

@ -0,0 +1,43 @@
using System;
using System.Net;
using System.Windows.Forms;
namespace UpTool2.Tool
{
public partial class DownloadDialog : Form
{
private readonly WebClient _client;
private bool _close;
public byte[] Result;
public DownloadDialog(string uri)
{
InitializeComponent();
try
{
_client = new WebClient();
_client.DownloadProgressChanged += ProgressChanged;
_client.DownloadDataCompleted += Done;
_client.DownloadDataAsync(new Uri(uri), _client);
}
catch
{
DialogResult = DialogResult.Abort;
Close();
}
}
private void Done(object sender, DownloadDataCompletedEventArgs e)
{
DialogResult = DialogResult.OK;
_close = true;
Result = e.Result;
Close();
}
private void ProgressChanged(object sender, DownloadProgressChangedEventArgs e) =>
progressBar.Value = e.ProgressPercentage;
private void DownloadDialog_FormClosing(object sender, FormClosingEventArgs e) => e.Cancel = !_close;
}
}

View File

@ -0,0 +1,348 @@
<root>
<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.Common" name="System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/vDoAPzdyQD6yqkA+bqHAPisYwD4oT0A95wWAPecFgD4oT0A+KxjAPm6
hwD6yqkA/N3JAP7w6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP3s4gD7zrAA/wAADf8AAEv/AACB/wAArf8AAND/AADq/wAA+f8A
AP//AAD5/wAA6v8AAND/AACt/wAAgf8AAEv/AAAN+K5pAPvOsAD97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/OLSAP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACfm8
jAD84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD959sA/wAAG/8AAIH/AADh/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAOH/AACB/wAAG/m9jwD959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP749QD/AAAD/wAAdP8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOH/AAB0/wAAA/vPsgD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r
4AD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
ALf/AABA+byMAP3r4AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////APzj0wD/AABp/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA5f8AAGn4r20A/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAP/AACA/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAgP8AAAP8384A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AACH/wAAA/zj0wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP3r4AD/AACA/wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAID4r20A/evgAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP74
9QD/AABp/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAafm8jAD++PUA////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA+8+yAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AAAD/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAAt/8AAAP959sA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAdP8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAB0+b2PAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAG/8A
AOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8A
ABv84tIA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAIH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACB+byMAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AADh/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA4f8AAAn97OIA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg+86wAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAsP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAsPiuaQD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A/wAADf8AAPn/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAPn/AAAN/vDoAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/zdyQD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AACB/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AIH6yqkA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAArf8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AACt+bqHAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAND/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA0PisYwD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AADq/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOr4oT0A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAA+f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD595wWAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//ecFgD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AAD5/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPn4oT0A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAA6v8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADq+KxjAP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8AAND/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA0Pm6hwD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACt/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAK36yqkA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAgf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACB/N3JAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAEv/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAS/7w
6AD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAA+f8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA+f8AAA3///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AALD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AALD7zrAA////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD/AABg/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABg/eziAP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAACf8AAOH/AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAACf//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD/AACB/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAAgfzi0gD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A/wAAG/8AAOH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AABv///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAB0/wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP8AAAD/AAAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAHT959sA////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8A
ALf/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA/wAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AALf/AAAD////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAA5f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAGn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAgP8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/OPTAP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP8AAAP/AACH/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACH/wAAA////wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A/wAAA/8AAID/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AACA/wAAA///
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A/wAAaf8A
AOX/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AOX/AABp/evgAP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD/AABA/wAAt/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AALf/AABA/vj1AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP8AAAP/AAB0/wAA4f8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA4f8AAHT/AAAD////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP8A
ABv/AACB/wAA4f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADh/wAAgf8AABv///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP8AAAn/AABg/wAAsP8AAPn/AAD//wAA//8AAP//AAD//wAA//8A
AP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA+f8AALD/AABg/wAACf///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD/AAAN/wAAS/8A
AIH/AACt/wAA0P8AAOr/AAD5/wAA//8AAPn/AADq/wAA0P8AAK3/AACB/wAAS/8AAA3///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
/wD///8A////////////////////////////////////////////////////////////////////////
//////8AAf//////+AAAP//////gAAAP/////4AAAAP/////AAAAAf////4AAAAA////+AAAAAA////w
AAAAAB////AAAAAAH///4AAAAAAP///AAAAAAAf//4AAAAAAA///gAAAAAAD//8AAAAAAAH//wAAAAAA
Af/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wA
AAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/8AAAAAAAAf/wAAAAAAAB//AAAAAAA
AH/8AAAAAAAAf/wAAAAAAAB//AAAAAAAAH/+AAAAAAAA//4AAAAAAAD//gAAAAAAAP//AAAAAAAB//8A
AAAAAAH//4AAAAAAA///gAAAAAAD///AAAAAAAf//+AAAAAAD///8AAAAAAf///wAAAAAB////gAAAAA
P////gAAAAD/////AAAAAf////+AAAAD/////+AAAA//////+AAAP///////AAH/////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

60
UpTool2/UTLibFunctions.cs Normal file
View File

@ -0,0 +1,60 @@
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Net;
using System.Windows.Forms;
using UpTool2.Properties;
using UpTool2.Tool;
using UpToolLib.DataStructures;
namespace UpTool2
{
internal class UtLibFunctions : IExternalFunctionality
{
public Tuple<bool, byte[]> Download(Uri link)
{
using DownloadDialog dialog = new DownloadDialog(link.AbsoluteUri);
bool success = dialog.ShowDialog() == DialogResult.OK;
return new Tuple<bool, byte[]>(success, success ? dialog.Result : null);
}
public string FetchImageB64(Uri link)
{
using WebClient client = new WebClient();
Image src = Image.FromStream(
client.OpenRead(link));
Bitmap dest = new Bitmap(70, 70);
dest.SetResolution(src.HorizontalResolution, src.VerticalResolution);
using (Graphics g = Graphics.FromImage(dest))
{
g.CompositingMode = CompositingMode.SourceCopy;
g.CompositingQuality = CompositingQuality.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
using ImageAttributes wrapMode = new ImageAttributes();
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
g.DrawImage(src, new Rectangle(0, 0, 70, 70), 0, 0, src.Width, src.Height,
GraphicsUnit.Pixel, wrapMode);
}
using MemoryStream ms = new MemoryStream();
dest.Save(ms, ImageFormat.Png);
return Convert.ToBase64String(ms.ToArray());
}
public bool YesNoDialog(string text, bool _) =>
MessageBox.Show(text, "", MessageBoxButtons.YesNo) == DialogResult.Yes;
public void OkDialog(string text) => MessageBox.Show(text);
public object GetDefaultIcon() => Resources.C_64.ToBitmap();
public object ImageFromB64(string b64) =>
(Bitmap) new ImageConverter().ConvertFrom(Convert.FromBase64String(b64));
public void Log(string text)
{
}
}
}

View File

@ -1,94 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C0C1E002-9E13-4E8F-A035-DBDC5128E00E}</ProjectGuid>
<TargetFramework>net5.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>UpTool2</RootNamespace>
<AssemblyName>UpTool2</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8</LangVersion>
<Deterministic>false</Deterministic>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<Deterministic>false</Deterministic>
<AssemblyVersion>1.0.*</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup>
<StartupObject>UpTool2.Program</StartupObject>
<ApplicationIcon>..\UpTool2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression.FileSystem" />
<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" />
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.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>
<EmbeddedResource Include="SettingsForm.resx">
<DependentUpon>SettingsForm.cs</DependentUpon>
</EmbeddedResource>
<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>
<ProjectReference Include="..\UpToolLib\UpToolLib.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

27
UpTool2/WindowHelper.cs Normal file
View File

@ -0,0 +1,27 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace UpTool2
{
//TODO: This class is Windows-only and can't be used cross-platform.
public static class WindowHelper
{
public static void BringProcessToFront(Process process)
{
IntPtr handle = process.MainWindowHandle;
if (IsIconic(handle))
ShowWindow(handle, 9);
SetForegroundWindow(handle);
}
[DllImport("User32.dll")]
private static extern bool SetForegroundWindow(IntPtr handle);
[DllImport("User32.dll")]
private static extern bool ShowWindow(IntPtr handle, int nCmdShow);
[DllImport("User32.dll")]
private static extern bool IsIconic(IntPtr handle);
}
}

View File

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Linq;
using System.Reflection;
using UpToolLib;
using UpToolLib.DataStructures;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace UpToolCLI
{
public static class CacheManagement
{
public static void RegisterCommands(RootCommand rootCommand)
{
rootCommand.AddCommand(new Command("list", "Lists installed packages")
{
Handler = CommandHandler.Create(List)
});
Command search = new("search", "Search for packages")
{
new Argument<string>("identifier", "Something to identify the app")
};
search.Handler = CommandHandler.Create<string>(Search);
rootCommand.AddCommand(search);
Command show = new("show", "Shows package info")
{
new Argument<string>("identifier", "Something to identify the app")
};
show.Handler = CommandHandler.Create<string>(Show);
rootCommand.AddCommand(show);
rootCommand.AddCommand(new Command("update", "Updates the cache")
{
Handler = CommandHandler.Create(Update)
});
}
private static void List()
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
Console.WriteLine(Program.Lib.V1.Apps.Where(s => s.Value.Status.Contains(Status.Installed))
.ToStringTable(new[]
{
"Name", "State", "Guid"
},
u => u.Value.Name,
u => u.Value.Local ? "Local" :
u.Value.Status.Contains(Status.Updatable) ? "Updatable" : "None",
u => u.Key));
}
private static void Search(string identifier)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
Console.WriteLine($"Found {apps.Length} app(s)");
if (apps.Length > 0)
Console.WriteLine(apps.ToStringTable(new[]
{
"Name", "Guid"
},
u => u.Name,
u => u.Id));
}
private static void Show(string identifier)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
Console.WriteLine(apps.First());
}
private static void Update()
{
Console.WriteLine("Fetching Repos...");
Program.Lib.V2.RepoManagement.FetchRepos();
Program.Lib.V2.RepoManagement.GetReposFromDisk();
Console.WriteLine();
IEnumerable<App> tmp = Program.Lib.V1.Apps.Where(s =>
s.Value.Status.Contains(Status.Updatable)).Select(s => s.Value);
IEnumerable<App> apps = tmp as App[] ?? tmp.ToArray();
int updatableCount = apps.Count();
Console.WriteLine(updatableCount == 0
? "All up-to-date"
: $@"Found {updatableCount} Updates:
{string.Join(Environment.NewLine, apps.Select(s => $"- {s.Name} ({s.Version})"))}");
Version vLocal = Assembly.GetExecutingAssembly().GetName().Version;
Version vOnline = Program.Lib.V2.UpdateChecker.Check().OnlineVersion;
if (vLocal < vOnline)
Console.WriteLine($"uptool is outdated ({vLocal} vs {vOnline}), update using \"uptool upgrade-self\"");
}
}
}

104
UpToolCLI/Other.cs Normal file
View File

@ -0,0 +1,104 @@
using System;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using UpToolLib;
using UpToolLib.DataStructures;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
using Process = System.Diagnostics.Process;
namespace UpToolCLI
{
public class Other
{
public static void RegisterCommands(RootCommand rootCommand)
{
Command command = new("upgrade-self", "Upgrades UpToolCLI")
{
new Option<bool>(new[] {"--force", "-f"}, "Overwrites older files")
};
command.Handler = CommandHandler.Create<bool>(UpgradeSelf);
rootCommand.AddCommand(command);
Command start = new("start", "Starts an app")
{
new Argument<string>("identifier", "Something to identify the app"),
new Option<string>(new[] {"--arguments", "--args", "-a"}, () => "", "The arguments to run the file with"),
new Option<string>(new[] {"--file", "-f"}, () => null, "The file to run instead of the MainFile"),
new Option<bool>(new[] {"--waitForExit", "-wait"}, "Waits until the program quits")
};
start.Handler = CommandHandler.Create<string, string, string, bool>(Start);
rootCommand.AddCommand(start);
}
public static void UpgradeSelf(bool force)
{
PathTool pathTool = Program.Lib.V1.PathTool;
UpdateCheck updateCheck = Program.Lib.V2.UpdateChecker.Check();
if (!force && Assembly.GetExecutingAssembly().GetName().Version >= updateCheck.OnlineVersion)
Console.WriteLine("Already up-to-date");
else
{
Console.WriteLine("Downloading latest");
(bool success, byte[] dl) = Program.Functions.Download(updateCheck.Installer);
if (!success)
throw new Exception("Failed to update");
Console.WriteLine("Verifying");
using (SHA256CryptoServiceProvider sha256 = new())
{
string pkgHash = BitConverter.ToString(sha256.ComputeHash(dl)).Replace("-", string.Empty).ToUpper();
if (pkgHash != updateCheck.InstallerHash)
throw new Exception($@"The hash is not equal to the one stored in the repo:
Package: {pkgHash}
Online: {updateCheck.InstallerHash}");
}
Console.WriteLine("Installing");
if (Directory.Exists(pathTool.GetRelative("Install", "tmp")))
Directory.Delete(pathTool.GetRelative("Install", "tmp"), true);
Directory.CreateDirectory(pathTool.GetRelative("Install", "tmp"));
using (MemoryStream ms = new(dl))
{
using ZipArchive ar = new(ms);
ar.ExtractToDirectory(pathTool.GetRelative("Install", "tmp"), true);
}
string file = pathTool.GetRelative("Install", "tmp", "Installer.exe");
Console.WriteLine($"Starting {file}");
Process.Start(new ProcessStartInfo
{
FileName = file,
Arguments = "i",
WorkingDirectory = pathTool.GetRelative("Install"),
UseShellExecute = false
});
}
}
private static void Start(string identifier, string arguments, string file, bool waitForExit)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
{
App tmp = apps.First();
if (tmp.Runnable)
{
Console.WriteLine($"Starting {tmp.Name}");
Process tmp1 = Program.Lib.V1.AppExtras.RunApp(tmp, file ?? tmp.MainFile, arguments);
if (waitForExit)
tmp1.WaitForExit();
}
else
Console.WriteLine($"{tmp.Name} is not runnable");
}
Console.WriteLine("Done!");
}
}
}

View File

@ -0,0 +1,192 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using UpToolLib;
using UpToolLib.DataStructures;
using UpToolLib.v1;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace UpToolCLI
{
public static class PackageManagement
{
public static void RegisterCommands(RootCommand rootCommand)
{
Command install = new("install", "Install a package")
{
new Argument<string>("identifier", "Something to identify the app or the file name"),
new Option<bool>(new[] {"--force", "-f"}, "Overwrites older files")
};
install.Handler = CommandHandler.Create<string, bool>(Install);
rootCommand.AddCommand(install);
Command upgrade = new("upgrade", "Upgrade a package")
{
new Argument<string>("identifier", "Something to identify the app"),
new Option<bool>(new[] {"--force", "-f"}, "Overwrites older files")
};
upgrade.Handler = CommandHandler.Create<string, bool>(Upgrade);
rootCommand.AddCommand(upgrade);
Command reinstall = new("reinstall", "Reinstall a package")
{
new Argument<string>("identifier", "Something to identify the app"),
new Option<bool>(new[] {"--force", "-f"}, "Overwrites older files")
};
reinstall.Handler = CommandHandler.Create<string, bool>(Reinstall);
rootCommand.AddCommand(reinstall);
Command remove = new("remove", "Remove a package")
{
new Argument<string>("identifier", "Something to identify the app")
};
remove.Handler = CommandHandler.Create<string>(Remove);
rootCommand.AddCommand(remove);
Command purge = new("purge", "Completely remove a package")
{
new Argument<string>("identifier", "Something to identify the app")
};
purge.Handler = CommandHandler.Create<string>(Purge);
rootCommand.AddCommand(purge);
rootCommand.AddCommand(new Command("dist-upgrade", "Upgrades all packages")
{
Handler = CommandHandler.Create(DistUpgrade)
});
}
private static void Install(string identifier, bool force)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
{
if (File.Exists(identifier))
{
Console.WriteLine("Name:");
string name = Console.ReadLine();
Program.Lib.V1.Installer.InstallZip(identifier, Program.Lib.V2.AppFactory.CreateApp(name, "Locally installed package, removal only",
UpToolLibV1.MinimumVer, "", true, "",
Guid.NewGuid(), Color.Red, "", false, ""), force);
Console.WriteLine($"Successfully installed \"{name}\"");
}
else
{
Console.WriteLine("Package not found.");
Console.WriteLine(identifier);
}
}
else
{
App tmp = apps.First();
if (tmp.Status.Contains(Status.Installed))
Console.WriteLine("Package is already installed");
else
{
Console.WriteLine($"Installing {tmp.Name}");
Program.Lib.V1.Installer.Install(tmp, true);
}
}
Console.WriteLine("Done!");
}
private static void Upgrade(string identifier, bool force)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
{
App tmp = apps.First();
if (tmp.Status.Contains(Status.Updatable))
{
Console.WriteLine($"Upgrading {tmp.Name}");
Program.Lib.V1.AppExtras.Update(tmp, force);
}
else
Console.WriteLine("Package is up-to-date");
}
Console.WriteLine("Done!");
}
private static void Reinstall(string identifier, bool force)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
{
App tmp = apps.First();
Console.WriteLine($"Reinstalling {tmp.Name}");
Program.Lib.V1.AppExtras.Update(tmp, force);
}
Console.WriteLine("Done!");
}
private static void Remove(string identifier)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
{
App tmp = apps.First();
if (tmp.Status.Contains(Status.Installed))
{
Console.WriteLine($"Removing {tmp.Name}");
Program.Lib.V1.AppExtras.Remove(tmp, false);
}
else
Console.WriteLine("Package is not installed");
}
Console.WriteLine("Done!");
}
private static void Purge(string identifier)
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
App[] apps = Program.Lib.V1.AppExtras.FindApps(identifier);
if (apps.Length == 0)
Console.WriteLine("Package not found.");
else
{
App tmp = apps.First();
if (tmp.Status.Contains(Status.Installed))
{
Console.WriteLine($"Purging {tmp.Name}");
Program.Lib.V1.AppExtras.Remove(tmp, true);
}
else
Console.WriteLine("Package is not installed");
}
Console.WriteLine("Done!");
}
private static void DistUpgrade()
{
Program.Lib.V2.RepoManagement.GetReposFromDisk();
foreach (KeyValuePair<Guid, App> app in Program.Lib.V1.Apps.Where(s =>
s.Value.Status.Contains(Status.Updatable)))
{
Console.WriteLine($"Updating {app.Value.Name}");
Program.Lib.V1.AppExtras.Update(app.Value, false);
}
if (Assembly.GetExecutingAssembly().GetName().Version < Program.Lib.V2.UpdateChecker.Check().OnlineVersion)
{
Console.WriteLine("Updating self");
Other.UpgradeSelf(false);
}
Console.WriteLine("Done!");
}
}
}

41
UpToolCLI/Program.cs Normal file
View File

@ -0,0 +1,41 @@
using System;
using System.CommandLine;
using UpToolLib;
namespace UpToolCLI
{
public static class Program
{
public static readonly UtLibFunctions Functions = new();
public static bool Basic;
public static UpToolLibMain Lib;
public static int Main(string[] args)
{
try
{
Basic = args.Length > 0 && args[0].ToLower() == "--basic";
Lib = new UpToolLibMain(Functions);
Lib.V1.XmlTool.FixXml();
RootCommand rootCommand = new();
rootCommand.AddGlobalOption(new Option<bool>("--basic", "Use only basic console functionality. Must be the first parameter in the call"));
PackageManagement.RegisterCommands(rootCommand);
CacheManagement.RegisterCommands(rootCommand);
ReposManagement.RegisterCommands(rootCommand);
Other.RegisterCommands(rootCommand);
return rootCommand.InvokeAsync(args).Result;
}
catch (Exception e)
{
Console.WriteLine($"FAILED: {e}");
return 1;
}
finally
{
Lib?.Dispose();
}
}
}
}

View File

@ -0,0 +1,93 @@
using System;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Linq;
using System.Xml.Linq;
using UpToolLib.v1.Tool;
namespace UpToolCLI
{
public class ReposManagement
{
private static string InfoXml => Program.Lib.V1.PathTool.InfoXml;
public static void RegisterCommands(RootCommand rootCommand)
{
rootCommand.AddCommand(new Command("list-repo", "Lists current repositories")
{
Handler = CommandHandler.Create(ListRepo)
});
Command addRepo = new("add-repo", "Adds a repository")
{
new Argument<string>("name", "The new repositories name"),
new Argument<string>("link", "A link to the repositories XML")
};
addRepo.Handler = CommandHandler.Create<string, string>(AddRepo);
rootCommand.AddCommand(addRepo);
Command removeRepo = new("remove-repo", "Removes a repository")
{
new Argument<string>("name", "The repositories name")
};
removeRepo.Handler = CommandHandler.Create<string>(RemoveRepo);
rootCommand.AddCommand(removeRepo);
}
private static void ListRepo()
{
XDocument doc = XDocument.Load(InfoXml);
XElement repos = doc.Element("meta").Element("Repos");
Console.WriteLine("Current repos:");
Console.WriteLine(repos.Elements("Repo").ToStringTable(new[]
{
"Name", "Link"
},
u => u.Element("Name").Value,
u => u.Element("Link").Value));
}
private static void AddRepo(string name, string link)
{
XDocument doc = XDocument.Load(InfoXml);
XElement repos = doc.Element("meta").Element("Repos");
repos.Add(new XElement("Repo", new XElement("Name", name),
new XElement("Link", link)));
doc.Save(InfoXml);
Console.WriteLine("Added repo. Remember to update the cache using \"uptool update\"");
}
private static void RemoveRepo(string name)
{
XDocument doc = XDocument.Load(InfoXml);
XElement repos = doc.Element("meta").Element("Repos");
XElement[] sRepos = repos.Elements("Repo")
.Where(s => s.Element("Name").Value.ToLower().StartsWith(name.ToLower())).ToArray();
switch (sRepos.Length)
{
case 0:
Console.WriteLine("No repo was found that matches your input!");
return;
case 1:
break;
default:
Console.WriteLine("Found multiple repos that match your input:");
Console.WriteLine(sRepos.ToStringTable(new[]
{
"Name", "Link"
},
u => u.Element("Name").Value,
u => u.Element("Link").Value));
if (!Program.Functions.YesNoDialog("Are you sure you want to delete them all?", false))
return;
break;
}
foreach (XElement t in sRepos)
{
Console.WriteLine($"Removing {t.Element("Name").Value}");
t.Remove();
}
doc.Save(InfoXml);
Console.WriteLine("Removed repo. Remember to update the cache using \"uptool update\"");
}
}
}

104
UpToolCLI/TableParser.cs Normal file
View File

@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace UpToolCLI
{
public static class TableParser
{
public static string ToStringTable<T>(this IEnumerable<T> values, string[] columnHeaders,
params Func<T, object>[] valueSelectors) => ToStringTable(values.ToArray(), columnHeaders, valueSelectors);
public static string ToStringTable<T>(this T[] values, string[] columnHeaders,
params Func<T, object>[] valueSelectors)
{
Debug.Assert(columnHeaders.Length == valueSelectors.Length);
string[,] arrValues = new string[values.Length + 1, valueSelectors.Length];
// Fill headers
for (int colIndex = 0; colIndex < arrValues.GetLength(1); colIndex++)
arrValues[0, colIndex] = columnHeaders[colIndex];
// Fill table rows
for (int rowIndex = 1; rowIndex < arrValues.GetLength(0); rowIndex++)
for (int colIndex = 0; colIndex < arrValues.GetLength(1); colIndex++)
{
object value = valueSelectors[colIndex].Invoke(values[rowIndex - 1]);
arrValues[rowIndex, colIndex] = value != null ? value.ToString() : "null";
}
return ToStringTable(arrValues);
}
public static string ToStringTable(this string[,] arrValues)
{
int[] maxColumnsWidth = GetMaxColumnsWidth(arrValues);
string headerSpliter = new('-', maxColumnsWidth.Sum(i => i + 3) - 1);
StringBuilder sb = new();
for (int rowIndex = 0; rowIndex < arrValues.GetLength(0); rowIndex++)
{
for (int colIndex = 0; colIndex < arrValues.GetLength(1); colIndex++)
{
// Print cell
string cell = arrValues[rowIndex, colIndex];
cell = cell.PadRight(maxColumnsWidth[colIndex]);
sb.Append(" | ");
sb.Append(cell);
}
// Print end of line
sb.Append(" | ");
sb.AppendLine();
// Print splitter
if (rowIndex == 0)
{
sb.AppendFormat(" |{0}| ", headerSpliter);
sb.AppendLine();
}
}
return sb.ToString();
}
private static int[] GetMaxColumnsWidth(string[,] arrValues)
{
int[] maxColumnsWidth = new int[arrValues.GetLength(1)];
for (int colIndex = 0; colIndex < arrValues.GetLength(1); colIndex++)
for (int rowIndex = 0; rowIndex < arrValues.GetLength(0); rowIndex++)
{
int newLength = arrValues[rowIndex, colIndex].Length;
int oldLength = maxColumnsWidth[colIndex];
if (newLength > oldLength) maxColumnsWidth[colIndex] = newLength;
}
return maxColumnsWidth;
}
public static string ToStringTable<T>(this IEnumerable<T> values,
params Expression<Func<T, object>>[] valueSelectors)
{
string[] headers = valueSelectors.Select(func => GetProperty(func).Name).ToArray();
Func<T, object>[] selectors = valueSelectors.Select(exp => exp.Compile()).ToArray();
return ToStringTable(values, headers, selectors);
}
private static PropertyInfo GetProperty<T>(Expression<Func<T, object>> expresstion)
{
if (expresstion.Body is UnaryExpression expression)
if (expression.Operand is MemberExpression memberExpression)
return memberExpression.Member as PropertyInfo;
if (expresstion.Body is MemberExpression body) return body.Member as PropertyInfo;
return null;
}
}
}

117
UpToolCLI/UTLibFunctions.cs Normal file
View File

@ -0,0 +1,117 @@
using System;
using System.IO;
using System.Net;
using System.Threading;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using UpToolLib.DataStructures;
using static UpToolCLI.Program;
namespace UpToolCLI
{
public class UtLibFunctions : IExternalFunctionality
{
public Tuple<bool, byte[]> Download(Uri link)
{
using WebClient client = new();
byte[] result = new byte[0];
bool finished = false;
bool success = true;
client.DownloadDataCompleted += (sender, e) =>
{
success = !e.Cancelled;
if (success)
result = e.Result;
finished = true;
};
client.DownloadProgressChanged += (sender, e) =>
{
if (!Basic)
{
Console.Write(
$"{new string('=', e.ProgressPercentage / 10)}[{e.ProgressPercentage}]{new string('-', 10 - e.ProgressPercentage / 10)}");
Console.CursorLeft = 0;
}
};
client.DownloadDataAsync(link);
while (!finished)
Thread.Sleep(100);
return new Tuple<bool, byte[]>(success, result);
}
public string FetchImageB64(Uri link)
{
using WebClient client = new();
using Image image = Image.Load(client.OpenRead(link));
image.Mutate(x => x.Resize(70, 70));
using MemoryStream ms = new();
image.SaveAsPng(ms);
return Convert.ToBase64String(ms.ToArray());
}
public bool YesNoDialog(string text, bool defaultVal)
{
if (Basic)
{
Console.WriteLine(text);
Console.WriteLine($"Selecting: {defaultVal}");
return defaultVal;
}
else
{
bool choosing = true;
bool current = defaultVal;
Console.WriteLine(text);
while (choosing)
{
Console.CursorLeft = 0;
Console.BackgroundColor = current ? ConsoleColor.White : ConsoleColor.Black;
Console.ForegroundColor = current ? ConsoleColor.Black : ConsoleColor.White;
Console.Write("Yes");
Console.ResetColor();
Console.Write(" ");
Console.BackgroundColor = current ? ConsoleColor.Black : ConsoleColor.White;
Console.ForegroundColor = current ? ConsoleColor.White : ConsoleColor.Black;
Console.Write("No");
Console.ResetColor();
switch (Console.ReadKey().Key)
{
case ConsoleKey.LeftArrow:
case ConsoleKey.RightArrow:
current = !current;
break;
case ConsoleKey.Enter:
choosing = false;
break;
case ConsoleKey.Escape:
current = defaultVal;
choosing = false;
break;
}
}
Console.ResetColor();
Console.WriteLine($" Selecting: {current}");
return current;
}
}
public void OkDialog(string text)
{
if (Basic)
Console.WriteLine(text);
else
{
Console.WriteLine(text);
Console.BackgroundColor = ConsoleColor.White;
Console.Write("OK");
Console.ResetColor();
Console.ReadKey();
}
}
public object GetDefaultIcon() => 0;
public object ImageFromB64(string b64) => 0;
public void Log(string text) => Console.WriteLine(text);
}
}

View File

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>uptool</AssemblyName>
<Deterministic>false</Deterministic>
<AssemblyVersion>1.0.*</AssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\UpTool2.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.2" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20574.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UpToolLib\UpToolLib.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
using System;
using Eto.Forms;
namespace UpToolEto.Gtk
{
class MainClass
{
[STAThread]
public static void Main(string[] args)
{
new Main(new Application(Eto.Platforms.Gtk), () =>
{
}, args).Entry();
}
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UpToolEto\UpToolEto.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Gtk" Version="2.5.10"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,38 @@
using System;
using Eto.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace UpToolEto.Wpf
{
class MainClass
{
[STAThread]
public static void Main(string[] args)
{
new Main(new Application(Eto.Platforms.Wpf), () =>
{
Process[] processes = Process.GetProcessesByName("UpTool2");
if (processes.Length > 0)
BringProcessToFront(processes[0]);
}, args).Entry();
}
public static void BringProcessToFront(Process process)
{
IntPtr handle = process.MainWindowHandle;
if (IsIconic(handle))
ShowWindow(handle, 9);
SetForegroundWindow(handle);
}
[DllImport("User32.dll")]
private static extern bool SetForegroundWindow(IntPtr handle);
[DllImport("User32.dll")]
private static extern bool ShowWindow(IntPtr handle, int nCmdShow);
[DllImport("User32.dll")]
private static extern bool IsIconic(IntPtr handle);
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UpToolEto\UpToolEto.csproj"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Eto.Platform.Wpf" Version="2.5.10"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Eto.Drawing;
using Eto.Forms;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Controls
{
public abstract class AppControlButton : Button
{
public abstract void ReloadState();
public abstract void SetApp(App app);
public abstract void Clear();
}
public class AppControlButton<T> : AppControlButton where T : KnownAppTask
{
private readonly IList<AppTask> _tasks;
private readonly Func<App, bool> _enabledCheck;
private readonly Color _defaultColor;
private App _app;
public AppControlButton(string text, Func<App, Action?, AppTask> factory, IList<AppTask> tasks, Action reloadState, Func<App, bool> enabledCheck)
{
_tasks = tasks;
_enabledCheck = enabledCheck;
_defaultColor = BackgroundColor;
Text = text;
Click += (_, _) =>
{
bool found = false;
for (var i = tasks.ToArray().Length - 1; i >= 0; i--)
{
if (tasks[i] is T t && t.App == _app)
{
found = true;
tasks.RemoveAt(i);
}
}
if (!found)
tasks.Add(factory(_app, ReloadState));
reloadState();
};
}
public override void ReloadState()
{
Enabled = _enabledCheck(_app);
BackgroundColor = _tasks.Any(s => s is T t && t.App == _app) ? Colors.Green : _defaultColor;
}
public override void SetApp(App app)
{
_app = app;
ReloadState();
}
public override void Clear()
{
Enabled = false;
}
}
}

View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Eto.Drawing;
using Eto.Forms;
using UpToolEto.Forms;
using UpToolLib.DataStructures;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Controls
{
public class AppControls : StackLayout
{
private readonly IList<AppTask> _tasks;
private readonly List<AppControlButton> _buttons;
private readonly Button _applyButton;
public AppControls(TaskFactory factory, IList<AppTask> tasks, IExternalFunctionality platform, Action update)
{
_tasks = tasks;
_buttons = new List<AppControlButton>
{
new AppControlButton<InstallTask>("Install", factory.CreateInstall, tasks, ReloadState,
app => !app.Status.Contains(Status.Installed)),
new AppControlButton<UpdateTask>("Update", factory.CreateUpdate, tasks, ReloadState,
app => app.Status.Contains(Status.Updatable)),
new AppControlButton<RemoveTask>("Remove", factory.CreateRemove, tasks, ReloadState,
app => app.Status.Contains(Status.Installed))
};
_applyButton = new Button((_, _) =>
{
try
{
QueueOverview overview = new(tasks);
overview.ShowModal();
if (!overview.Cancelled)
{
foreach (AppTask task in overview.TasksResulting)
{
task.Run();
_tasks.RemoveAt(0);
}
}
}
catch (Exception e)
{
platform.OkDialog("Failed to complete queue:\r\n" + e);
}
finally
{
ReloadState();
update();
}
})
{
Text = "Apply",
Enabled = false
};
foreach (AppControlButton button in _buttons) Items.Add(button);
Items.Add(new StackLayoutItem(_applyButton, HorizontalAlignment.Right));
if (Main.DebugColors)
BackgroundColor = Colors.Yellow;
Orientation = Orientation.Horizontal;
}
public void SetApp(App app)
{
foreach (AppControlButton button in _buttons) button.SetApp(app);
ReloadState();
}
public void Clear()
{
foreach (AppControlButton button in _buttons) button.Clear();
}
private void ReloadState()
{
foreach (AppControlButton button in _buttons) button.ReloadState();
_applyButton.Enabled = _tasks.Any();
}
}
}

View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Eto.Drawing;
using Eto.Forms;
using UpToolEto.Forms;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Controls
{
public class AppList : StackLayout
{
private readonly AppExtras _extras;
private readonly Action<Guid, App> _itemClickEvent;
private readonly StackLayout _layout;
private readonly AppListSearchProvider _searchProvider;
public AppList(AppExtras extras, Action<Guid, App> itemClickEvent, bool online, TaskFactory factory, IList<AppTask> tasks)
{
_extras = extras;
_itemClickEvent = itemClickEvent;
_searchProvider = new AppListSearchProvider(online, Update);
Items.Add(_searchProvider);
_layout = new StackLayout
{
Padding = 10,
Orientation = Orientation.Vertical,
Width = 200
};
Scrollable scrollable = new()
{
Content = _layout
};
if (Main.DebugColors)
scrollable.BackgroundColor = Colors.YellowGreen;
Items.Add(new StackLayoutItem(scrollable, VerticalAlignment.Stretch, true));
Orientation = Orientation.Vertical;
if (Main.DebugColors)
BackgroundColor = Colors.Green;
Update();
}
public void Update()
{
_layout.Items.Clear();
foreach (App app in _extras.FindApps(_searchProvider.GetSearchTerms()))
if (_searchProvider.Matches(app))
_layout.Items.Add(new Button((_, _) => _itemClickEvent(app.Id, app))
{
Text = app.Name,
Image = (Icon)app.Icon,
ImagePosition = ButtonImagePosition.Left,
});
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using Eto.Forms;
using UpToolLib.DataStructures;
using UpToolLib.v2;
namespace UpToolEto.Controls
{
public class AppListSearchProvider : StackLayout
{
private readonly bool _online;
private readonly TextBox _search;
private readonly EnumDropDown<Status> _state;
public AppListSearchProvider(bool online, Action refresh)
{
_online = online;
_search = new SearchBox();
_state = new EnumDropDown<Status>();
_state.SelectedValue = online ? Status.NotInstalled : Status.Installed;
_state.Enabled = online;
_search.TextChanged += (_, _) => refresh();
_state.SelectedIndexChanged += (_, _) => refresh();
Orientation = Orientation.Vertical;
Items.Add(new StackLayoutItem(_search, HorizontalAlignment.Stretch));
Items.Add(_state);
}
public bool Matches(App app) => app.Status.Contains(_online ? _state.SelectedValue : Status.Installed);
public string GetSearchTerms() => _search.Text;
}
}

View File

@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using Eto.Drawing;
using Eto.Forms;
using UpToolLib.DataStructures;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Controls
{
public class AppPanel : Panel
{
private readonly Button _appNameLabel;
private readonly Label _appDescriptionLabel;
private readonly AppControls _appControls;
private App _app;
public AppPanel(TaskFactory factory, AppExtras extras, IList<AppTask> tasks, IExternalFunctionality platform, Action updateAppList)
{
_appDescriptionLabel = new Label();
_appNameLabel = new Button((_, _) =>
{
try
{
extras.RunApp(_app);
}
catch (Exception e)
{
platform.OkDialog("Failed to start\r\n" + e);
}
});
_appNameLabel.Font = new Font(_appNameLabel.Font.Family, _appNameLabel.Font.Size * 2);
_appControls = new AppControls(factory, tasks, platform, () =>
{
updateAppList();
SetApp(_app);
});
Content = new StackLayout
{
Items =
{
new StackLayoutItem(_appNameLabel, HorizontalAlignment.Center),
new StackLayoutItem(_appDescriptionLabel, HorizontalAlignment.Center, true),
new StackLayoutItem(_appControls, HorizontalAlignment.Stretch)
},
Orientation = Orientation.Vertical
};
if (Main.DebugColors)
BackgroundColor = Colors.Red;
Clear();
}
public void SetApp(App app)
{
_app = app;
_appNameLabel.Text = app.Name;
_appNameLabel.Enabled = app.Status.Contains(Status.Installed) && app.Runnable;
_appDescriptionLabel.Text = app.Description;
_appControls.SetApp(app);
}
public void Clear()
{
_appNameLabel.Text = "Welcome to UpTool2";
_appNameLabel.Enabled = false;
_appDescriptionLabel.Text = "Select an app to get started";
_appControls.Clear();
}
}
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using Eto.Forms;
using UpToolLib.DataStructures;
namespace UpToolEto.Controls
{
public class RepoItem : StackLayout
{
public RepoItem(Repo repo, int index, Action update, IList<Repo> repos)
{
TextBox name = new()
{
Text = repo.Name
};
name.TextChanged += (_, _) => repo.Name = name.Text;
TextBox link = new()
{
Text = repo.Url
};
link.TextChanged += (_, _) => repo.Url = link.Text;
Orientation = Orientation.Horizontal;
Items.Add(name);
Items.Add(new StackLayoutItem(link, HorizontalAlignment.Stretch, true));
Items.Add(new Button((_, _) =>
{
repos.RemoveAt(index);
update();
})
{
Text = "-"
});
}
}
}

View File

@ -0,0 +1,71 @@
using System.Collections.Generic;
using System.Linq;
using Eto.Forms;
using UpToolEto.Forms;
using UpToolLib.DataStructures;
using UpToolLib.v2;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Controls
{
public class UTMenuBar : MenuBar
{
public UTMenuBar(MainForm mainForm, RepoManagement repoManagement, TaskFactory factory, IList<AppTask> tasks, AppList appList, IExternalFunctionality platform)
{
Command reloadRepos = new() {MenuText = "Reload", ToolBarText = "Reload"};
reloadRepos.Executed += (_, _) =>
{
if (platform.YesNoDialog("This may take some time. Are you sure?", true))
{
repoManagement.FetchRepos();
repoManagement.GetReposFromDisk();
appList.Update();
}
};
Command editSources = new() {MenuText = "Sources", ToolBarText = "Sources"};
editSources.Executed += (_, _) => new RepoForm(repoManagement).ShowModal();
Command addPackage = new() {MenuText = "Add Package", ToolBarText = "Add Package"};
addPackage.Executed += (_, _) =>
{
OpenFileDialog dialog = new() {MultiSelect = false, CheckFileExists = true, Filters = { new FileFilter("App package", ".zip")}};
if (dialog.ShowDialog(mainForm) == DialogResult.Ok)
{
if (!tasks.Any(s => s is UploadTask t && t.ZipFile == dialog.FileName))
{
StringDialog sd = new("Package name") {Text = "New package"};
sd.ShowModal();
tasks.Add(factory.CreateUpload(dialog.FileName, sd.Text));
}
}
};
Command quitCommand = new() {MenuText = "Quit", Shortcut = Application.Instance.CommonModifier | Keys.Q};
quitCommand.Executed += (_, _) => Application.Instance.Quit();
Command aboutCommand = new() {MenuText = "About Eto..."};
aboutCommand.Executed += (_, _) => new AboutDialog().ShowDialog(mainForm);
Items.Add(new ButtonMenuItem
{
Text = "&File", Items =
{
reloadRepos,
editSources,
addPackage
}
});
// File submenu
// new ButtonMenuItem { Text = "&Edit", Items = { /* commands/items */ } },
// new ButtonMenuItem { Text = "&View", Items = { /* commands/items */ } },
/*ApplicationItems =
{
// application (OS X) or file menu (others)
new ButtonMenuItem {Text = "&Preferences..."},
},*/
QuitItem = quitCommand;
AboutItem = aboutCommand;
}
}
}

View File

@ -0,0 +1,79 @@
using System;
using System.Net;
using System.Threading;
using Eto.Drawing;
using Eto.Forms;
using UpToolLib.DataStructures;
namespace UpToolEto.Forms
{
public class DownloadDialog : Dialog
{
private readonly Uri _url;
private readonly Application _application;
private readonly IExternalFunctionality _platform;
public State CurrentState = State.NotStarted;
public byte[] Download = new byte[0];
private readonly ProgressBar _bar;
public DownloadDialog(Uri url, Application application, IExternalFunctionality platform)
{
_url = url;
_application = application;
_platform = platform;
Title = "Downloader";
Resizable = false;
Maximizable = false;
Minimizable = false;
WindowStyle = WindowStyle.Utility;
_bar = new();
_bar.MaxValue = 100;
Content = new StackLayout
{
Padding = 10,
Items =
{
"Downloading " + url,
new StackLayoutItem(_bar, HorizontalAlignment.Stretch, true)
}
};
Size = new Size(700, 400);
}
public void StartDownload()
{
CurrentState = State.Downloading;
new Thread(() =>
{
try
{
WebClient client = new();
client.DownloadProgressChanged += (_, args) => _application.Invoke(() =>
{
_bar.Value = args.ProgressPercentage;
_application.RunIteration();
});
client.DownloadDataCompleted += (_, args) =>
{
CurrentState = State.Success;
Download = args.Result;
_application.Invoke(Close);
};
client.DownloadDataAsync(_url, client);
}
catch
{
CurrentState = State.Failed;
_application.Invoke(Close);
}
}).Start();
}
public enum State
{
NotStarted,
Downloading,
Failed,
Success
}
}
}

View File

@ -0,0 +1,51 @@
using System;
using Eto.Drawing;
using Eto.Forms;
using UpToolLib.DataStructures;
namespace UpToolEto.Forms
{
public class InitScreen : Form
{
private readonly Application _application;
private readonly IExternalFunctionality _platform;
private readonly Label _lab;
public InitScreen(Application application, IExternalFunctionality platform)
{
_application = application;
_platform = platform;
Title = "UpTool2 Init";
Resizable = false;
Maximizable = false;
Minimizable = false;
WindowStyle = WindowStyle.None;
_lab = new Label();
Label header = new();
header.Font = new Font(header.Font.Family, header.Font.Size * 2);
header.Text = "UpTool2";
Content = new StackLayout
{
Padding = 10,
Items =
{
new StackLayoutItem(header, HorizontalAlignment.Center),
new StackLayoutItem(_lab, HorizontalAlignment.Center)
},
VerticalContentAlignment = VerticalAlignment.Center
};
Shown += (_, _) => Size = new Size(700, 400);
}
public void SetText(string text)
{
_application.Invoke(() =>
{
_platform.Log(text);
_lab.Text = text;
_application.RunIteration();
});
}
public override void Close() => _application.Invoke(() => base.Close());
}
}

View File

@ -0,0 +1,37 @@
using System.Collections.Generic;
using Eto.Drawing;
using Eto.Forms;
using UpToolEto.Controls;
using UpToolLib;
using UpToolLib.DataStructures;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Forms
{
public partial class MainForm : Form
{
private readonly AppPanel _appPanel;
private readonly IList<AppTask> _tasks;
public MainForm(InitScreen init, UpToolLibMain lib, IExternalFunctionality platform, bool online)
{
_tasks = new List<AppTask>();
Title = "UpTool2";
MinimumSize = new Size(600, 100);
AppList appList = new(lib.V1.AppExtras, (_, app) => _appPanel.SetApp(app), online, lib.V2.TaskFactory, _tasks);
_appPanel = new AppPanel(lib.V2.TaskFactory, lib.V1.AppExtras, _tasks, platform, appList.Update);
Content = new StackLayout
{
Padding = 10,
Items =
{
new StackLayoutItem(appList, VerticalAlignment.Stretch),
new StackLayoutItem(_appPanel, VerticalAlignment.Stretch, true)
},
Orientation = Orientation.Horizontal
};
Menu = new UTMenuBar(this, lib.V2.RepoManagement, lib.V2.TaskFactory, _tasks, appList, platform);
Shown += (_, _) => init.Close();
}
}
}

View File

@ -0,0 +1,46 @@
using System.Collections.Generic;
using System.Linq;
using Eto.Forms;
using UpToolLib.v2.TaskQueue;
namespace UpToolEto.Forms
{
public class QueueOverview : Dialog
{
private readonly IList<AppTask> _tasks;
public bool Cancelled;
CheckBoxList cbl;
public List<AppTask> TasksResulting => cbl.SelectedValues.Select(s => (AppTask) s).ToList();
public QueueOverview(IList<AppTask> tasks)
{
_tasks = tasks;
StackLayout layout = new();
layout.Items.Add(new StackLayoutItem(new StackLayout()
{
Items =
{
new StackLayoutItem(new Button((_, _) =>
{
Cancelled = true;
Close();
})
{
Text = "Cancel"
}, HorizontalAlignment.Stretch),
new StackLayoutItem(new Button((_, _) =>
{
Close();
})
{
Text = "OK"
}, HorizontalAlignment.Stretch)
},
Orientation = Orientation.Horizontal
}, HorizontalAlignment.Stretch));
cbl = new CheckBoxList {DataStore = tasks, SelectedValues = tasks};
layout.Items.Add(cbl);
Content = layout;
}
}
}

View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using Eto.Forms;
using UpToolEto.Controls;
using UpToolLib.DataStructures;
using UpToolLib.v2;
namespace UpToolEto.Forms
{
public class RepoForm : Dialog
{
private readonly RepoManagement _management;
private List<Repo> _repos = new();
private StackLayout _layout;
public RepoForm(RepoManagement management)
{
_management = management;
_repos.AddRange(management.GetRepos());
Title = "Sources";
_layout = new StackLayout();
Content = _layout;
Update();
}
private void Update()
{
_layout.Items.Clear();
_layout.Items.Add(new StackLayoutItem(new Button((_, _) =>
{
_repos.Add(new Repo
{
Name = "New repo",
Url = "https://example.com/repo.xml"
});
Update();
})
{
Text = "Add",
}, HorizontalAlignment.Stretch));
StackLayout reposLayout = new();
for (int i = 0; i < _repos.Count; i++)
reposLayout.Items.Add(new StackLayoutItem(new RepoItem(_repos[i], i, Update, _repos), HorizontalAlignment.Stretch));
_layout.Items.Add(new StackLayoutItem(new Scrollable{Content = reposLayout}, HorizontalAlignment.Stretch, true));
_layout.Items.Add(new StackLayoutItem(new Button((_, _) =>
{
_management.Save(_repos);
Close();
})
{
Text = "Save"
}, HorizontalAlignment.Stretch));
}
}
}

View File

@ -0,0 +1,20 @@
using Eto.Forms;
namespace UpToolEto.Forms
{
public class StringDialog : Dialog
{
private readonly TextBox _tb;
public string Text
{
get => _tb.Text;
set => _tb.Text = value;
}
public StringDialog(string title)
{
_tb = new TextBox();
Content = _tb;
Title = title;
}
}
}

164
UpToolEto/UpToolEto/Main.cs Normal file
View File

@ -0,0 +1,164 @@
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Threading;
using System.Xml;
using Eto.Forms;
using UpToolEto.Forms;
using UpToolLib;
using UpToolLib.DataStructures;
using UpToolLib.v1;
using UpToolLib.v1.Tool;
using UpToolLib.v2;
namespace UpToolEto
{
public class Main
{
private readonly IExternalFunctionality _platform;
private readonly Application _application;
private readonly Action _activityExistsException;
private readonly InitScreen _init;
private readonly bool _skipFetch;
public static bool DebugColors { get; private set; }
public Main(Application application, Action activityExistsException, string[] args)
{
_skipFetch = args.Contains("--skip-fetch");
DebugColors = args.Contains("--debug-colors");
_platform = new UTLibFunctions(application);
_application = application;
_activityExistsException = activityExistsException;
_init = new(application, _platform);
}
public void Entry()
{
new Thread(InitThread).Start();
_application.Run(_init);
}
private void InitThread()
{
UpToolLibMain lib = null;
try
{
lib = new UpToolLibMain(_platform);
_init.SetText("Initializing paths");
if (!Directory.Exists(lib.V1.PathTool.Dir))
Directory.CreateDirectory(lib.V1.PathTool.Dir);
FixXml(lib.V1.XmlTool, lib.V1.PathTool);
_init.SetText("Performing checks");
bool online = false;
UpdateCheck updateCheck = null;
try
{
updateCheck = lib.V2.UpdateChecker.Check();
online = true;
}
catch
{
_platform.Log("Could not perform update check, starting offline");
}
if (online && UpdateCheck(updateCheck, lib.V1.PathTool, _init))
_platform.Log("Quitting");
else
{
if (!Directory.Exists(lib.V1.PathTool.GetRelative("Apps")))
Directory.CreateDirectory(lib.V1.PathTool.GetRelative("Apps"));
if (!_skipFetch && online)
{
_init.SetText("Fetching repos");
lib.V2.RepoManagement.FetchRepos();
}
lib.V2.RepoManagement.GetReposFromDisk();
_init.SetText("Opening");
_application.Invoke(() => _application.Run(new MainForm(_init, lib, _platform, online)));
}
}
catch (MutexLockLockedException)
{
_application.Invoke(() =>
{
_init.Close();
_platform.OkDialog("Mutex property of other process, quitting");
_activityExistsException();
});
}
catch (Exception e)
{
lib?.Dispose();
_platform.Log(e.ToString());
}
finally
{
lib?.Dispose();
_application.Invoke(() => _application.Quit());
}
}
public void FixXml(XmlTool xmlTool, PathTool pathTool, bool throwOnError = false)
{
try
{
xmlTool.FixXml();
}
catch (XmlException)
{
if (throwOnError) throw;
_platform.OkDialog("Something went wrong while trying to parse XML. Retrying...");
File.Delete(pathTool.InfoXml);
FixXml(xmlTool, pathTool);
}
}
private bool UpdateCheck(UpdateCheck updateCheck, PathTool pathTool, InitScreen init)
{
init.SetText("Comparing online version");
if (Assembly.GetExecutingAssembly().GetName().Version >= updateCheck.OnlineVersion) return false;
if (PlatformCheck.IsWindows)
{
init.SetText("Downloading latest");
(bool success, byte[] dl) = _platform.Download(updateCheck.Installer);
if (!success)
throw new Exception("Failed to update");
init.SetText("Verifying");
using (SHA256CryptoServiceProvider sha256 = new())
{
string pkgHash = BitConverter.ToString(sha256.ComputeHash(dl)).Replace("-", string.Empty).ToUpper();
if (pkgHash != updateCheck.InstallerHash)
throw new Exception(
$"The hash is not equal to the one stored in the repo:\r\nPackage: {pkgHash}\r\nOnline: {updateCheck.InstallerHash}");
}
init.SetText("Installing");
if (Directory.Exists(pathTool.GetRelative("Install", "tmp")))
Directory.Delete(pathTool.GetRelative("Install", "tmp"), true);
Directory.CreateDirectory(pathTool.GetRelative("Install", "tmp"));
using (MemoryStream ms = new(dl))
{
using ZipArchive ar = new(ms);
ar.ExtractToDirectory(pathTool.GetRelative("Install", "tmp"), true);
}
init.Close();
Process.Start(new ProcessStartInfo
{
FileName = pathTool.GetRelative("Install", "tmp", "Installer.exe"),
Arguments = "i -p",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
WorkingDirectory = pathTool.GetRelative("Install")
});
return true;
}
else
{
_platform.OkDialog("A new version is available. Please install it");
return false;
}
}
}
}

View File

@ -0,0 +1,59 @@
using System;
using System.IO;
using System.Net;
using System.Threading;
using Eto.Drawing;
using Eto.Forms;
using UpToolEto.Forms;
using UpToolLib;
using UpToolLib.DataStructures;
namespace UpToolEto
{
public class UTLibFunctions : IExternalFunctionality
{
private readonly Application _application;
private const int ImgSize = 32;
public Tuple<bool, byte[]> Download(Uri link)
{
DownloadDialog dlg = new(link, _application, this);
_application.AsyncInvoke(() => dlg.ShowModal());
dlg.StartDownload();
Log("Downloading " + link);
while (dlg.CurrentState == DownloadDialog.State.Downloading) Thread.Sleep(20);
Log("Download complete");
return new Tuple<bool, byte[]>(dlg.CurrentState == DownloadDialog.State.Success, dlg.Download);
}
public string FetchImageB64(Uri link)
{
using WebClient client = new();
using Stream s = client.OpenRead(link);
using Bitmap source = new(s);
using Icon bmp = source.WithSize(ImgSize, ImgSize);
using Bitmap bitmapResized = new(bmp);
using MemoryStream ms = new();
bitmapResized.Save(ms, ImageFormat.Png);
return Convert.ToBase64String(ms.ToArray());
}
public bool YesNoDialog(string text, bool defaultVal) =>
_application.Invoke(() => MessageBox.Show(text, MessageBoxButtons.YesNo,
defaultButton: defaultVal ? MessageBoxDefaultButton.Yes : MessageBoxDefaultButton.No)) ==
DialogResult.Yes;
public void OkDialog(string text) => _application.Invoke(() => MessageBox.Show(text));
public object GetDefaultIcon() => Bitmap.FromResource("UpToolLib.C_64.ico", typeof(UpToolLibMain)).WithSize(ImgSize, ImgSize);
public object ImageFromB64(string b64) => new Bitmap(Convert.FromBase64String(b64)).WithSize(ImgSize, ImgSize);
public void Log(string text)
{
Console.WriteLine(text);
//TODO implement visual logging
}
public UTLibFunctions(Application application) => _application = application;
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.5.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\UpToolLib\UpToolLib.csproj" />
</ItemGroup>
</Project>

BIN
UpToolLib/C_64.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,15 @@
using System;
namespace UpToolLib.DataStructures
{
public interface IExternalFunctionality
{
public Tuple<bool, byte[]> Download(Uri link);
public string FetchImageB64(Uri link);
public bool YesNoDialog(string text, bool defaultVal);
public void OkDialog(string text);
public object GetDefaultIcon();
public object ImageFromB64(string b64);
public void Log(string text);
}
}

View File

@ -0,0 +1,8 @@
namespace UpToolLib.DataStructures
{
public class Repo
{
public string Name { get; set; }
public string Url { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
namespace UpToolLib.DataStructures
{
[Flags]
public enum Status
{
NotInstalled = 1,
Updatable = 2,
Installed = 4,
Local = 8,
All = 0
}
public static class StatusExtensions
{
public static bool Contains(this Status status, Status other) => (status & other) == other;
}
}

View File

@ -0,0 +1,8 @@
using System;
namespace UpToolLib
{
public class MutexLockLockedException : Exception
{
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Deterministic>false</Deterministic>
<AssemblyVersion>1.0.*</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<Content Remove="C_64.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="C_64.ico" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,38 @@
using System;
using System.Threading;
using UpToolLib.DataStructures;
using UpToolLib.v1;
using UpToolLib.v2;
namespace UpToolLib
{
public class UpToolLibMain : IDisposable
{
private static Mutex _mutex;
public UpToolLibMain(IExternalFunctionality platform)
{
V1 = new UpToolLibV1(platform);
V2 = new UpToolLibV2(platform, V1.Installer, V1.AppExtras, V1.PathTool, V1.XmlTool, V1.Apps);
_mutex = new Mutex(false,
"Global\\{c0c1e002-9e13-4e8f-a035-dbdc5128e00e}",
out bool _);
try
{
if (_mutex.WaitOne(5000, false))
return;
throw new MutexLockLockedException();
}
catch (AbandonedMutexException)
{
#if DEBUG
_platform.Log("Mutex abandoned");
#endif
}
}
public readonly UpToolLibV1 V1;
public readonly UpToolLibV2 V2;
public void Dispose() => _mutex.ReleaseMutex();
~UpToolLibMain() => Dispose();
}
}

Some files were not shown because too many files have changed in this diff Show More