182 Commits

Author SHA1 Message Date
785c4ce41d version bump 2025-08-23 08:41:02 +02:00
bd7ce5bbe7 use full version string for {version} 2025-08-23 08:40:09 +02:00
8ef522bc6c 1.9.3 2025-08-20 08:32:27 +02:00
582752c987 seperated cli & some work for options 2025-08-20 08:17:33 +02:00
b434ddf480 preparation for dynamic options 2025-07-31 14:51:30 +02:00
8300f571a3 update nuget packages 2025-07-31 14:43:27 +02:00
e86fe2ee17 another fix 2025-07-04 22:27:37 +02:00
531c2a60bf fix option shit 2025-07-04 22:13:47 +02:00
b1ac3cd73c uff, enough for now 2025-06-30 18:55:30 +02:00
6674872848 more release shit 2025-06-30 17:31:42 +02:00
03f27214d6 update client app symbol 2025-06-30 14:44:07 +02:00
d8c798fe09 remove linux update url 2025-06-30 11:49:24 +02:00
70786fc169 version bump 2025-06-30 11:45:38 +02:00
aed70d4f3f update publish profile 2025-06-30 05:53:38 +02:00
45ef76e647 ui: hide installation key if no extras key can be used 2025-06-30 05:50:41 +02:00
433613e43d ui: migrate client back to WinForms
-> let's use wine for comatibility again
-> easier to maintain
-> easier to build dynamic options with
2025-06-29 20:03:02 +02:00
6e8b4f0a9d manager: tree view & action set infos editor panel 2025-06-29 14:19:58 +02:00
87cb9b8b37 update nuget packages 2025-06-29 13:40:36 +02:00
Pascal
77a93b585a manager: add proper support for options 2025-06-27 11:24:53 +02:00
Pascal
d0e3d2fa61 finalize model for option sets 2025-06-27 09:29:57 +02:00
Pascal
f5596ab0ba manager: allow parent path annotations
- Allows unlimited amount of `..\` or `../` at the start of DestPath string.
- Each of then will go back one folder.
- Similar to how Linux works or Visual Studio project styles.
- This allows us to install/update lwjgl3ify in PrismLauncher.
2025-06-27 09:10:18 +02:00
Pascal
09c1ac8b08 ui: simplify workspaces menu 2025-06-27 08:34:03 +02:00
Pascal
4e69acaf04 ui: row context menu fine tuning 2025-06-27 08:24:20 +02:00
Pascal
55db801c4c update nuget packages 2025-06-27 08:22:08 +02:00
Pascal
cbbb546f30 ui: fixed adding new row beeing empty 2025-06-27 08:09:26 +02:00
04848d4622 repair manager project 2025-06-26 18:53:00 +02:00
d85a41c158 update url 2025-06-19 12:54:11 +02:00
798961ea22 update publish profiles 2025-06-19 12:25:33 +02:00
bf0037cf79 hide console on windows only 2025-06-19 12:15:31 +02:00
c52c4059a0 version bump 2025-06-19 11:41:52 +02:00
03fefa33fe update AppUpdate to support linux updates 2025-06-19 11:41:04 +02:00
30b1832cd0 ui: migrate client to gtk 2025-06-17 09:40:10 +02:00
0aa6ed98c6 add install options (WIP) 2025-06-16 15:34:15 +02:00
c1616fecf0 fix modlist plugin not loading 2025-06-16 15:33:37 +02:00
a5eb9fad43 fix some null reference exceptions 2025-04-23 15:40:01 +02:00
df21d8180d version bump 2025-04-23 14:46:04 +02:00
f19974599f add repair mode 2025-04-23 14:45:22 +02:00
e14dedc924 support first placeholder & overwriting version 2025-04-23 13:38:51 +02:00
0285892f20 fixes 2025-04-21 20:55:55 +02:00
01fc5606cb add reftag commandline argument 2025-04-21 20:50:16 +02:00
70805083ba version bump 2025-04-21 20:48:19 +02:00
96cd9bcaac add support for {ref} placeholder 2025-04-21 20:43:09 +02:00
986257c0a4 v1.6.5 2025-04-21 18:40:19 +02:00
b11ad06287 add support for version placeholder in download links 2025-04-21 18:39:47 +02:00
d68dd09ad2 add option to generate markdown table 2025-04-03 06:19:47 +02:00
1b3070493c order by name 2025-01-28 20:46:47 +01:00
1c9c50778a add the missing files from the last commit (wtf?) 2025-01-28 20:43:27 +01:00
33a209a01a add generate modlist feature 2025-01-28 20:38:27 +01:00
2ce73ad032 list only relevant modrinth versions 2025-01-26 09:19:07 +01:00
ecb7ae0d1a fail silently if url can not be resolved 2024-12-22 18:48:30 +01:00
40380d088f version bump 2024-12-07 18:11:48 +01:00
50cbf081e1 fix endless update 2024-12-07 18:11:04 +01:00
3b79335e85 more logging 2024-12-05 07:22:01 +01:00
3e1ab72162 update deps & enable console logging 2024-12-05 07:06:06 +01:00
a83d109f24 fix first install includes ALL updates 2024-12-05 06:56:45 +01:00
e50d5f4874 v1.6.2 2024-10-31 21:16:00 +01:00
72b765e6fd final fix 2024-10-31 21:15:15 +01:00
26347ca9a4 wtf? 2024-10-19 22:05:06 +02:00
9c8eb4a9a8 v1.6.1 2024-10-19 22:01:45 +02:00
f8801cc861 probably fix install key not saving on first installation 2024-10-19 22:01:20 +02:00
97bf2b1323 showdialog 2024-10-14 16:55:14 +02:00
8fae2a2c9d improvements for first installation 2024-10-13 11:54:36 +02:00
334b9583c6 allow remove updates from update collector 2024-10-13 09:31:43 +02:00
8561fdb09b add simple generate changelog feature 2024-10-13 09:22:19 +02:00
ee69d8af56 some fixes 2024-10-03 15:46:06 +02:00
cd929485d0 bump settings version 2024-10-03 12:46:39 +02:00
2fddf23e6a show correct app version 2024-10-03 12:46:20 +02:00
d8847a8a0e client: bump version 2024-10-03 12:43:20 +02:00
e321c66f72 minor fixes 2024-10-03 11:51:05 +02:00
ac146900d0 use CurrentUpdates property 2024-10-03 11:43:40 +02:00
5fc97ed522 only load modpack config if url is provided 2024-10-03 11:42:42 +02:00
9694ba56fd use modpack config for finding updates 2024-10-03 11:36:29 +02:00
2a389ae5d4 make ModpackConfig.ConfigUrl private 2024-10-03 11:31:27 +02:00
6a0bf70e97 add modloader to modpackconfig 2024-10-03 11:30:31 +02:00
a329d21feb add modpack config to workspace (read-only via url) 2024-10-03 11:28:34 +02:00
c07ba7fc28 optimize updatescollectorui 2024-10-03 11:17:27 +02:00
07a94cfa5f add icons to new features 2024-10-03 10:51:30 +02:00
690355266c add options to update and clear direct links 2024-10-03 10:46:16 +02:00
3ec94fa22d add option to prefer directlinks 2024-10-03 10:03:40 +02:00
95a81a9306 move actions to separated code & add sinlge update search action 2024-10-03 09:54:22 +02:00
934b8db71b some fixes 2024-09-29 09:58:32 +02:00
31f557cc8d finish healthy check & other sources implemtation 2024-09-28 14:08:30 +02:00
6f8ac996fd minor fixes 2024-09-26 10:18:29 +02:00
a420e7bf74 fix wrong menu item for tools features 2024-09-26 09:33:59 +02:00
12c00841ff add pluginfeatureprovider for updatescollectorfeature 2024-09-26 09:32:55 +02:00
f64c8cdba0 proper finish updates collector 2024-09-26 09:30:12 +02:00
2f9d60f1a8 some more work 2024-09-25 12:08:38 +02:00
bc6c483ba6 allow curseforge and modrinth as source 2024-09-22 09:41:09 +02:00
7e5acd413e add/remove action rows 2024-09-09 09:20:24 +02:00
333f5011de check against Id instead of Name 2024-09-09 08:58:16 +02:00
c6153488cd fix namepsace of Modpack Features 2024-09-09 08:57:29 +02:00
32d9212edc add/edit/delete updates 2024-09-09 08:54:53 +02:00
1747083c99 change treeview to listcontrol 2024-09-08 17:16:02 +02:00
f2a78a462c reorder columns 2024-09-08 17:11:28 +02:00
4c54f592d3 remove unused using 2024-09-08 17:04:48 +02:00
27879f15c3 allow edit 2024-09-08 17:04:13 +02:00
a02f275577 disable icon for now due performance 2024-09-08 10:01:47 +02:00
4b964e548f add icon for source type & minor fixes 2024-09-08 09:57:03 +02:00
8087c0539a make list 2024-09-08 09:12:39 +02:00
19fccd8af9 add icon to manager form 2024-09-07 09:49:41 +02:00
043b14e9a9 some work 2024-09-07 09:45:38 +02:00
f6219c0aa8 use AssemblyAppVersion for Client 2024-09-07 09:30:13 +02:00
f453e85956 update nuget packages & minor fixes 2024-09-06 20:08:40 +02:00
5e678db077 some work for loading a workspace 2024-09-06 16:55:04 +02:00
f0f63a1895 add icons to manager window 2024-09-06 16:19:49 +02:00
0276f11a8a use Win11 as default theme for Updater 2024-09-06 16:13:14 +02:00
5083af5fd1 fix 2024-09-06 16:01:10 +02:00
86b7ec67fc finish editor for gitlab repo workspace config 2024-09-06 15:59:13 +02:00
3239fb5431 add cancel icon 2024-09-06 15:58:48 +02:00
9bfd83ee4a some background code for manager workspaces 2024-09-06 15:16:19 +02:00
ebc57e05d5 some work on Manager 2024-09-06 09:44:24 +02:00
5bccd070f4 more refactoring 2024-09-06 09:14:25 +02:00
3625962a27 re-organze namespace 2024-09-06 08:45:36 +02:00
939c87820f begin finding assets from bottom to top 2024-09-05 15:17:01 +02:00
b4f0d43b46 add GitHub as source & allow inheritance 2024-09-05 15:03:53 +02:00
46179463e1 migration due nuget updates 2024-09-05 14:53:39 +02:00
7c4dae8c8d update nuget packages 2024-09-05 14:27:18 +02:00
6427ce4726 stop shipping whole framework on publication 2024-08-24 09:08:28 +02:00
b35e3d5187 update help texts 2024-08-10 09:35:40 +02:00
deeee34f87 v1.5.2.2 2024-08-10 09:27:13 +02:00
f254ac03e1 draw help always even if not noui is set 2024-08-10 09:27:09 +02:00
c9650c6118 v1.5.2.1 2024-08-10 09:24:07 +02:00
2e467c0a96 draw help 2024-08-10 09:23:57 +02:00
69cd869cd1 v1.5.2 2024-08-09 15:37:45 +02:00
ef314ac227 show console on cmd 2024-08-09 15:37:36 +02:00
a30893e04c fix: also check side for initial install 2024-08-09 15:37:21 +02:00
368948d277 fail safe when no unleash api endpoint configured 2024-07-10 18:49:25 +02:00
60b11d949d remove modpack key 2024-07-10 18:45:22 +02:00
1e41fa8b10 v1.5.1.0 2024-07-10 18:25:17 +02:00
d1f35676ee unleash api via modpack config 2024-07-10 18:24:55 +02:00
1bd0e87211 Lösche ModpackUpdater.sln.bak 2024-06-22 17:05:25 +00:00
64e89eb6ba Merge branch 'feat/rework-install' into 'master'
Feat/rework install

See merge request gaming/minecraft/minecraft-modpack-updater!1
2024-06-22 16:59:07 +00:00
b6e0f6f77a v1.5.0.6 2024-06-22 18:58:17 +02:00
ade4f8f245 fix loading url & key again 2024-06-22 18:58:07 +02:00
80d41c869c v1.5.0.5 2024-06-22 18:49:23 +02:00
725711877c fix version 2024-06-22 18:49:06 +02:00
9fb56678f3 v1.5.0.4 2024-06-22 18:46:07 +02:00
a4a0549920 fix pasting url & ley 2024-06-22 18:45:56 +02:00
b7a201e621 v1.5.0.3 2024-06-22 18:27:08 +02:00
1fba037e3f fix loading everything on startup 2024-06-22 18:26:58 +02:00
bf38ed6df6 v1.5.0.2 2024-06-22 18:08:39 +02:00
1e00870f29 fix install button never accessable 2024-06-22 18:08:07 +02:00
ebb15bf25c v1.5.0.1 2024-06-22 17:52:14 +02:00
b5878572aa fix loading configu url from modpackinfo 2024-06-22 17:52:09 +02:00
7804a60377 v1.5.0 2024-06-22 13:40:12 +02:00
44450546d0 show version without git tag 2024-06-22 13:39:52 +02:00
11e9290fc8 some more bugfixes & cleanup 2024-06-22 13:39:17 +02:00
4b78ce1b6f some fixes 2024-06-22 11:22:14 +02:00
Schedel Pascal
20c1e5dc8e install keys 2024-06-21 08:55:46 +02:00
Schedel Pascal
f1185c242c Revert "completely revert extra property"
This reverts commit 1746bb6442.
2024-06-21 06:45:33 +02:00
Schedel Pascal
ab1d3f38b0 include release configuration 2024-06-21 06:16:35 +02:00
Schedel Pascal
1746bb6442 completely revert extra property 2024-06-21 06:07:30 +02:00
68b940fddd AllowExtras 2024-06-20 22:42:46 +02:00
87cfacfdbb remove allow extras from option -> controlled by update config 2024-06-20 22:40:19 +02:00
ee46f7272e remove extras toogle from ui 2024-06-20 22:37:54 +02:00
3be25d7070 include extras 2024-06-20 22:34:38 +02:00
4ea4a70e50 add option to include/exclude extra files 2024-06-20 22:19:18 +02:00
c97a04c4ce load modpack info before modpack installer 2024-06-20 15:05:01 +02:00
604d35856f adjust maintenance text to be not too long 2024-06-20 07:47:26 +02:00
3dc69a4f26 migrate to svg symbols & add maintenance info 2024-06-20 07:24:23 +02:00
fc27fc1c34 add maintenance mode & improve & bugfixing 2024-06-20 06:55:25 +02:00
c31cc3aa20 add side 2024-06-20 06:30:24 +02:00
00de4d8708 add installation without gui & pass arguments to gui 2024-06-20 06:12:28 +02:00
f3b2d07117 allow update after install 2024-06-20 06:11:41 +02:00
6808f772c1 some bugfixing & more 2024-06-19 20:08:00 +02:00
0f4ba96963 cmd tools 2024-06-18 11:58:49 +02:00
c95e73be48 rework ui 2024-06-18 11:41:40 +02:00
40279ba6b9 migrate settings 2024-06-18 11:17:57 +02:00
0f3e93bfff code cosmetic 2024-06-18 10:59:08 +02:00
deb14caf24 convert to c# 2024-06-18 10:56:32 +02:00
f07fad0a80 use assembly file version instead of product version for update check 2024-06-17 20:20:13 +02:00
b21d33237f fix converter for UpdateInfo.Version 2024-06-17 20:13:45 +02:00
b32d2c5512 remove unused imports 2024-06-17 20:11:58 +02:00
e303b6c381 fix AppUpdater using 2024-06-17 20:11:29 +02:00
a7a3abf6e5 update update url 2024-06-17 20:02:08 +02:00
4dd112cd8c rework updater 2024-06-17 19:02:04 +02:00
af58f0d8ea install: more directory power 2024-06-17 18:46:49 +02:00
f1b11ea3c6 install: use local zip cache 2024-06-17 18:40:30 +02:00
54ab66fba0 add property for modpack name 2024-06-17 18:32:12 +02:00
9c43055580 install: rework ModpackInstaller (incomplete) 2024-06-17 18:30:57 +02:00
a4d5fff876 install: remove legacy code 2024-06-17 18:01:32 +02:00
99b1db952b install: begin rework 2024-06-17 17:20:02 +02:00
178 changed files with 11301 additions and 7049 deletions

3
.gitignore vendored
View File

@@ -174,7 +174,7 @@ publish/
*.azurePubxml *.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings, # Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted # but database connection strings (with potential passwords) will be unencrypted
*.pubxml # *.pubxml
*.publishproj *.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to # Microsoft Azure Web App publish settings. Comment the next line if you want to
@@ -348,3 +348,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder # Ionide (cross platform F# VS Code tools) working folder
.ionide/ .ionide/
*.json

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
<PackageReference Include="Pilz.IO" Version="2.1.0" />
</ItemGroup>
</Project>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<appSettings> <appSettings>
<add key="TelerikWinFormsThemeName" value="Office2019Dark" /> <add key="TelerikWinFormsThemeName" value="Windows11CompactDark" />
</appSettings> </appSettings>
</configuration> </configuration>

View File

@@ -0,0 +1,26 @@
using Newtonsoft.Json;
using Pilz.Configuration;
namespace ModpackUpdater.Apps.Client.Gui;
public class AppConfig : ISettingsNode, ISettingsIdentifier
{
public static string Identifier => "pilz.appconfig";
public string LastMinecraftProfilePath { get; set; }
[JsonIgnore, Obsolete]
public string ConfigFilePath { get; private set; }
[JsonProperty("ConfigFilePath"), Obsolete]
private string ConfigFilePathLegacy
{
set => ConfigFilePath = value;
}
public void Reset()
{
LastMinecraftProfilePath = null;
}
public static AppConfig Instance => Program.Settings.Get<AppConfig>();
}

View File

@@ -0,0 +1,82 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Pilz.Extensions;
using System.Reflection;
namespace ModpackUpdater.Apps.Client.Gui;
public class AppUpdater(string updateUrl)
{
private class UpdateInfo
{
[JsonConverter(typeof(VersionConverter))]
public Version Version { get; set; }
public string DownloadUrl { get; set; }
}
private readonly HttpClient httpClient = new();
private UpdateInfo info;
public async Task<bool> Check()
{
var hasUpdate = false;
try
{
var appVersion = Assembly.GetExecutingAssembly().GetAppVersion().Version;
var result = await httpClient.GetStringAsync(updateUrl);
info = JsonConvert.DeserializeObject<UpdateInfo>(result);
if (info is not null && info.Version > appVersion)
hasUpdate = true;
}
catch
{
}
return hasUpdate;
}
public async Task Install()
{
var client = new HttpClient();
var tempFileName = Path.GetTempFileName();
var appFileName = Environment.ProcessPath;
var oldFileName = appFileName + ".old";
// Delete old file
try
{
File.Delete(oldFileName);
}
catch
{
}
// Download the new file
using (var tempFileStream = new FileStream(tempFileName, FileMode.Create, FileAccess.ReadWrite))
{
Stream? downloadStream = null;
try
{
var url = info?.DownloadUrl;
downloadStream = await client.GetStreamAsync(url);
await downloadStream.CopyToAsync(tempFileStream);
}
catch
{
}
finally
{
downloadStream?.Dispose();
}
}
// Replace current application file with new file
if (!string.IsNullOrWhiteSpace(appFileName))
{
File.Move(appFileName, oldFileName, true);
File.Move(tempFileName, appFileName);
}
}
}

View File

@@ -0,0 +1,81 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.My.Resources {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class FiledialogFilters {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal FiledialogFilters() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.FiledialogFilters", typeof(FiledialogFilters).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Json files (*.json) ähnelt.
/// </summary>
internal static string JSON_Display {
get {
return ResourceManager.GetString("JSON_Display", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die *.json ähnelt.
/// </summary>
internal static string JSON_Filter {
get {
return ResourceManager.GetString("JSON_Filter", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,162 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.My.Resources {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class LangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal LangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.LangRes", typeof(LangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die A new version of this program is available. If you confirm, the update will be installed automatically. It takes just a few seconds. Continue? ähnelt.
/// </summary>
internal static string MsgBox_UpdateAvailable {
get {
return ResourceManager.GetString("MsgBox_UpdateAvailable", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die New program version available ähnelt.
/// </summary>
internal static string MsgBox_UpdateAvailable_Title {
get {
return ResourceManager.GetString("MsgBox_UpdateAvailable_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Everything is right and up-to-date. ähnelt.
/// </summary>
internal static string StatusTest_EverythingOk {
get {
return ResourceManager.GetString("StatusTest_EverythingOk", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Checking for Updates... ähnelt.
/// </summary>
internal static string StatusText_CheckingForUpdates {
get {
return ResourceManager.GetString("StatusText_CheckingForUpdates", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Config incomplete or not loaded! ähnelt.
/// </summary>
internal static string StatusText_ConfigIncompleteOrNotLoaded {
get {
return ResourceManager.GetString("StatusText_ConfigIncompleteOrNotLoaded", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Error on update check or while updating! ähnelt.
/// </summary>
internal static string StatusText_ErrorWhileUpdateCheckOrUpdate {
get {
return ResourceManager.GetString("StatusText_ErrorWhileUpdateCheckOrUpdate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Installing... ähnelt.
/// </summary>
internal static string StatusText_Installing {
get {
return ResourceManager.GetString("StatusText_Installing", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Downloading program update... ähnelt.
/// </summary>
internal static string StatusText_InstallingAppUpdate {
get {
return ResourceManager.GetString("StatusText_InstallingAppUpdate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The update servers are in maintenance. ähnelt.
/// </summary>
internal static string StatusText_Maintenance {
get {
return ResourceManager.GetString("StatusText_Maintenance", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Minecraft profile folder seems to be not valid. ähnelt.
/// </summary>
internal static string StatusText_MinecraftProfileWarning {
get {
return ResourceManager.GetString("StatusText_MinecraftProfileWarning", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die An update is available! ähnelt.
/// </summary>
internal static string StatusText_UpdateAvailable {
get {
return ResourceManager.GetString("StatusText_UpdateAvailable", resourceCulture);
}
}
}
}

View File

@@ -141,6 +141,9 @@
<data name="StatusText_InstallingAppUpdate" xml:space="preserve"> <data name="StatusText_InstallingAppUpdate" xml:space="preserve">
<value>Downloading program update...</value> <value>Downloading program update...</value>
</data> </data>
<data name="StatusText_Maintenance" xml:space="preserve">
<value>The update servers are in maintenance.</value>
</data>
<data name="StatusText_MinecraftProfileWarning" xml:space="preserve"> <data name="StatusText_MinecraftProfileWarning" xml:space="preserve">
<value>Minecraft profile folder seems to be not valid.</value> <value>Minecraft profile folder seems to be not valid.</value>
</data> </data>

View File

@@ -0,0 +1,288 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
namespace ModpackUpdater.Apps.Client.Gui
{
[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
public partial class MainForm : Telerik.WinControls.UI.RadForm
{
// Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
[DebuggerNonUserCode()]
protected override void Dispose(bool disposing)
{
try
{
if (disposing && components is not null)
components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
// Wird vom Windows Form-Designer benötigt.
private System.ComponentModel.IContainer components = new System.ComponentModel.Container();
// Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
// Das Bearbeiten ist mit dem Windows Form-Designer möglich.
// Das Bearbeiten mit dem Code-Editor ist nicht möglich.
[DebuggerStepThrough()]
private void InitializeComponent()
{
var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
RadLabel_MinecraftProfile = new Telerik.WinControls.UI.RadLabel();
RadLabel_ModpackUrl = new Telerik.WinControls.UI.RadLabel();
RadTextBox_MinecraftProfileFolder = new Telerik.WinControls.UI.RadTextBoxControl();
RadTextBox_ModpackConfig = new Telerik.WinControls.UI.RadTextBoxControl();
RadButton_Install = new Telerik.WinControls.UI.RadSplitButton();
radMenuItem_Install = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_Repair = new Telerik.WinControls.UI.RadMenuItem();
RadButton_CheckForUpdates = new Telerik.WinControls.UI.RadButton();
RadButton_SearchMinecraftProfileFolder = new Telerik.WinControls.UI.RadButton();
tableLayoutPanel1 = new TableLayoutPanel();
RadLabel_Status = new Telerik.WinControls.UI.RadLabel();
RadLabel_StatusDesc = new Telerik.WinControls.UI.RadLabel();
radLabel_InstallationKey = new Telerik.WinControls.UI.RadLabel();
radTextBox_InstallKey = new Telerik.WinControls.UI.RadTextBoxControl();
((System.ComponentModel.ISupportInitialize)RadLabel_MinecraftProfile).BeginInit();
((System.ComponentModel.ISupportInitialize)RadLabel_ModpackUrl).BeginInit();
((System.ComponentModel.ISupportInitialize)RadTextBox_MinecraftProfileFolder).BeginInit();
((System.ComponentModel.ISupportInitialize)RadTextBox_ModpackConfig).BeginInit();
((System.ComponentModel.ISupportInitialize)RadButton_Install).BeginInit();
((System.ComponentModel.ISupportInitialize)RadButton_CheckForUpdates).BeginInit();
((System.ComponentModel.ISupportInitialize)RadButton_SearchMinecraftProfileFolder).BeginInit();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)RadLabel_Status).BeginInit();
((System.ComponentModel.ISupportInitialize)RadLabel_StatusDesc).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel_InstallationKey).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_InstallKey).BeginInit();
((System.ComponentModel.ISupportInitialize)this).BeginInit();
SuspendLayout();
//
// RadLabel_MinecraftProfile
//
RadLabel_MinecraftProfile.Anchor = AnchorStyles.Left;
RadLabel_MinecraftProfile.Location = new Point(3, 6);
RadLabel_MinecraftProfile.Name = "RadLabel_MinecraftProfile";
RadLabel_MinecraftProfile.Size = new Size(89, 18);
RadLabel_MinecraftProfile.TabIndex = 0;
RadLabel_MinecraftProfile.Text = "Minecraft profile";
//
// RadLabel_ModpackUrl
//
RadLabel_ModpackUrl.Anchor = AnchorStyles.Left;
RadLabel_ModpackUrl.Location = new Point(3, 36);
RadLabel_ModpackUrl.Name = "RadLabel_ModpackUrl";
RadLabel_ModpackUrl.Size = new Size(76, 18);
RadLabel_ModpackUrl.TabIndex = 1;
RadLabel_ModpackUrl.Text = "Modpack URL";
//
// RadTextBox_MinecraftProfileFolder
//
RadTextBox_MinecraftProfileFolder.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(RadTextBox_MinecraftProfileFolder, 3);
RadTextBox_MinecraftProfileFolder.Location = new Point(98, 3);
RadTextBox_MinecraftProfileFolder.Name = "RadTextBox_MinecraftProfileFolder";
RadTextBox_MinecraftProfileFolder.NullText = "C:\\Users\\...\\AppData\\...";
RadTextBox_MinecraftProfileFolder.Size = new Size(221, 24);
RadTextBox_MinecraftProfileFolder.TabIndex = 1;
RadTextBox_MinecraftProfileFolder.TextChanged += RadTextBox_MinecraftFolder_TextInserted;
//
// RadTextBox_ModpackConfig
//
RadTextBox_ModpackConfig.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(RadTextBox_ModpackConfig, 5);
RadTextBox_ModpackConfig.Location = new Point(98, 33);
RadTextBox_ModpackConfig.Name = "RadTextBox_ModpackConfig";
RadTextBox_ModpackConfig.NullText = "https://...";
RadTextBox_ModpackConfig.Size = new Size(321, 24);
RadTextBox_ModpackConfig.TabIndex = 3;
RadTextBox_ModpackConfig.TextChanged += RadTextBox_ModpackUrl_TextInserted;
//
// RadButton_Install
//
RadButton_Install.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(RadButton_Install, 2);
RadButton_Install.ImageAlignment = ContentAlignment.MiddleRight;
RadButton_Install.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_Install, radMenuItem_Repair });
RadButton_Install.Location = new Point(325, 121);
RadButton_Install.Name = "RadButton_Install";
RadButton_Install.Size = new Size(94, 24);
RadButton_Install.TabIndex = 0;
RadButton_Install.Text = "Install";
RadButton_Install.TextAlignment = ContentAlignment.MiddleLeft;
RadButton_Install.TextImageRelation = TextImageRelation.ImageBeforeText;
//
// radMenuItem_Install
//
radMenuItem_Install.Name = "radMenuItem_Install";
radMenuItem_Install.Text = "Install";
radMenuItem_Install.Click += RadMenuItem_Install_Click;
//
// radMenuItem_Repair
//
radMenuItem_Repair.Name = "radMenuItem_Repair";
radMenuItem_Repair.Text = "Repair";
radMenuItem_Repair.Click += RadMenuItem_Repair_Click;
//
// RadButton_CheckForUpdates
//
RadButton_CheckForUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(RadButton_CheckForUpdates, 3);
RadButton_CheckForUpdates.ImageAlignment = ContentAlignment.MiddleRight;
RadButton_CheckForUpdates.Location = new Point(98, 121);
RadButton_CheckForUpdates.Name = "RadButton_CheckForUpdates";
RadButton_CheckForUpdates.Size = new Size(221, 24);
RadButton_CheckForUpdates.TabIndex = 100;
RadButton_CheckForUpdates.Text = "Check for Updates";
RadButton_CheckForUpdates.TextAlignment = ContentAlignment.MiddleLeft;
RadButton_CheckForUpdates.TextImageRelation = TextImageRelation.ImageBeforeText;
RadButton_CheckForUpdates.Click += ButtonX_CheckForUpdates_Click;
//
// RadButton_SearchMinecraftProfileFolder
//
RadButton_SearchMinecraftProfileFolder.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(RadButton_SearchMinecraftProfileFolder, 2);
RadButton_SearchMinecraftProfileFolder.ImageAlignment = ContentAlignment.MiddleRight;
RadButton_SearchMinecraftProfileFolder.Location = new Point(325, 3);
RadButton_SearchMinecraftProfileFolder.Name = "RadButton_SearchMinecraftProfileFolder";
RadButton_SearchMinecraftProfileFolder.Size = new Size(94, 24);
RadButton_SearchMinecraftProfileFolder.TabIndex = 2;
RadButton_SearchMinecraftProfileFolder.Text = "Search";
RadButton_SearchMinecraftProfileFolder.TextAlignment = ContentAlignment.MiddleLeft;
RadButton_SearchMinecraftProfileFolder.TextImageRelation = TextImageRelation.ImageBeforeText;
RadButton_SearchMinecraftProfileFolder.Click += ButtonX_SearchMinecraftProfile_Click;
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutPanel1.ColumnCount = 6;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
tableLayoutPanel1.Controls.Add(RadLabel_MinecraftProfile, 0, 0);
tableLayoutPanel1.Controls.Add(RadLabel_ModpackUrl, 0, 1);
tableLayoutPanel1.Controls.Add(RadTextBox_MinecraftProfileFolder, 1, 0);
tableLayoutPanel1.Controls.Add(RadTextBox_ModpackConfig, 1, 1);
tableLayoutPanel1.Controls.Add(RadLabel_Status, 1, 3);
tableLayoutPanel1.Controls.Add(RadLabel_StatusDesc, 0, 3);
tableLayoutPanel1.Controls.Add(RadButton_Install, 4, 4);
tableLayoutPanel1.Controls.Add(radLabel_InstallationKey, 0, 2);
tableLayoutPanel1.Controls.Add(radTextBox_InstallKey, 1, 2);
tableLayoutPanel1.Controls.Add(RadButton_CheckForUpdates, 1, 4);
tableLayoutPanel1.Controls.Add(RadButton_SearchMinecraftProfileFolder, 4, 0);
tableLayoutPanel1.Dock = DockStyle.Fill;
tableLayoutPanel1.Location = new Point(0, 0);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 5;
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.Size = new Size(422, 151);
tableLayoutPanel1.TabIndex = 7;
//
// RadLabel_Status
//
RadLabel_Status.Anchor = AnchorStyles.Left;
tableLayoutPanel1.SetColumnSpan(RadLabel_Status, 5);
RadLabel_Status.Location = new Point(98, 95);
RadLabel_Status.Name = "RadLabel_Status";
RadLabel_Status.Size = new Size(11, 18);
RadLabel_Status.TabIndex = 3;
RadLabel_Status.Text = "-";
RadLabel_Status.TextImageRelation = TextImageRelation.ImageBeforeText;
//
// RadLabel_StatusDesc
//
RadLabel_StatusDesc.Anchor = AnchorStyles.Left;
RadLabel_StatusDesc.Location = new Point(3, 93);
RadLabel_StatusDesc.Name = "RadLabel_StatusDesc";
RadLabel_StatusDesc.Size = new Size(46, 22);
RadLabel_StatusDesc.TabIndex = 2;
RadLabel_StatusDesc.Text = "Status";
//
// radLabel_InstallationKey
//
radLabel_InstallationKey.Anchor = AnchorStyles.Left;
radLabel_InstallationKey.Location = new Point(3, 66);
radLabel_InstallationKey.Name = "radLabel_InstallationKey";
radLabel_InstallationKey.Size = new Size(81, 18);
radLabel_InstallationKey.TabIndex = 12;
radLabel_InstallationKey.Text = "Installation key";
radLabel_InstallationKey.Visible = false;
//
// radTextBox_InstallKey
//
radTextBox_InstallKey.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel1.SetColumnSpan(radTextBox_InstallKey, 5);
radTextBox_InstallKey.Location = new Point(98, 63);
radTextBox_InstallKey.Name = "radTextBox_InstallKey";
radTextBox_InstallKey.NullText = "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE";
radTextBox_InstallKey.Size = new Size(321, 24);
radTextBox_InstallKey.TabIndex = 4;
radTextBox_InstallKey.Visible = false;
radTextBox_InstallKey.TextChanged += RadTextBox_InstallationKey_TextInserted;
//
// MainForm
//
AutoScaleBaseSize = new Size(7, 15);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
ClientSize = new Size(422, 151);
Controls.Add(tableLayoutPanel1);
Icon = (Icon)resources.GetObject("$this.Icon");
MaximizeBox = false;
MinimumSize = new Size(430, 0);
Name = "MainForm";
StartPosition = FormStartPosition.CenterScreen;
Text = "Minecraft Modpack Updater";
FormClosing += Form1_FormClosing;
Load += Form1_Load;
Shown += Form1_Shown;
((System.ComponentModel.ISupportInitialize)RadLabel_MinecraftProfile).EndInit();
((System.ComponentModel.ISupportInitialize)RadLabel_ModpackUrl).EndInit();
((System.ComponentModel.ISupportInitialize)RadTextBox_MinecraftProfileFolder).EndInit();
((System.ComponentModel.ISupportInitialize)RadTextBox_ModpackConfig).EndInit();
((System.ComponentModel.ISupportInitialize)RadButton_Install).EndInit();
((System.ComponentModel.ISupportInitialize)RadButton_CheckForUpdates).EndInit();
((System.ComponentModel.ISupportInitialize)RadButton_SearchMinecraftProfileFolder).EndInit();
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)RadLabel_Status).EndInit();
((System.ComponentModel.ISupportInitialize)RadLabel_StatusDesc).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel_InstallationKey).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_InstallKey).EndInit();
((System.ComponentModel.ISupportInitialize)this).EndInit();
ResumeLayout(false);
PerformLayout();
}
internal Telerik.WinControls.UI.RadLabel RadLabel_MinecraftProfile;
internal Telerik.WinControls.UI.RadLabel RadLabel_ModpackUrl;
internal Telerik.WinControls.UI.RadTextBoxControl RadTextBox_MinecraftProfileFolder;
internal Telerik.WinControls.UI.RadTextBoxControl RadTextBox_ModpackConfig;
internal Telerik.WinControls.UI.RadSplitButton RadButton_Install;
internal Telerik.WinControls.UI.RadButton RadButton_CheckForUpdates;
internal Telerik.WinControls.UI.RadButton RadButton_SearchMinecraftProfileFolder;
private TableLayoutPanel tableLayoutPanel1;
internal Telerik.WinControls.UI.RadLabel radLabel_InstallationKey;
internal Telerik.WinControls.UI.RadTextBoxControl radTextBox_InstallKey;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Repair;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Install;
internal Telerik.WinControls.UI.RadLabel RadLabel_Status;
internal Telerik.WinControls.UI.RadLabel RadLabel_StatusDesc;
}
}

View File

@@ -0,0 +1,328 @@
using ModpackUpdater.Manager;
using ModpackUpdater.My.Resources;
using Pilz.Extensions;
using Pilz.UI.Symbols;
using Pilz.UI.WinForms.Extensions;
using System.Diagnostics;
using System.Reflection;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Client.Gui;
public partial class MainForm
{
private readonly UpdateCheckOptions updateOptions = new();
private ModpackInfo modpackInfo = new();
private ModpackConfig updateConfig = new();
private ModpackFeatures features;
private UpdateCheckResult lastUpdateCheckResult;
private bool currentUpdating;
private bool loadingData;
private int curOptionsRow = 3;
public MainForm()
{
InitializeComponent();
Text = $"{Text} (v{Assembly.GetExecutingAssembly().GetAppVersion()})";
RadButton_Install.DefaultItem = radMenuItem_Install;
RadButton_CheckForUpdates.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small);
RadButton_SearchMinecraftProfileFolder.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.opened_folder, SymbolSize.Small);
RadButton_Install.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small);
radMenuItem_Install.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small);
radMenuItem_Repair.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.wrench, SymbolSize.Small);
LoadProfileToUi();
}
#region Features
private void SetStatus(string statusText, RadSvgImage image)
{
RadLabel_Status.Text = statusText;
RadLabel_Status.SvgImage = image;
}
private void ClearStatus()
{
RadLabel_Status.Text = "-";
RadLabel_Status.SvgImage = null;
}
private void LoadProfileToUi()
{
loadingData = true;
tableLayoutPanel1.SuspendLayout();
RadTextBox_MinecraftProfileFolder.Text = modpackInfo?.LocaLPath ?? AppConfig.Instance.LastMinecraftProfilePath ?? RadTextBox_MinecraftProfileFolder.Text;
RadTextBox_ModpackConfig.Text = modpackInfo?.ConfigUrl ?? RadTextBox_ModpackConfig.Text;
radTextBox_InstallKey.Text = modpackInfo?.ExtrasKey ?? radTextBox_InstallKey.Text;
tableLayoutPanel1.ResumeLayout();
loadingData = false;
}
private void LoadOptionsToUi()
{
//foreach (var set in )
//{
// // ...
//}
}
private async void CheckStatusAndUpdate(bool loadProfileToUi)
{
if (CheckStatus(loadProfileToUi))
await ExecuteUpdate(false, false);
}
private bool CheckStatus(bool loadProfileToUi)
{
try
{
modpackInfo = ModpackInfo.TryLoad(RadTextBox_MinecraftProfileFolder.Text.Trim());
}
catch
{
}
if (loadProfileToUi)
LoadProfileToUi();
try
{
updateConfig = ModpackConfig.LoadFromUrl(RadTextBox_ModpackConfig.Text);
}
catch (Exception)
{
}
if (modpackInfo != null)
features = new(updateConfig);
radTextBox_InstallKey.Visible = radLabel_InstallationKey.Visible = !string.IsNullOrWhiteSpace(updateConfig.UnleashApiUrl);
if (modpackInfo == null || string.IsNullOrWhiteSpace(RadTextBox_MinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
{
SetStatus(LangRes.StatusText_MinecraftProfileWarning, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
RadButton_CheckForUpdates.Enabled = false;
RadButton_Install.Enabled = false;
return false;
}
else if (updateConfig == null || string.IsNullOrWhiteSpace(RadTextBox_ModpackConfig.Text))
{
SetStatus(LangRes.StatusText_ConfigIncompleteOrNotLoaded, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
RadButton_CheckForUpdates.Enabled = false;
RadButton_Install.Enabled = false;
return false;
}
else if (updateConfig.Maintenance && !updateOptions.IgnoreMaintenance)
{
SetStatus(LangRes.StatusText_Maintenance, AppGlobals.Symbols.GetSvgImage(AppSymbols.services, SymbolSize.Small));
RadButton_CheckForUpdates.Enabled = false;
RadButton_Install.Enabled = false;
return false;
}
LoadOptionsToUi();
RadButton_CheckForUpdates.Enabled = true;
RadButton_Install.Enabled = true;
return true;
}
private async Task ExecuteUpdate(bool doInstall, bool repair)
{
// Ensure set extras key
modpackInfo.ExtrasKey = radTextBox_InstallKey.Text.Trim();
var updater = new ModpackInstaller(updateConfig, modpackInfo);
updater.InstallProgessUpdated += Update_InstallProgessUpdated;
updater.CheckingProgressUpdated += Updated_CheckingProgresssUpdated;
void error()
{
SetStatus(LangRes.StatusText_ErrorWhileUpdateCheckOrUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.close, SymbolSize.Small));
currentUpdating = false;
}
void installing()
{
SetStatus(LangRes.StatusText_Installing, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
currentUpdating = true;
}
void updatesAvailable()
{
SetStatus(LangRes.StatusText_UpdateAvailable, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
}
void everythingOk()
{
SetStatus(LangRes.StatusTest_EverythingOk, AppGlobals.Symbols.GetSvgImage(AppSymbols.done, SymbolSize.Small));
currentUpdating = false;
}
// Check only if not pressed "install", not really needed otherwise.
if (lastUpdateCheckResult is null || !doInstall || repair)
{
SetStatus(LangRes.StatusText_CheckingForUpdates, AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
// Check for extras once again
updateOptions.IncludeExtras = features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(modpackInfo));
// Force re-install on repair
updateOptions.IgnoreInstalledVersion = repair;
try
{
lastUpdateCheckResult = await updater.Check(updateOptions);
}
catch (Exception)
{
error();
if (Debugger.IsAttached)
throw;
}
finally
{
}
}
// Error while update check
if (lastUpdateCheckResult is null || lastUpdateCheckResult.HasError)
{
error();
return;
}
// Load options
// lastUpdateCheckResult.OptionsAvailable...
// lastUpdateCheckResult.OptionsEnabled...
// No updates available
if (!lastUpdateCheckResult.HasUpdates)
{
everythingOk();
return;
}
// Updates available (but don't install)
if (!doInstall)
{
updatesAvailable();
return;
}
// Install updates
installing();
currentUpdating = true;
try
{
// Install
if (await updater.Install(lastUpdateCheckResult) == false)
{
error();
return;
}
// Success
lastUpdateCheckResult = null; // Reset last update check, a new one would be needed now.
everythingOk();
}
catch (Exception)
{
// Error
error();
if (Debugger.IsAttached)
throw;
}
}
private void Updated_CheckingProgresssUpdated(int toCheck, int processed)
{
SetStatus(Math.Round(processed / (double)toCheck * 100d, 1) + "%", AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small));
}
private void Update_InstallProgessUpdated(UpdateCheckResult result, int processedSyncs)
{
int actionCount = result.Actions.Count;
SetStatus(Math.Round(processedSyncs / (double)actionCount * 100d, 1) + "%", AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
}
#endregion
#region Gui
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
AppConfig.Instance.LastMinecraftProfilePath = RadTextBox_MinecraftProfileFolder.Text.Trim();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private async void Form1_Shown(object sender, EventArgs e)
{
var updater = new AppUpdater(Program.UPDATE_URL);
if (await updater.Check() && RadMessageBox.Show(LangRes.MsgBox_UpdateAvailable, LangRes.MsgBox_UpdateAvailable_Title, MessageBoxButtons.YesNo, RadMessageIcon.Info).IsYes())
{
SetStatus(LangRes.StatusText_InstallingAppUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.software_installer, SymbolSize.Small));
Enabled = false;
await updater.Install();
Application.Restart();
return;
}
CheckStatusAndUpdate(true);
}
private void RadTextBox_MinecraftFolder_TextInserted(object o, EventArgs args)
{
if (!loadingData)
CheckStatusAndUpdate(true);
}
private void RadTextBox_ModpackUrl_TextInserted(object o, EventArgs args)
{
if (!loadingData)
CheckStatusAndUpdate(false);
}
private void RadTextBox_InstallationKey_TextInserted(object o, EventArgs args)
{
if (!loadingData)
CheckStatusAndUpdate(false);
}
private void ButtonX_SearchMinecraftProfile_Click(object sender, EventArgs e)
{
var ofd = new RadOpenFolderDialog();
if (ofd.ShowDialog(this) == DialogResult.OK)
RadTextBox_MinecraftProfileFolder.Text = ofd.FileName;
}
private async void ButtonX_CheckForUpdates_Click(object sender, EventArgs e)
{
ClearStatus();
await ExecuteUpdate(false, false);
}
private async void RadMenuItem_Install_Click(object sender, EventArgs e)
{
if (!currentUpdating)
{
ClearStatus();
await ExecuteUpdate(true, false);
}
}
private async void RadMenuItem_Repair_Click(object sender, EventArgs e)
{
if (!currentUpdating)
{
ClearStatus();
await ExecuteUpdate(true, true);
}
}
#endregion
}

View File

@@ -0,0 +1,64 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<ApplicationIcon>minecraft modpack updater.ico</ApplicationIcon>
<AssemblyName>Minecraft Modpack Updater</AssemblyName>
<ImplicitUsings>true</ImplicitUsings>
<UseWindowsForms>true</UseWindowsForms>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Version.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="FiledialogFilters.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FiledialogFilters.resx</DependentUpon>
</Compile>
<Compile Update="LangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>LangRes.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="FiledialogFilters.resx">
<Generator>ResXFileCodeGenerator</Generator>
<CustomToolNamespace>ModpackUpdater.My.Resources</CustomToolNamespace>
<LastGenOutput>FiledialogFilters.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="LangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<CustomToolNamespace>ModpackUpdater.My.Resources</CustomToolNamespace>
<LastGenOutput>LangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pilz.Configuration" Version="3.2.6" />
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
<PackageReference Include="Pilz.IO" Version="2.1.0" />
<PackageReference Include="Pilz.UI" Version="3.0.0" />
<PackageReference Include="Pilz.UI.WinForms" Version="2.6.2" />
<PackageReference Include="Pilz.UI.WinForms.Telerik" Version="2.13.3" />
<PackageReference Include="Pilz.UI.WinForms.Telerik.Symbols" Version="1.2.1" />
<PackageReference Include="UI.for.WinForms.Common" Version="2025.2.612-preview" />
<PackageReference Include="UI.for.WinForms.Themes" Version="2025.2.612-preview" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModpackUpdater.Apps.AppUpdates\ModpackUpdater.Apps.AppUpdates.csproj" />
<ProjectReference Include="..\ModpackUpdater.Apps\ModpackUpdater.Apps.csproj" />
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,64 @@
using Castle.Core.Logging;
using Newtonsoft.Json;
using Pilz.Configuration;
namespace ModpackUpdater.Apps.Client.Gui;
public static class Program
{
public const string UPDATE_URL = "https://git.pilzinsel64.de/litw-refined/minecraft-modpack-updater/-/snippets/3/raw/main/updates.json";
private static readonly SettingsManager settingsManager;
private static readonly ILogger log = new ConsoleLogger();
public static ISettings Settings => settingsManager.Instance;
public static ILogger Log => log;
static Program()
{
settingsManager = new(GetSettingsPath(2), true);
MigrateLegacySettings(GetSettingsPath(null));
}
[STAThread]
internal static void Main(string[] args)
{
ApplicationConfiguration.Initialize();
AppGlobals.Initialize();
Application.Run(new MainForm());
}
private static string GetSettingsPath(int? settingsVersion = 3)
{
const string AppDataDirectoryName = "MinecraftModpackUpdater";
var fileNamePostfix = settingsVersion == null ? string.Empty : $"V{settingsVersion}";
var SettingsFileName = $"Settings{fileNamePostfix}.json";
var settingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppDataDirectoryName);
Directory.CreateDirectory(settingsPath);
settingsPath = Path.Combine(settingsPath, SettingsFileName);
return settingsPath;
}
private static void MigrateLegacySettings(string settingsPath)
{
// Try load legacy config file
if (!File.Exists(settingsPath) || JsonConvert.DeserializeObject<AppConfig>(File.ReadAllText(settingsPath)) is not AppConfig legacyConfig)
return;
// Migrate
var newConfig = Settings.Get<AppConfig>();
newConfig.LastMinecraftProfilePath = legacyConfig.LastMinecraftProfilePath;
if (ModpackInfo.TryLoad(legacyConfig.LastMinecraftProfilePath) is ModpackInfo info)
#pragma warning disable CS0612 // Typ oder Element ist veraltet
info.ConfigUrl = legacyConfig.ConfigFilePath;
// Ensure save settings
settingsManager.Save();
// Delete legacy config file
File.Delete(settingsPath);
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\publish\ui\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="480" height="480" viewBox="0 0 480 480" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<clipPath id="clip_path_1">
<rect width="480" height="480" />
</clipPath>
</defs>
<g clip-path="url(#clip_path_1)">
<path d="M360 40L180 40L140 0C140 0 40 0 40 0C17.91 0 0 17.91 0 40C0 40 0 120 0 120L400 120C400 120 400 80 400 80C400 57.91 382.09 40 360 40C360 40 360 40 360 40Z" fill="#FFA000" transform="translate(20 100)" />
<g transform="translate(53 -7)">
<path d="M160.042 63.3334L0 7.91667L13.9167 213.75L160.042 300.833L278.333 205.833L292.25 0L160.042 63.3334Z" fill="#5D4037" fill-rule="evenodd" transform="translate(20.875 63.333)" />
<path d="M0 0L13.9167 205.834L160.042 292.917L160.042 55.4167L0 0Z" fill="#8D6E63" fill-rule="evenodd" transform="translate(20.875 71.25)" />
<path d="M13.9167 112.084L13.9167 79.1667L27.8333 72.2554L27.8333 95L41.75 87.0833L41.75 118.75L62.625 109.028L62.625 55.4167L76.5417 48.6954L76.5417 87.0833L90.4583 80.5679L90.4583 63.3333L104.375 55.4167L104.375 35.3637L118.292 28.6979L118.292 47.5L129.425 41.1667L132.208 0L0 63.3333L0 118.75L13.9167 112.084Z" fill="#43A047" fill-rule="evenodd" transform="translate(180.917 63.333)" />
<path d="M0 47.5L139.167 0L292.25 39.5833L160.042 102.917L0 47.5Z" fill="#B2FF59" fill-rule="evenodd" transform="translate(20.875 23.75)" />
<path d="M0 0L2.78333 40.6442L13.9167 44.3888L13.9167 34.9363L27.8333 39.5833L27.8333 65.0513L48.7083 72.2792L48.7083 34.6196L62.625 39.5833L62.625 77.1004L76.5417 81.9217L76.5417 58.9713L90.4583 63.7925L90.4583 86.743L104.375 91.5563L104.375 82.1671L118.292 87.0834L118.292 74.6067L132.208 79.1667L132.208 101.199L160.042 110.833L160.042 55.4167L0 0Z" fill="#66BB6A" fill-rule="evenodd" transform="translate(20.875 71.25)" />
</g>
<path d="M360 0C360 0 40 0 40 0C17.91 0 0 15.1595 0 33.8571C0 33.8571 0 203.143 0 203.143C0 221.84 17.91 237 40 237C40 237 360 237 360 237C382.09 237 400 221.84 400 203.143C400 203.143 400 33.8571 400 33.8571C400 15.1595 382.09 0 360 0C360 0 360 0 360 0Z" fill="#FFCA28" transform="translate(20 183)" />
<path d="M70 80L0 0L140 0L70 80Z" fill="#1565C0" transform="translate(150 380)" />
<path d="M0 0L60 0L60 111.25L0 111.25L0 0Z" fill="#1565C0" transform="translate(190 280)" />
<path d="M30 15C30 23.28 23.29 30 15 30C6.71002 30 0 23.28 0 15C0 6.72 6.71002 0 15 0C23.29 0 30 6.72 30 15C30 15 30 15 30 15Z" fill="#4A148C" transform="translate(430 60)" />
<path d="M125 100C72.62 100 30 57.38 30 5C30 5 30 0 30 0L0 0L0 10C0 10 0.25 10 0.25 10C2.84 74.93 55.08 127.16 120 129.75C120 129.75 120 130 120 130L130 130L130 100L125 100C125 100 125 100 125 100Z" fill="#9C27B0" transform="translate(330 60)" />
<path d="M75 50C50.19 50 30 29.81 30 5C30 5 30 0 30 0L0 0L0 10C0 10 0.25 10 0.25 10C2.73004 47.36 32.63 77.27 70 79.75C70 79.75 70 80 70 80L80 80L80 50L75 50C75 50 75 50 75 50Z" fill="#7B1FA2" transform="translate(380 60)" />
<path d="M175 150C95.05 150 30 84.95 30 5C30 5 30 0 30 0L0 0L0 10C0 10 0.25 10 0.25 10C2.88998 102.5 77.51 177.11 170 179.75C170 179.75 170 180 170 180L180 180L180 150L175 150C175 150 175 150 175 150Z" fill="#BA68C8" transform="translate(280 60)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>mmu-cli</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Version.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
<PackageReference Include="Pilz.IO" Version="2.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModpackUpdater.Apps.AppUpdates\ModpackUpdater.Apps.AppUpdates.csproj" />
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,41 @@
using Mono.Options;
namespace ModpackUpdater.Apps.Client;
internal class Options
{
private readonly List<string> additionals = [];
private readonly OptionSet options;
public IReadOnlyList<string> Additionals => additionals;
public bool Help { get; private set; }
public bool Silent { get; private set; }
public string? RefTag { get; private set; }
public string? Version { get; private set; }
public UpdateCheckOptionsAdv UpdateOptions { get; } = new();
public Options(string[] args)
{
options = new OptionSet
{
{ "silent", "Do not output anything.", s => Silent = true },
{ "h|help", "Writes the help text as output.", h => Help = true },
{ "p|profile=", "Sets the minecraft profile folder.", p => UpdateOptions.ProfileFolder = p },
{ "c|config=", "Sets the modpack update info url.", c => UpdateOptions.ModpackConfig = c },
{ "s|side=", "Sets the installation side.\nDefault side is Client.\nAvailable: Client, Server", s => UpdateOptions.Side = Enum.Parse<Side>(s)},
{ "u|uai", "Disallow an update directly after install. This only has effect if there is no existing installation.", uai => UpdateOptions.AllowUpdaterAfterInstall = false},
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = true},
{ "i|nonpublic", "Include non public (currently hidden) updates.", i => UpdateOptions.IncludeNonPublic = true},
{ "k|key=", "An key for retriving extra files on updates.", k => UpdateOptions.ExtrasKey = k},
{ "r|reftag=", "Force uses a specific reference tag, if supported.", r => RefTag = r},
{ "v|version=", "Force uses a specific version, if supported.", v => Version = v},
};
additionals.AddRange(options.Parse(args));
}
public void DrawHelp()
{
options.WriteOptionDescriptions(Console.Out);
}
}

View File

@@ -0,0 +1,60 @@
using Castle.Core.Logging;
using ModpackUpdater.Manager;
namespace ModpackUpdater.Apps.Client;
public static class Program
{
private static readonly ILogger log = new ConsoleLogger();
public static ILogger Log => log;
internal static Options Options { get; private set; } = null!;
[STAThread]
internal static void Main(string[] args)
{
Options = new Options(args);
if (Options.Help)
Options.DrawHelp();
else
InstallWithoutGui(Options.UpdateOptions, Options.Silent);
}
private static void InstallWithoutGui(UpdateCheckOptionsAdv updateOptions, bool silent)
{
var info = ModpackInfo.TryLoad(updateOptions.ProfileFolder);
var config = ModpackConfig.LoadFromUrl(CheckModpackConfigUrl(updateOptions.ModpackConfig!, info));
var features = new ModpackFeatures(config);
// Check features
if (!string.IsNullOrWhiteSpace(updateOptions.ExtrasKey))
info.ExtrasKey = updateOptions.ExtrasKey;
if (!string.IsNullOrWhiteSpace(info.ExtrasKey))
updateOptions.IncludeExtras = features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(info));
// Check for update
var installer = new ModpackInstaller(config, info)
{
OverwriteRefTag = Options.RefTag,
OverwriteVersion = Options.Version,
Log = Log,
};
var result = installer.Check(updateOptions).Result;
if (result.HasUpdates)
{
var success = installer.Install(result).Result;
if (!silent)
Log.Info($"Installation {(success ?? false ? "completed successfully" : "failed")}!");
}
else if (!silent)
Log.Info("No updates available");
}
private static string CheckModpackConfigUrl(string configUrl, ModpackInfo info)
{
if (string.IsNullOrWhiteSpace(configUrl) && !string.IsNullOrWhiteSpace(info.ConfigUrl))
return info.ConfigUrl;
return configUrl;
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\publish\cli\linux-arm64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\publish\cli\linux-x64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\publish\cli\windows\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,10 @@
using ModpackUpdater.Manager;
namespace ModpackUpdater.Apps.Client;
public class UpdateCheckOptionsAdv : UpdateCheckOptions
{
public string? ProfileFolder { get; set; }
public string? ModpackConfig { get; set; }
public string? ExtrasKey { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace ModpackUpdater.Apps.Manager.Api.Model;
public interface IMainApi
{
IWorkspace? CurWorkspace { get; }
IActionSetInfos? CurActionSet { get; }
Form MainWindow { get; }
void UpdateItem(InstallAction action);
void UpdateItem(IActionSetInfos actionSetInfos);
}

View File

@@ -0,0 +1,19 @@
using System.Diagnostics.CodeAnalysis;
namespace ModpackUpdater.Apps.Manager.Api.Model;
public interface IWorkspace
{
WorkspaceConfig Config { get; }
ModpackConfig? ModpackConfig { get; }
InstallInfos? InstallInfos { get; }
UpdateInfos? UpdateInfos { get; }
[MemberNotNullWhen(true, nameof(InstallInfos), nameof(UpdateInfos))]
Task<bool> Load();
Task<bool> Save();
}

View File

@@ -0,0 +1,14 @@
using Newtonsoft.Json;
namespace ModpackUpdater.Apps.Manager.Api.Model;
public abstract class WorkspaceConfig
{
[JsonProperty]
public string ProviderId { get; internal set; } = "origin.unknown";
[JsonIgnore]
public abstract string DisplayText { get; }
public string? ModpackConfigUrl { get; set; }
}

View File

@@ -0,0 +1,34 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using Pilz.Plugins.Advanced;
namespace ModpackUpdater.Apps.Manager.Api.Plugins.Features;
public abstract class WorkspaceFeature(string identifier, string name) : PluginFeature(FeatureTypes.Workspace, identifier, name)
{
public virtual bool CanConfigure(IWorkspace workspace)
{
return workspace?.Config == null || workspace.Config.ProviderId == Identifier;
}
public virtual bool Configure(ref IWorkspace? workspace)
{
OnConfigure(ref workspace);
if (workspace?.Config is null)
return false;
workspace.Config.ProviderId = Identifier;
return true;
}
public virtual IWorkspace CreateFromConfig(WorkspaceConfig config)
{
OnCreate(out var workspace, config);
return workspace;
}
protected abstract void OnCreate(out IWorkspace workspace, WorkspaceConfig config);
protected abstract bool OnConfigure(ref IWorkspace? workspace);
}

View File

@@ -0,0 +1,9 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using Pilz.Plugins.Advanced;
namespace ModpackUpdater.Apps.Manager.Api.Plugins.Params;
public class MainApiParameters(IMainApi api) : PluginFunctionParameter
{
public IMainApi Api { get; } = api;
}

View File

@@ -0,0 +1,11 @@
namespace ModpackUpdater.Apps.Manager;
internal static class Extensions
{
public static string? Nullify(this string? @this)
{
if (string.IsNullOrEmpty(@this))
return null;
return @this;
}
}

View File

@@ -0,0 +1,8 @@
namespace ModpackUpdater.Apps.Manager;
public static class FeatureTypes
{
public static string Workspace => "workspace";
public static string Tools => "tools";
public static string ActionsContextMenu => "cm.actions";
}

View File

@@ -0,0 +1,31 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using Pilz.Plugins.Advanced;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.CM;
internal class CheckSingleActionHealthyFeature : PluginFunction, IPluginFeatureProvider<CheckSingleActionHealthyFeature>
{
public static CheckSingleActionHealthyFeature Instance { get; } = new();
public CheckSingleActionHealthyFeature() : base(FeatureTypes.ActionsContextMenu, "origin.checksingleactionhearlthy", FeatureNamesLangRes.CheckSingleActionHealthy)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.heart_with_pulse, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p
|| p.Api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView
|| gridView.SelectedRows.FirstOrDefault() is not GridViewRowInfo row
|| row.Tag is not InstallAction)
return null;
SharedFunctions.CheckActionHealthy(p.Api, row);
return null;
}
}

View File

@@ -0,0 +1,30 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using Pilz.Plugins.Advanced;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.CM;
internal class ClearDirectLinkFeature : PluginFunction, IPluginFeatureProvider<ClearDirectLinkFeature>
{
public static ClearDirectLinkFeature Instance { get; } = new();
public ClearDirectLinkFeature() : base(FeatureTypes.ActionsContextMenu, "origin.cleardirectlink", FeatureNamesLangRes.ClearDirectLinkFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.broom, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p
|| p.Api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView
|| gridView.SelectedRows.FirstOrDefault()?.Tag is not InstallAction selectedAction)
return null;
SharedFunctions.ClearDirectLinks(p.Api, selectedAction);
return null;
}
}

View File

@@ -0,0 +1,31 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using Pilz.Plugins.Advanced;
using Pilz.UI.Symbols;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.CM;
internal class UpdateCollectorFeature : PluginFunction, IPluginFeatureProvider<UpdateCollectorFeature>
{
public static UpdateCollectorFeature Instance { get; } = new();
public UpdateCollectorFeature() : base(FeatureTypes.ActionsContextMenu, "origin.updatecollector", FeatureNamesLangRes.UpdateCollectorFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.search, SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p
|| p.Api.CurWorkspace?.UpdateInfos is null
|| p.Api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView
|| gridView.SelectedRows.FirstOrDefault()?.Tag is not InstallAction selectedAction)
return null;
SharedFunctions.CollectUpdates(p.Api, selectedAction);
return null;
}
}

View File

@@ -0,0 +1,30 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using Pilz.Plugins.Advanced;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.CM;
internal class UpdateDirectLinkFeature : PluginFunction, IPluginFeatureProvider<UpdateDirectLinkFeature>
{
public static UpdateDirectLinkFeature Instance { get; } = new();
public UpdateDirectLinkFeature() : base(FeatureTypes.ActionsContextMenu, "origin.updatedirectlink", FeatureNamesLangRes.UpdateDirectLinkFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.renew, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p
|| p.Api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView
|| gridView.SelectedRows.FirstOrDefault()?.Tag is not InstallAction selectedAction)
return null;
SharedFunctions.FindNewDirectLinks(p.Api, selectedAction);
return null;
}
}

View File

@@ -0,0 +1,309 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using ModpackUpdater.Manager;
using OfficeOpenXml;
using Pilz.UI.WinForms.Extensions;
using System.Text;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features;
internal static class SharedFunctions
{
public static bool CheckActionHealthy(IMainApi api, params GridViewRowInfo[] selectedRows)
{
if (api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView
|| mainForm.Controls.Find("radWaitingBar_Actions", true).FirstOrDefault() is not RadWaitingBar rwb)
return false;
rwb.StartWaiting();
rwb.ShowText = true;
var rowsCount = selectedRows.Length;
rwb.Text = "0 / " + rowsCount;
gridView.BeginUpdate();
var failed = false;
var msg = default(string);
var factory = new ModpackFactory();
var rows = new Dictionary<GridViewRowInfo, InstallAction>();
for (var i = 0; i < selectedRows.Length; i++)
{
var row = selectedRows[i];
if (row.Tag is InstallAction action)
{
Task.Run(async () =>
{
try
{
var result = await factory.ResolveSourceUrl(action);
failed = string.IsNullOrWhiteSpace(result);
}
catch (Exception ex)
{
msg = ex.Message;
}
}).Wait();
}
foreach (var c in row.Cells)
{
c.Style.CustomizeFill = true;
c.Style.BackColor = failed ? Color.IndianRed : Color.ForestGreen;
}
rwb.Text = $"{i} / {rowsCount}";
Application.DoEvents();
}
gridView.EndUpdate();
rwb.ShowText = false;
rwb.StopWaiting();
if (rowsCount == 1 && failed && !string.IsNullOrWhiteSpace(msg))
MessageBox.Show(msg);
return true;
}
public static bool CollectUpdates(IMainApi api, params InstallAction[] actions)
{
if (api.CurWorkspace?.UpdateInfos is null)
return false;
// Collect updates
var ucDialog = new UpdatesCollectorUi(api.CurWorkspace, actions);
if (!ucDialog.ShowDialog(api.MainWindow).IsOk() || ucDialog.CurrentUpdates is null)
return false;
// Collect versions with changes
var updates = new List<UpdatesCollectorUi.ModUpdateInfo>();
foreach (var update in ucDialog.CurrentUpdates.List)
{
if (update.Origin.SourceTag != update.AvailableVersions[update.NewVersion].Value)
updates.Add(update);
}
// Path install actions
foreach (var update in updates)
{
update.Origin.SourceTag = update.AvailableVersions[update.NewVersion].Value;
api.UpdateItem(update.Origin);
}
// Create update actions
var updateSet = new UpdateInfo();
foreach (var update in updates)
{
updateSet.Actions.Add(new()
{
InheritFrom = update.Origin.Id,
});
}
api.CurWorkspace.UpdateInfos.Updates.Insert(0, updateSet);
api.UpdateItem(updateSet);
return true;
}
public static void FindNewDirectLinks(IMainApi api, params InstallAction[] actions)
{
var mainForm = api.MainWindow as MainForm;
var gridView = mainForm?.Controls.Find("radGridView_Actions", true).FirstOrDefault() as RadGridView;
var rwb = mainForm?.Controls.Find("radWaitingBar_Actions", true).FirstOrDefault() as RadWaitingBar;
var factory = new ModpackFactory();
rwb?.StartWaiting();
gridView?.BeginUpdate();
foreach (var action in actions)
{
if (action.SourceType != SourceType.DirectLink)
{
try
{
Task.Run(async () =>
{
action.SourceUrl = await factory.ResolveSourceUrl(action);
}).Wait();
}
catch (Exception)
{
// Fail silently
}
api.UpdateItem(action);
}
}
gridView?.EndUpdate();
rwb?.StopWaiting();
}
public static void ClearDirectLinks(IMainApi api, params InstallAction[] actions)
{
var mainForm = api.MainWindow as MainForm;
var gridView = mainForm?.Controls.Find("radGridView_Actions", true).FirstOrDefault() as RadGridView;
var rwb = mainForm?.Controls.Find("radWaitingBar_Actions", true).FirstOrDefault() as RadWaitingBar;
rwb?.StartWaiting();
gridView?.BeginUpdate();
foreach (var action in actions)
{
if (action.SourceType != SourceType.DirectLink)
{
action.SourceUrl = null;
api.UpdateItem(action);
}
}
gridView?.EndUpdate();
rwb?.StopWaiting();
}
public static string GenerateChangelog(InstallInfos installInfos, UpdateInfo updateInfos)
{
var log = new StringBuilder();
foreach (var action in updateInfos.Actions.OrderBy(n => n.Type))
{
// Create copy
var copy = new UpdateAction();
ModpackInstaller.DuplicateTo(action, copy);
// Resolve inherit
if (!string.IsNullOrWhiteSpace(copy.InheritFrom))
ModpackInstaller.ResolveInherit(copy, installInfos);
if (string.IsNullOrWhiteSpace(copy.Name) || copy.Type != UpdateActionType.Update)
continue;
// Append bullet
log.Append('-');
// Append action indicator
log.Append(' ');
log.Append("⚒️");
// Append name
log.Append(' ');
log.Append("**");
log.Append(copy.Name);
log.Append("**");
// Append new version
if (!string.IsNullOrWhiteSpace(copy.SourceTag))
{
log.Append(' ');
log.Append('`');
log.Append(copy.SourceTag);
log.Append('`');
}
// Append new line
log.AppendLine();
}
return log.ToString().TrimEnd();
}
public static string GenerateModlistAsMarkdown(InstallInfos installInfos)
{
var sb = new StringBuilder();
sb.Append("|" + ActionsListLangRes.Col_Name);
sb.Append("|" + ActionsListLangRes.Col_SrcTag);
sb.Append("|" + ActionsListLangRes.Col_Side);
sb.Append("|" + ActionsListLangRes.Col_SrcType);
sb.Append("|" + ActionsListLangRes.Col_SrcOwner);
sb.Append("|" + ActionsListLangRes.Col_SrcName);
sb.AppendLine("|");
sb.AppendLine("|---|---|---|---|---|---|");
// Rows
foreach (var action in installInfos.Actions.OrderBy(n => n.Name))
{
if (action.IsExtra || action.IsZip || string.IsNullOrWhiteSpace(action.Id) || !action.Id.StartsWith("mod:"))
continue;
if (string.IsNullOrWhiteSpace(action.Website))
sb.Append($"|{action.Name}");
else
sb.Append($"|[{action.Name}]({action.Website})");
if (string.IsNullOrWhiteSpace(action.SourceUrl))
sb.Append($"|{action.SourceTag}");
else
sb.Append($"|[{action.SourceTag}]({action.GetSourceUrl(installInfos.Version)})");
sb.Append($"|{action.Side.ToString()}");
sb.Append($"|{action.SourceType}");
sb.Append($"|{action.SourceOwner}");
sb.Append($"|{action.SourceName}");
sb.AppendLine("|");
}
return sb.ToString().TrimEnd();
}
public static ExcelPackage? GenerateModlistAsExcel(InstallInfos installInfos)
{
var pkg = new ExcelPackage();
var ws = pkg.Workbook.Worksheets.Add(string.Format(GeneralLangRes.Text_ModlistForVersion, installInfos.Version));
var cr = 1;
var cc = 1;
// Header
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_Name;
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_SrcTag;
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_Side;
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_SrcType;
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_SrcOwner;
ws.Cells[cr, cc++].Value = ActionsListLangRes.Col_SrcName;
cr += 1;
cc = 1;
// Rows
foreach (var action in installInfos.Actions.OrderBy(n => n.Name))
{
if (action.IsExtra || action.IsZip || string.IsNullOrWhiteSpace(action.Id) || !action.Id.StartsWith("mod:"))
continue;
var cellName = ws.Cells[cr, cc++];
cellName.Value = action.Name;
if (!string.IsNullOrWhiteSpace(action.Website))
cellName.SetHyperlink(new Uri(action.Website));
var cellTag = ws.Cells[cr, cc++];
cellTag.Value = string.IsNullOrWhiteSpace(action.SourceTag) ? "direct link" : action.SourceTag;
if (!string.IsNullOrWhiteSpace(action.SourceUrl))
cellTag.SetHyperlink(new Uri(action.GetSourceUrl(installInfos.Version)));
ws.Cells[cr, cc++].Value = action.Side.ToString();
ws.Cells[cr, cc++].Value = action.SourceType;
ws.Cells[cr, cc++].Value = action.SourceOwner;
ws.Cells[cr, cc++].Value = action.SourceName;
cr += 1;
cc = 1;
}
// Styling
cc = 1;
ws.Column(cc++).Width = 30;
ws.Column(cc++).Width = 20;
ws.Column(cc++).Width = 10;
ws.Column(cc++).Width = 20;
ws.Column(cc++).Width = 20;
ws.Column(cc++).Width = 30;
var tableDef = ws.Tables.Add(ws.Cells[1, 1, cr - 1, cc - 1], "Table");
tableDef.TableStyle = OfficeOpenXml.Table.TableStyles.Medium16;
tableDef.ShowHeader = true;
return pkg;
}
}

View File

@@ -0,0 +1,29 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using Pilz.Plugins.Advanced;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class CheckAllActionsHealthyFeature : PluginFunction, IPluginFeatureProvider<CheckAllActionsHealthyFeature>
{
public static CheckAllActionsHealthyFeature Instance { get; } = new();
public CheckAllActionsHealthyFeature() : base(FeatureTypes.Tools, "origin.checkallactionshearlthy", FeatureNamesLangRes.CheckAllActionsHealthy)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.heart_with_pulse, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p
|| p.Api.MainWindow is not MainForm mainForm
|| mainForm.Controls.Find("radGridView_Actions", true).FirstOrDefault() is not RadGridView gridView)
return null;
SharedFunctions.CheckActionHealthy(p.Api, [.. gridView.Rows]);
return null;
}
}

View File

@@ -0,0 +1,25 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class ClearDirectLinksFeature : PluginFunction, IPluginFeatureProvider<ClearDirectLinksFeature>
{
public static ClearDirectLinksFeature Instance { get; } = new();
public ClearDirectLinksFeature() : base(FeatureTypes.Tools, "origin.cleardirectlinks", FeatureNamesLangRes.ClearDirectLinksFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.broom, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null)
return null;
SharedFunctions.ClearDirectLinks(p.Api, [.. p.Api.CurWorkspace.InstallInfos.Actions]);
return null;
}
}

View File

@@ -0,0 +1,31 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
using Telerik.WinControls;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class GenerateChangelogFeature : PluginFunction, IPluginFeatureProvider<GenerateChangelogFeature>
{
public static GenerateChangelogFeature Instance { get; } = new();
public GenerateChangelogFeature() : base(FeatureTypes.Tools, "origin.genchangelog", FeatureNamesLangRes.GenerateChangelogFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.time_machine, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null || p.Api.CurActionSet is not UpdateInfo updateInfos)
return null;
var changelog = SharedFunctions.GenerateChangelog(p.Api.CurWorkspace.InstallInfos, updateInfos);
if (!string.IsNullOrWhiteSpace(changelog))
{
Clipboard.SetText(changelog);
RadMessageBox.Show(p.Api.MainWindow, MsgBoxLangRes.ChangelogCopiedToClipboard, MsgBoxLangRes.ChangelogCopiedToClipboard_Title, MessageBoxButtons.OK, RadMessageIcon.Info);
}
return null;
}
}

View File

@@ -0,0 +1,39 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class GenerateModlistAsExcelFeature : PluginFunction, IPluginFeatureProvider<GenerateModlistAsExcelFeature>
{
public static GenerateModlistAsExcelFeature Instance { get; } = new();
public GenerateModlistAsExcelFeature() : base(FeatureTypes.Tools, "origin.genmodlist.xlsx", FeatureNamesLangRes.GenerateModlistAsExcelFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.list_view, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null || p.Api.CurWorkspace?.InstallInfos is null)
return null;
using var pkg = SharedFunctions.GenerateModlistAsExcel(p.Api.CurWorkspace.InstallInfos);
if (pkg is null)
return null;
using var sfd = new RadSaveFileDialog
{
Filter = "*.xlsx|*.xlsx|*|*"
};
if (sfd.ShowDialog(p.Api.MainWindow) == DialogResult.OK)
{
pkg.SaveAs(sfd.FileName);
RadMessageBox.Show(p.Api.MainWindow, MsgBoxLangRes.ModlistGenerated, MsgBoxLangRes.ModlistGenerated_Title, MessageBoxButtons.OK, RadMessageIcon.Info);
}
return null;
}
}

View File

@@ -0,0 +1,27 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
using Telerik.WinControls;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class GenerateModlistAsMarkdownFeature : PluginFunction, IPluginFeatureProvider<GenerateModlistAsMarkdownFeature>
{
public static GenerateModlistAsMarkdownFeature Instance { get; } = new();
public GenerateModlistAsMarkdownFeature() : base(FeatureTypes.Tools, "origin.genmodlist.md", FeatureNamesLangRes.GenerateModlistAsMarkdownFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.list_view, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null || p.Api.CurWorkspace?.InstallInfos is null)
return null;
Clipboard.SetText(SharedFunctions.GenerateModlistAsMarkdown(p.Api.CurWorkspace.InstallInfos));
RadMessageBox.Show(p.Api.MainWindow, MsgBoxLangRes.ModlistCopiedToClipboard, MsgBoxLangRes.ModlistCopiedToClipboard_Title, MessageBoxButtons.OK, RadMessageIcon.Info);
return null;
}
}

View File

@@ -0,0 +1,25 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class UpdateDirectLinksFeature : PluginFunction, IPluginFeatureProvider<UpdateDirectLinksFeature>
{
public static UpdateDirectLinksFeature Instance { get; } = new();
public UpdateDirectLinksFeature() : base(FeatureTypes.Tools, "origin.updatedirectlinks", FeatureNamesLangRes.UpdateDirectLinksFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.renew, Pilz.UI.Symbols.SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null)
return null;
SharedFunctions.FindNewDirectLinks(p.Api, [.. p.Api.CurWorkspace.InstallInfos.Actions]);
return null;
}
}

View File

@@ -0,0 +1,26 @@
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
using Pilz.UI.Symbols;
namespace ModpackUpdater.Apps.Manager.Features.Tools;
internal class UpdatesCollectorFeature : PluginFunction, IPluginFeatureProvider<UpdatesCollectorFeature>
{
public static UpdatesCollectorFeature Instance { get; } = new();
public UpdatesCollectorFeature() : base(FeatureTypes.Tools, "origin.updatescollector", FeatureNamesLangRes.UpdatesCollectorFeature)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.search, SymbolSize.Small);
}
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
if (@params is not MainApiParameters p || p.Api.CurWorkspace?.InstallInfos is null)
return null;
SharedFunctions.CollectUpdates(p.Api, [.. p.Api.CurWorkspace.InstallInfos.Actions]);
return null;
}
}

View File

@@ -0,0 +1,92 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using NGitLab;
using NGitLab.Models;
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
internal class GitLabRepoWorkspace(GitLabRepoWorkspaceConfig config) : IWorkspace
{
private string? rawInstallInfos = null;
private string? rawUpdateInfos = null;
public WorkspaceConfig Config => ConfigX;
public GitLabRepoWorkspaceConfig ConfigX { get; } = config;
public IGitLabClient Gitlab { get; } = new GitLabClient(config.InstanceUrl, config.ApiToken);
public ModpackConfig? ModpackConfig { get; private set; }
public InstallInfos? InstallInfos { get; private set; }
public UpdateInfos? UpdateInfos { get; private set; }
public async Task<bool> Load()
{
if (!string.IsNullOrWhiteSpace(Config.ModpackConfigUrl))
ModpackConfig = ModpackConfig.LoadFromUrl(Config.ModpackConfigUrl);
rawInstallInfos = await GetContent(ConfigX.FileLocationInstallJson);
InstallInfos = InstallInfos.Parse(rawInstallInfos);
rawUpdateInfos = await GetContent(ConfigX.FileLocationUpdateJson);
UpdateInfos = UpdateInfos.Parse(rawUpdateInfos);
ConfigX.RepoName = (await Gitlab.Projects.GetByIdAsync((int)ConfigX.RepoId, new())).Name;
return InstallInfos != null && UpdateInfos != null;
}
public async Task<bool> Save()
{
if (InstallInfos != null)
{
var newInstallInfos = InstallInfos.ToString();
if (newInstallInfos != rawInstallInfos)
{
await SaveContent(ConfigX.FileLocationInstallJson, newInstallInfos);
rawInstallInfos = newInstallInfos;
}
}
if (UpdateInfos != null)
{
var newUpdateInfos = UpdateInfos.ToString();
if (newUpdateInfos != rawUpdateInfos)
{
await SaveContent(ConfigX.FileLocationUpdateJson, newUpdateInfos);
rawUpdateInfos = newUpdateInfos;
}
}
return true;
}
private async Task<string> GetContent(string path)
{
var repoId = new ProjectId(ConfigX.RepoId);
var repo = Gitlab.GetRepository(repoId);
var data = await repo.Files.GetAsync(path, ConfigX.RepoBranche);
return data.DecodedContent;
}
private Task<bool> SaveContent(string path, string content)
{
var repoId = new ProjectId(ConfigX.RepoId);
var repo = Gitlab.GetRepository(repoId);
var update = new FileUpsert
{
Branch = ConfigX.RepoBranche,
CommitMessage = "update " + Path.GetFileName(path),
RawContent = content,
Path = path,
};
if (repo.Files.FileExists(path, ConfigX.RepoBranche))
repo.Files.Update(update);
else
repo.Files.Create(update);
return Task.FromResult(true);
}
}

View File

@@ -0,0 +1,22 @@
using ModpackUpdater.Apps.Manager.Api.Model;
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
internal class GitLabRepoWorkspaceConfig : WorkspaceConfig
{
public override string DisplayText => $"{RepoName ?? "?"} | {RepoBranche} | {InstanceUrl}";
public string? RepoName { get; set; }
public string InstanceUrl { get; set; } = "https://gitlab.com";
public string? ApiToken { get; set; }
public long RepoId { get; set; } = 0L;
public string RepoBranche { get; set; } = "master";
public string FileLocationInstallJson { get; set; } = "install.json";
public string FileLocationUpdateJson { get; set; } = "updates.json";
}

View File

@@ -0,0 +1,266 @@
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
partial class GitLabRepoWorkspaceConfigEditor
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
tableLayoutPanel1 = new TableLayoutPanel();
radTextBox_FileLocUpdateJson = new Telerik.WinControls.UI.RadTextBox();
radTextBox_FileLocInstallJson = new Telerik.WinControls.UI.RadTextBox();
radTextBox_RepoBranche = new Telerik.WinControls.UI.RadTextBox();
radSpinEditor_RepoId = new Telerik.WinControls.UI.RadSpinEditor();
radTextBox_ApiToken = new Telerik.WinControls.UI.RadTextBox();
radTextBox_InstanceUrl = new Telerik.WinControls.UI.RadTextBox();
radLabel1 = new Telerik.WinControls.UI.RadLabel();
radLabel2 = new Telerik.WinControls.UI.RadLabel();
radLabel3 = new Telerik.WinControls.UI.RadLabel();
radLabel4 = new Telerik.WinControls.UI.RadLabel();
radLabel5 = new Telerik.WinControls.UI.RadLabel();
radLabel6 = new Telerik.WinControls.UI.RadLabel();
radLabel7 = new Telerik.WinControls.UI.RadLabel();
radTextBox_ModpackConfigUrl = new Telerik.WinControls.UI.RadTextBox();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radTextBox_FileLocUpdateJson).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_FileLocInstallJson).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_RepoBranche).BeginInit();
((System.ComponentModel.ISupportInitialize)radSpinEditor_RepoId).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_ApiToken).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_InstanceUrl).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel2).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel3).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel4).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel5).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel6).BeginInit();
((System.ComponentModel.ISupportInitialize)radLabel7).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBox_ModpackConfigUrl).BeginInit();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(radTextBox_FileLocUpdateJson, 0, 11);
tableLayoutPanel1.Controls.Add(radTextBox_FileLocInstallJson, 0, 9);
tableLayoutPanel1.Controls.Add(radTextBox_RepoBranche, 0, 7);
tableLayoutPanel1.Controls.Add(radSpinEditor_RepoId, 0, 5);
tableLayoutPanel1.Controls.Add(radTextBox_ApiToken, 0, 3);
tableLayoutPanel1.Controls.Add(radTextBox_InstanceUrl, 0, 1);
tableLayoutPanel1.Controls.Add(radLabel1, 0, 0);
tableLayoutPanel1.Controls.Add(radLabel2, 0, 2);
tableLayoutPanel1.Controls.Add(radLabel3, 0, 4);
tableLayoutPanel1.Controls.Add(radLabel4, 0, 6);
tableLayoutPanel1.Controls.Add(radLabel5, 0, 8);
tableLayoutPanel1.Controls.Add(radLabel6, 0, 10);
tableLayoutPanel1.Controls.Add(radLabel7, 0, 12);
tableLayoutPanel1.Controls.Add(radTextBox_ModpackConfigUrl, 0, 13);
tableLayoutPanel1.Dock = DockStyle.Fill;
tableLayoutPanel1.Location = new Point(0, 30);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 14;
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.Size = new Size(300, 406);
tableLayoutPanel1.TabIndex = 4;
//
// radTextBox_FileLocUpdateJson
//
radTextBox_FileLocUpdateJson.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_FileLocUpdateJson.Location = new Point(3, 321);
radTextBox_FileLocUpdateJson.Name = "radTextBox_FileLocUpdateJson";
radTextBox_FileLocUpdateJson.Size = new Size(294, 24);
radTextBox_FileLocUpdateJson.TabIndex = 4;
//
// radTextBox_FileLocInstallJson
//
radTextBox_FileLocInstallJson.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_FileLocInstallJson.Location = new Point(3, 263);
radTextBox_FileLocInstallJson.Name = "radTextBox_FileLocInstallJson";
radTextBox_FileLocInstallJson.Size = new Size(294, 24);
radTextBox_FileLocInstallJson.TabIndex = 3;
//
// radTextBox_RepoBranche
//
radTextBox_RepoBranche.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_RepoBranche.Location = new Point(3, 205);
radTextBox_RepoBranche.Name = "radTextBox_RepoBranche";
radTextBox_RepoBranche.Size = new Size(294, 24);
radTextBox_RepoBranche.TabIndex = 2;
//
// radSpinEditor_RepoId
//
radSpinEditor_RepoId.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radSpinEditor_RepoId.Location = new Point(3, 147);
radSpinEditor_RepoId.Maximum = new decimal(new int[] { -1, int.MaxValue, 0, 0 });
radSpinEditor_RepoId.Name = "radSpinEditor_RepoId";
radSpinEditor_RepoId.Size = new Size(294, 24);
radSpinEditor_RepoId.TabIndex = 6;
//
// radTextBox_ApiToken
//
radTextBox_ApiToken.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_ApiToken.Location = new Point(3, 89);
radTextBox_ApiToken.Name = "radTextBox_ApiToken";
radTextBox_ApiToken.Size = new Size(294, 24);
radTextBox_ApiToken.TabIndex = 1;
//
// radTextBox_InstanceUrl
//
radTextBox_InstanceUrl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_InstanceUrl.Location = new Point(3, 31);
radTextBox_InstanceUrl.Name = "radTextBox_InstanceUrl";
radTextBox_InstanceUrl.Size = new Size(294, 24);
radTextBox_InstanceUrl.TabIndex = 0;
//
// radLabel1
//
radLabel1.Location = new Point(3, 3);
radLabel1.Name = "radLabel1";
radLabel1.Size = new Size(80, 22);
radLabel1.TabIndex = 7;
radLabel1.Text = "Instance url";
//
// radLabel2
//
radLabel2.Location = new Point(3, 61);
radLabel2.Name = "radLabel2";
radLabel2.Size = new Size(69, 22);
radLabel2.TabIndex = 8;
radLabel2.Text = "Api token";
//
// radLabel3
//
radLabel3.Location = new Point(3, 119);
radLabel3.Name = "radLabel3";
radLabel3.Size = new Size(91, 22);
radLabel3.TabIndex = 9;
radLabel3.Text = "Repository id";
//
// radLabel4
//
radLabel4.Location = new Point(3, 177);
radLabel4.Name = "radLabel4";
radLabel4.Size = new Size(130, 22);
radLabel4.TabIndex = 10;
radLabel4.Text = "Repository branche";
//
// radLabel5
//
radLabel5.Location = new Point(3, 235);
radLabel5.Name = "radLabel5";
radLabel5.Size = new Size(181, 22);
radLabel5.TabIndex = 11;
radLabel5.Text = "File location for install infos";
//
// radLabel6
//
radLabel6.Location = new Point(3, 293);
radLabel6.Name = "radLabel6";
radLabel6.Size = new Size(189, 22);
radLabel6.TabIndex = 12;
radLabel6.Text = "File location for updates info";
//
// radLabel7
//
radLabel7.Location = new Point(3, 351);
radLabel7.Name = "radLabel7";
radLabel7.Size = new Size(131, 22);
radLabel7.TabIndex = 13;
radLabel7.Text = "Modpack config url";
//
// radTextBox_ModpackConfigUrl
//
radTextBox_ModpackConfigUrl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
radTextBox_ModpackConfigUrl.Location = new Point(3, 379);
radTextBox_ModpackConfigUrl.Name = "radTextBox_ModpackConfigUrl";
radTextBox_ModpackConfigUrl.Size = new Size(294, 24);
radTextBox_ModpackConfigUrl.TabIndex = 14;
//
// GitLabRepoWorkspaceConfigEditor
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
BackColor = Color.Transparent;
Controls.Add(tableLayoutPanel1);
MinimumSize = new Size(300, 0);
Name = "GitLabRepoWorkspaceConfigEditor";
Size = new Size(300, 466);
Controls.SetChildIndex(tableLayoutPanel1, 0);
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)radTextBox_FileLocUpdateJson).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_FileLocInstallJson).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_RepoBranche).EndInit();
((System.ComponentModel.ISupportInitialize)radSpinEditor_RepoId).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_ApiToken).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_InstanceUrl).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel2).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel3).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel4).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel5).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel6).EndInit();
((System.ComponentModel.ISupportInitialize)radLabel7).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBox_ModpackConfigUrl).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private TableLayoutPanel tableLayoutPanel1;
private Telerik.WinControls.UI.RadTextBox radTextBox_InstanceUrl;
private Telerik.WinControls.UI.RadTextBox radTextBox_ApiToken;
private Telerik.WinControls.UI.RadTextBox radTextBox_RepoBranche;
private Telerik.WinControls.UI.RadTextBox radTextBox_FileLocInstallJson;
private Telerik.WinControls.UI.RadTextBox radTextBox_FileLocUpdateJson;
private Telerik.WinControls.UI.RadSpinEditor radSpinEditor_RepoId;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadLabel radLabel2;
private Telerik.WinControls.UI.RadLabel radLabel3;
private Telerik.WinControls.UI.RadLabel radLabel4;
private Telerik.WinControls.UI.RadLabel radLabel5;
private Telerik.WinControls.UI.RadLabel radLabel6;
private Telerik.WinControls.UI.RadLabel radLabel7;
private Telerik.WinControls.UI.RadTextBox radTextBox_ModpackConfigUrl;
}

View File

@@ -0,0 +1,45 @@
using Pilz.UI;
using Pilz.UI.WinForms.Telerik.Dialogs;
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
internal partial class GitLabRepoWorkspaceConfigEditor : RadFlyoutBase, ILoadContent
{
private readonly GitLabRepoWorkspaceConfig settings;
public GitLabRepoWorkspaceConfigEditor(GitLabRepoWorkspaceConfig settings)
{
this.settings = settings;
InitializeComponent();
var defaults = new GitLabRepoWorkspaceConfig();
radTextBox_InstanceUrl.NullText = defaults.InstanceUrl;
radTextBox_RepoBranche.NullText = defaults.RepoBranche;
radTextBox_FileLocInstallJson.NullText = defaults.InstanceUrl;
radTextBox_FileLocUpdateJson.NullText = defaults.FileLocationUpdateJson;
}
public void LoadContent()
{
radTextBox_InstanceUrl.Text = settings.InstanceUrl;
radTextBox_ApiToken.Text = settings.ApiToken;
radSpinEditor_RepoId.Value = settings.RepoId;
radTextBox_RepoBranche.Text = settings.RepoBranche;
radTextBox_FileLocInstallJson.Text = settings.FileLocationInstallJson;
radTextBox_FileLocUpdateJson.Text = settings.FileLocationUpdateJson;
radTextBox_ModpackConfigUrl.Text = settings.ModpackConfigUrl;
}
protected override bool ValidateOK()
{
settings.InstanceUrl = radTextBox_InstanceUrl.Text.Trim();
settings.ApiToken = radTextBox_ApiToken.Text.Trim();
settings.RepoId = (long)radSpinEditor_RepoId.Value;
settings.RepoBranche = radTextBox_RepoBranche.Text.Trim();
settings.FileLocationInstallJson = radTextBox_FileLocInstallJson.Text.Trim();
settings.FileLocationUpdateJson = radTextBox_FileLocUpdateJson.Text.Trim();
settings.ModpackConfigUrl = radTextBox_ModpackConfigUrl.Text.Trim();
return base.ValidateOK();
}
}

View File

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

View File

@@ -0,0 +1,39 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
using ModpackUpdater.Apps.Manager.LangRes;
using Pilz.Plugins.Advanced;
using Pilz.UI.Symbols;
using Pilz.UI.WinForms.Extensions;
using Pilz.UI.WinForms.Telerik.Dialogs;
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
internal class GitLabRepoWorkspaceFeature : WorkspaceFeature, IPluginFeatureProvider<GitLabRepoWorkspaceFeature>
{
public static GitLabRepoWorkspaceFeature Instance { get; } = new();
public GitLabRepoWorkspaceFeature() : base("origin.gitlab", FeatureNamesLangRes.GitLabWorkspace)
{
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.gitlab, SymbolSize.Small);
}
protected override bool OnConfigure(ref IWorkspace? workspace)
{
var settings = workspace?.Config as GitLabRepoWorkspaceConfig ?? new();
if (RadDialogBase.ShowDialog(new GitLabRepoWorkspaceConfigEditor(settings), TitlesLangRes.GitLabRepoWorkspaceEditor, AppGlobals.Symbols.GetSvgImage(AppSymbols.gitlab, SymbolSize.Small)).Result.IsNotOk())
return false;
workspace = new GitLabRepoWorkspace(settings);
return true;
}
protected override void OnCreate(out IWorkspace workspace, WorkspaceConfig config)
{
if (config is not GitLabRepoWorkspaceConfig gitlabConfig)
throw new NotImplementedException($"Only configs of type {typeof(GitLabRepoWorkspaceConfig).Name} are allowed.");
workspace = new GitLabRepoWorkspace(gitlabConfig);
}
}

View File

@@ -0,0 +1,225 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.Apps.Manager.LangRes {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ActionsListLangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ActionsListLangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.ActionsListLangRes", typeof(ActionsListLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Destination path ähnelt.
/// </summary>
internal static string Col_DestPath {
get {
return ResourceManager.GetString("Col_DestPath", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Id ähnelt.
/// </summary>
internal static string Col_Id {
get {
return ResourceManager.GetString("Col_Id", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Inherit from ähnelt.
/// </summary>
internal static string Col_InheritFrom {
get {
return ResourceManager.GetString("Col_InheritFrom", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Is directory ähnelt.
/// </summary>
internal static string Col_IsDir {
get {
return ResourceManager.GetString("Col_IsDir", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Is Extra ähnelt.
/// </summary>
internal static string Col_IsExtra {
get {
return ResourceManager.GetString("Col_IsExtra", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Is ZIP ähnelt.
/// </summary>
internal static string Col_IsZip {
get {
return ResourceManager.GetString("Col_IsZip", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Name ähnelt.
/// </summary>
internal static string Col_Name {
get {
return ResourceManager.GetString("Col_Name", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Side ähnelt.
/// </summary>
internal static string Col_Side {
get {
return ResourceManager.GetString("Col_Side", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source name ähnelt.
/// </summary>
internal static string Col_SrcName {
get {
return ResourceManager.GetString("Col_SrcName", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source owner ähnelt.
/// </summary>
internal static string Col_SrcOwner {
get {
return ResourceManager.GetString("Col_SrcOwner", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source path ähnelt.
/// </summary>
internal static string Col_SrcPath {
get {
return ResourceManager.GetString("Col_SrcPath", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source RegEx ähnelt.
/// </summary>
internal static string Col_SrcRegEx {
get {
return ResourceManager.GetString("Col_SrcRegEx", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source tag ähnelt.
/// </summary>
internal static string Col_SrcTag {
get {
return ResourceManager.GetString("Col_SrcTag", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source type ähnelt.
/// </summary>
internal static string Col_SrcType {
get {
return ResourceManager.GetString("Col_SrcType", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Source URL ähnelt.
/// </summary>
internal static string Col_SrcUrl {
get {
return ResourceManager.GetString("Col_SrcUrl", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Update type ähnelt.
/// </summary>
internal static string Col_UpdateType {
get {
return ResourceManager.GetString("Col_UpdateType", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Website ähnelt.
/// </summary>
internal static string Col_Website {
get {
return ResourceManager.GetString("Col_Website", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ZIP archive path ähnelt.
/// </summary>
internal static string Col_ZipPath {
get {
return ResourceManager.GetString("Col_ZipPath", resourceCulture);
}
}
}
}

View File

@@ -117,32 +117,58 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <data name="Col_DestPath" xml:space="preserve">
<data name="icons8_checkmark_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Destination path</value>
<value>Resources\icons8_checkmark_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8_delete_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_Id" xml:space="preserve">
<value>Resources\icons8_delete_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Id</value>
</data> </data>
<data name="icons8_download_from_ftp_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_InheritFrom" xml:space="preserve">
<value>Resources\icons8_download_from_ftp_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Inherit from</value>
</data> </data>
<data name="icons8_general_warning_sign_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_IsDir" xml:space="preserve">
<value>Resources\icons8_general_warning_sign_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Is directory</value>
</data> </data>
<data name="icons8_opened_folder_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_IsExtra" xml:space="preserve">
<value>Resources\icons8_opened_folder_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Is Extra</value>
</data> </data>
<data name="icons8_save_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_IsZip" xml:space="preserve">
<value>Resources\icons8_save_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Is ZIP</value>
</data> </data>
<data name="icons8_software_installer_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_Name" xml:space="preserve">
<value>Resources\icons8_software_installer_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Name</value>
</data> </data>
<data name="icons8_update_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_Side" xml:space="preserve">
<value>Resources\icons8_update_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Side</value>
</data> </data>
<data name="icons8_wrench_16px" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Col_SrcName" xml:space="preserve">
<value>Resources\icons8_wrench_16px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Source name</value>
</data>
<data name="Col_SrcOwner" xml:space="preserve">
<value>Source owner</value>
</data>
<data name="Col_SrcPath" xml:space="preserve">
<value>Source path</value>
</data>
<data name="Col_SrcRegEx" xml:space="preserve">
<value>Source RegEx</value>
</data>
<data name="Col_SrcTag" xml:space="preserve">
<value>Source tag</value>
</data>
<data name="Col_SrcType" xml:space="preserve">
<value>Source type</value>
</data>
<data name="Col_SrcUrl" xml:space="preserve">
<value>Source URL</value>
</data>
<data name="Col_UpdateType" xml:space="preserve">
<value>Update type</value>
</data>
<data name="Col_Website" xml:space="preserve">
<value>Website</value>
</data>
<data name="Col_ZipPath" xml:space="preserve">
<value>ZIP archive path</value>
</data> </data>
</root> </root>

View File

@@ -0,0 +1,171 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.Apps.Manager.LangRes {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class FeatureNamesLangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal FeatureNamesLangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.FeatureNamesLangRes", typeof(FeatureNamesLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Check healthy ähnelt.
/// </summary>
internal static string CheckAllActionsHealthy {
get {
return ResourceManager.GetString("CheckAllActionsHealthy", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Check healthy ähnelt.
/// </summary>
internal static string CheckSingleActionHealthy {
get {
return ResourceManager.GetString("CheckSingleActionHealthy", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Clear direct link ähnelt.
/// </summary>
internal static string ClearDirectLinkFeature {
get {
return ResourceManager.GetString("ClearDirectLinkFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Clear direct links ähnelt.
/// </summary>
internal static string ClearDirectLinksFeature {
get {
return ResourceManager.GetString("ClearDirectLinksFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Generate changelog ähnelt.
/// </summary>
internal static string GenerateChangelogFeature {
get {
return ResourceManager.GetString("GenerateChangelogFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Generate modlist excel file ähnelt.
/// </summary>
internal static string GenerateModlistAsExcelFeature {
get {
return ResourceManager.GetString("GenerateModlistAsExcelFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Generate modlist markdown table ähnelt.
/// </summary>
internal static string GenerateModlistAsMarkdownFeature {
get {
return ResourceManager.GetString("GenerateModlistAsMarkdownFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die GitLab workspace ähnelt.
/// </summary>
internal static string GitLabWorkspace {
get {
return ResourceManager.GetString("GitLabWorkspace", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Find update ähnelt.
/// </summary>
internal static string UpdateCollectorFeature {
get {
return ResourceManager.GetString("UpdateCollectorFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Update direct link ähnelt.
/// </summary>
internal static string UpdateDirectLinkFeature {
get {
return ResourceManager.GetString("UpdateDirectLinkFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Update direct links ähnelt.
/// </summary>
internal static string UpdateDirectLinksFeature {
get {
return ResourceManager.GetString("UpdateDirectLinksFeature", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Find updates ähnelt.
/// </summary>
internal static string UpdatesCollectorFeature {
get {
return ResourceManager.GetString("UpdatesCollectorFeature", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CheckAllActionsHealthy" xml:space="preserve">
<value>Check healthy</value>
</data>
<data name="CheckSingleActionHealthy" xml:space="preserve">
<value>Check healthy</value>
</data>
<data name="ClearDirectLinkFeature" xml:space="preserve">
<value>Clear direct link</value>
</data>
<data name="ClearDirectLinksFeature" xml:space="preserve">
<value>Clear direct links</value>
</data>
<data name="GenerateChangelogFeature" xml:space="preserve">
<value>Generate changelog</value>
</data>
<data name="GenerateModlistAsExcelFeature" xml:space="preserve">
<value>Generate modlist excel file</value>
</data>
<data name="GenerateModlistAsMarkdownFeature" xml:space="preserve">
<value>Generate modlist markdown table</value>
</data>
<data name="GitLabWorkspace" xml:space="preserve">
<value>GitLab workspace</value>
</data>
<data name="UpdateCollectorFeature" xml:space="preserve">
<value>Find update</value>
</data>
<data name="UpdateDirectLinkFeature" xml:space="preserve">
<value>Update direct link</value>
</data>
<data name="UpdateDirectLinksFeature" xml:space="preserve">
<value>Update direct links</value>
</data>
<data name="UpdatesCollectorFeature" xml:space="preserve">
<value>Find updates</value>
</data>
</root>

View File

@@ -0,0 +1,90 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.Apps.Manager.LangRes {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class GeneralLangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal GeneralLangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.GeneralLangRes", typeof(GeneralLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Installation: {0} ähnelt.
/// </summary>
internal static string Node_Install {
get {
return ResourceManager.GetString("Node_Install", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Update: {0} ähnelt.
/// </summary>
internal static string Node_Update {
get {
return ResourceManager.GetString("Node_Update", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Modlist for v{0} ähnelt.
/// </summary>
internal static string Text_ModlistForVersion {
get {
return ResourceManager.GetString("Text_ModlistForVersion", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Node_Install" xml:space="preserve">
<value>Installation: {0}</value>
</data>
<data name="Node_Update" xml:space="preserve">
<value>Update: {0}</value>
</data>
<data name="Text_ModlistForVersion" xml:space="preserve">
<value>Modlist for v{0}</value>
</data>
</root>

View File

@@ -0,0 +1,135 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.Apps.Manager.LangRes {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class MsgBoxLangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal MsgBoxLangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The changelog for the selected version has been generated and copied to the clipboard. ähnelt.
/// </summary>
internal static string ChangelogCopiedToClipboard {
get {
return ResourceManager.GetString("ChangelogCopiedToClipboard", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Changelog generated successfully ähnelt.
/// </summary>
internal static string ChangelogCopiedToClipboard_Title {
get {
return ResourceManager.GetString("ChangelogCopiedToClipboard_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The modlist has been generated and copied to the clipboard. ähnelt.
/// </summary>
internal static string ModlistCopiedToClipboard {
get {
return ResourceManager.GetString("ModlistCopiedToClipboard", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Modlist generated successfully ähnelt.
/// </summary>
internal static string ModlistCopiedToClipboard_Title {
get {
return ResourceManager.GetString("ModlistCopiedToClipboard_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The modlist has been generated successfully and saved to the selected location. ähnelt.
/// </summary>
internal static string ModlistGenerated {
get {
return ResourceManager.GetString("ModlistGenerated", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Modlist generated successfully ähnelt.
/// </summary>
internal static string ModlistGenerated_Title {
get {
return ResourceManager.GetString("ModlistGenerated_Title", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Are you sure that you want to delete this update? ähnelt.
/// </summary>
internal static string RemoveUpdate {
get {
return ResourceManager.GetString("RemoveUpdate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Remove update ähnelt.
/// </summary>
internal static string RemoveUpdate_Title {
get {
return ResourceManager.GetString("RemoveUpdate_Title", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ChangelogCopiedToClipboard" xml:space="preserve">
<value>The changelog for the selected version has been generated and copied to the clipboard.</value>
</data>
<data name="ChangelogCopiedToClipboard_Title" xml:space="preserve">
<value>Changelog generated successfully</value>
</data>
<data name="ModlistCopiedToClipboard" xml:space="preserve">
<value>The modlist has been generated and copied to the clipboard.</value>
</data>
<data name="ModlistCopiedToClipboard_Title" xml:space="preserve">
<value>Modlist generated successfully</value>
</data>
<data name="ModlistGenerated" xml:space="preserve">
<value>The modlist has been generated successfully and saved to the selected location.</value>
</data>
<data name="ModlistGenerated_Title" xml:space="preserve">
<value>Modlist generated successfully</value>
</data>
<data name="RemoveUpdate" xml:space="preserve">
<value>Are you sure that you want to delete this update?</value>
</data>
<data name="RemoveUpdate_Title" xml:space="preserve">
<value>Remove update</value>
</data>
</root>

View File

@@ -0,0 +1,90 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ModpackUpdater.Apps.Manager.LangRes {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class TitlesLangRes {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal TitlesLangRes() {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.TitlesLangRes", typeof(TitlesLangRes).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Create update ähnelt.
/// </summary>
internal static string CreateUpdate {
get {
return ResourceManager.GetString("CreateUpdate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Edit update ähnelt.
/// </summary>
internal static string EditUpdate {
get {
return ResourceManager.GetString("EditUpdate", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Setup GitLab workspace ähnelt.
/// </summary>
internal static string GitLabRepoWorkspaceEditor {
get {
return ResourceManager.GetString("GitLabRepoWorkspaceEditor", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CreateUpdate" xml:space="preserve">
<value>Create update</value>
</data>
<data name="EditUpdate" xml:space="preserve">
<value>Edit update</value>
</data>
<data name="GitLabRepoWorkspaceEditor" xml:space="preserve">
<value>Setup GitLab workspace</value>
</data>
</root>

View File

@@ -0,0 +1,86 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>icons8_Windows_Update.ico</ApplicationIcon>
<AssemblyName>Minecraft Modpack Update Manager</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EPPlus" Version="8.0.8" />
<PackageReference Include="NGitLab" Version="9.2.0" />
<PackageReference Include="Pilz.Configuration" Version="3.2.6" />
<PackageReference Include="Pilz.Plugins.Advanced" Version="2.10.7" />
<PackageReference Include="Pilz.Plugins.Advanced.UI.WinForms" Version="1.9.1" />
<PackageReference Include="Pilz.Plugins.Advanced.UI.WinForms.Telerik" Version="1.8.3" />
<PackageReference Include="Pilz.UI" Version="3.0.0" />
<PackageReference Include="Pilz.UI.WinForms" Version="2.6.2" />
<PackageReference Include="Pilz.UI.WinForms.Telerik" Version="2.13.3" />
<PackageReference Include="Pilz.UI.WinForms.Telerik.Symbols" Version="1.2.1" />
<PackageReference Include="UI.for.WinForms.Common" Version="2025.2.612-preview" />
<PackageReference Include="UI.for.WinForms.GridView" Version="2025.2.612-preview" />
<PackageReference Include="UI.for.WinForms.Themes" Version="2025.2.612-preview" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModpackUpdater.Apps\ModpackUpdater.Apps.csproj" />
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="LangRes\ActionsListLangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ActionsListLangRes.resx</DependentUpon>
</Compile>
<Compile Update="LangRes\FeatureNamesLangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FeatureNamesLangRes.resx</DependentUpon>
</Compile>
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>GeneralLangRes.resx</DependentUpon>
</Compile>
<Compile Update="LangRes\MsgBoxLangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>MsgBoxLangRes.resx</DependentUpon>
</Compile>
<Compile Update="LangRes\TitlesLangRes.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>TitlesLangRes.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="LangRes\ActionsListLangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ActionsListLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="LangRes\FeatureNamesLangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>FeatureNamesLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="LangRes\MsgBoxLangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MsgBoxLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="LangRes\TitlesLangRes.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TitlesLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,45 @@
using OfficeOpenXml;
using Pilz;
using Pilz.Configuration;
using Pilz.Plugins.Advanced;
namespace ModpackUpdater.Apps.Manager;
public static class Program
{
private static readonly SettingsManager settingsManager;
public static ISettings Settings => settingsManager.Instance;
static Program()
{
ExcelPackage.License.SetNonCommercialPersonal("Pilzinsel64");
settingsManager = new(GetSettingsPath(), true);
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
internal static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
AppGlobals.Initialize();
PluginFeatureController.Instance.RegisterAllOwn();
Application.Run(new Ui.MainForm());
}
private static string GetSettingsPath()
{
const string AppDataDirectoryName = "MinecraftModpackUpdateManager";
var SettingsFileName = $"Settings.json";
var settingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppDataDirectoryName);
Directory.CreateDirectory(settingsPath);
settingsPath = Path.Combine(settingsPath, SettingsFileName);
return settingsPath;
}
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>H:\Applications\Minecraft Modpack Manager</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0-windows</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,16 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using Pilz.Configuration;
namespace ModpackUpdater.Apps.Manager.Settings;
internal class WorkspaceSettings : IChildSettings, ISettingsIdentifier
{
public static string Identifier => "origin.workspaces";
public List<WorkspaceConfig> Workspaces { get; } = [];
public void Reset()
{
Workspaces.Clear();
}
}

View File

@@ -0,0 +1,405 @@
namespace ModpackUpdater.Apps.Manager.Ui;
partial class MainForm
{
/// <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()
{
var tableViewDefinition2 = new Telerik.WinControls.UI.TableViewDefinition();
var resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
tableLayoutPanel2 = new TableLayoutPanel();
radTreeView_Sets = new Telerik.WinControls.UI.RadTreeView();
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
tableLayoutPanel_ActionSet = new TableLayoutPanel();
radGridView_Actions = new Telerik.WinControls.UI.RadGridView();
tableLayoutPanel_ActionSetInfo = new TableLayoutPanel();
radLabel1 = new Telerik.WinControls.UI.RadLabel();
radTextBoxControl_Version = new Telerik.WinControls.UI.RadTextBoxControl();
radCheckBox_IsPublic = new Telerik.WinControls.UI.RadCheckBox();
radMenuItem_Workspace = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_WorkspacePreferences = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_SaveWorkspace = new Telerik.WinControls.UI.RadMenuItem();
radMenuSeparatorItem1 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenuHeaderItem_NewWorkspace = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuSeparatorItem3 = new Telerik.WinControls.UI.RadMenuSeparatorItem();
radMenuHeaderItem_RecentWorkspaces = new Telerik.WinControls.UI.RadMenuHeaderItem();
radMenuItem_Tools = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_Updates = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_CreateUpdate = new Telerik.WinControls.UI.RadMenuItem();
radMenuItem_RemoveUpdate = new Telerik.WinControls.UI.RadMenuItem();
radWaitingBar_Updates = new Telerik.WinControls.UI.RadWaitingBar();
dotsRingWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
radWaitingBar_Actions = new Telerik.WinControls.UI.RadWaitingBar();
dotsRingWaitingBarIndicatorElement2 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
radMenu1 = new Telerik.WinControls.UI.RadMenu();
((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit();
radSplitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
splitPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radTreeView_Sets).BeginInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
splitPanel2.SuspendLayout();
tableLayoutPanel_ActionSet.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radGridView_Actions).BeginInit();
((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).BeginInit();
tableLayoutPanel_ActionSetInfo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
((System.ComponentModel.ISupportInitialize)radTextBoxControl_Version).BeginInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).BeginInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).BeginInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).BeginInit();
((System.ComponentModel.ISupportInitialize)radMenu1).BeginInit();
((System.ComponentModel.ISupportInitialize)this).BeginInit();
SuspendLayout();
//
// radSplitContainer1
//
radSplitContainer1.Controls.Add(splitPanel1);
radSplitContainer1.Controls.Add(splitPanel2);
radSplitContainer1.Dock = DockStyle.Fill;
radSplitContainer1.Location = new Point(0, 28);
radSplitContainer1.Name = "radSplitContainer1";
radSplitContainer1.Size = new Size(800, 422);
radSplitContainer1.TabIndex = 0;
radSplitContainer1.TabStop = false;
//
// splitPanel1
//
splitPanel1.Controls.Add(tableLayoutPanel2);
splitPanel1.Location = new Point(0, 0);
splitPanel1.Name = "splitPanel1";
splitPanel1.Size = new Size(232, 422);
splitPanel1.SizeInfo.AbsoluteSize = new Size(232, 200);
splitPanel1.SizeInfo.AutoSizeScale = new SizeF(-0.190954775F, 0F);
splitPanel1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;
splitPanel1.SizeInfo.SplitterCorrection = new Size(-120, 0);
splitPanel1.TabIndex = 0;
splitPanel1.TabStop = false;
//
// tableLayoutPanel2
//
tableLayoutPanel2.ColumnCount = 1;
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
tableLayoutPanel2.Controls.Add(radTreeView_Sets, 0, 0);
tableLayoutPanel2.Dock = DockStyle.Fill;
tableLayoutPanel2.Location = new Point(0, 0);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
tableLayoutPanel2.Size = new Size(232, 422);
tableLayoutPanel2.TabIndex = 1;
//
// radTreeView_Sets
//
radTreeView_Sets.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
radTreeView_Sets.ItemHeight = 24;
radTreeView_Sets.LineColor = Color.FromArgb(152, 152, 152);
radTreeView_Sets.LineStyle = Telerik.WinControls.UI.TreeLineStyle.Solid;
radTreeView_Sets.Location = new Point(3, 3);
radTreeView_Sets.Name = "radTreeView_Sets";
radTreeView_Sets.Size = new Size(226, 416);
radTreeView_Sets.TabIndex = 0;
radTreeView_Sets.SelectedNodeChanged += RadTreeView_Sets_SelectedNodeChanged;
//
// splitPanel2
//
splitPanel2.Controls.Add(tableLayoutPanel_ActionSet);
splitPanel2.Location = new Point(236, 0);
splitPanel2.Name = "splitPanel2";
splitPanel2.Size = new Size(564, 422);
splitPanel2.SizeInfo.AutoSizeScale = new SizeF(-0.0600000024F, 0F);
splitPanel2.SizeInfo.SplitterCorrection = new Size(120, 0);
splitPanel2.TabIndex = 1;
splitPanel2.TabStop = false;
//
// tableLayoutPanel_ActionSet
//
tableLayoutPanel_ActionSet.ColumnCount = 1;
tableLayoutPanel_ActionSet.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel_ActionSet.Controls.Add(radGridView_Actions, 0, 1);
tableLayoutPanel_ActionSet.Controls.Add(tableLayoutPanel_ActionSetInfo, 0, 0);
tableLayoutPanel_ActionSet.Dock = DockStyle.Fill;
tableLayoutPanel_ActionSet.Location = new Point(0, 0);
tableLayoutPanel_ActionSet.Name = "tableLayoutPanel_ActionSet";
tableLayoutPanel_ActionSet.RowCount = 2;
tableLayoutPanel_ActionSet.RowStyles.Add(new RowStyle());
tableLayoutPanel_ActionSet.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel_ActionSet.Size = new Size(564, 422);
tableLayoutPanel_ActionSet.TabIndex = 0;
//
// radGridView_Actions
//
radGridView_Actions.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
radGridView_Actions.Location = new Point(3, 33);
//
//
//
radGridView_Actions.MasterTemplate.AddNewRowPosition = Telerik.WinControls.UI.SystemRowPosition.Bottom;
radGridView_Actions.MasterTemplate.AllowColumnChooser = false;
radGridView_Actions.MasterTemplate.AllowDragToGroup = false;
radGridView_Actions.MasterTemplate.AllowRowResize = false;
radGridView_Actions.MasterTemplate.AllowSearchRow = true;
radGridView_Actions.MasterTemplate.EnableGrouping = false;
radGridView_Actions.MasterTemplate.ViewDefinition = tableViewDefinition2;
radGridView_Actions.Name = "radGridView_Actions";
radGridView_Actions.Size = new Size(558, 386);
radGridView_Actions.TabIndex = 0;
radGridView_Actions.CellFormatting += RadGridView_Actions_CellFormatting;
radGridView_Actions.UserAddedRow += RadGridView_Actions_UserAddedRow;
radGridView_Actions.UserDeletingRow += RadGridView_Actions_UserDeletingRow;
radGridView_Actions.CellValueChanged += RadGridView_Actions_CellValueChanged;
radGridView_Actions.ContextMenuOpening += RadGridView_Actions_ContextMenuOpening;
//
// tableLayoutPanel_ActionSetInfo
//
tableLayoutPanel_ActionSetInfo.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
tableLayoutPanel_ActionSetInfo.AutoSize = true;
tableLayoutPanel_ActionSetInfo.ColumnCount = 3;
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel_ActionSetInfo.Controls.Add(radLabel1, 0, 0);
tableLayoutPanel_ActionSetInfo.Controls.Add(radTextBoxControl_Version, 1, 0);
tableLayoutPanel_ActionSetInfo.Controls.Add(radCheckBox_IsPublic, 2, 0);
tableLayoutPanel_ActionSetInfo.Location = new Point(0, 0);
tableLayoutPanel_ActionSetInfo.Margin = new Padding(0);
tableLayoutPanel_ActionSetInfo.Name = "tableLayoutPanel_ActionSetInfo";
tableLayoutPanel_ActionSetInfo.RowCount = 1;
tableLayoutPanel_ActionSetInfo.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel_ActionSetInfo.Size = new Size(564, 30);
tableLayoutPanel_ActionSetInfo.TabIndex = 1;
//
// radLabel1
//
radLabel1.Anchor = AnchorStyles.Left;
radLabel1.Location = new Point(3, 4);
radLabel1.Name = "radLabel1";
radLabel1.Size = new Size(58, 22);
radLabel1.TabIndex = 0;
radLabel1.Text = "Version:";
//
// radTextBoxControl_Version
//
radTextBoxControl_Version.Anchor = AnchorStyles.Left;
radTextBoxControl_Version.AutoSize = true;
radTextBoxControl_Version.Location = new Point(67, 3);
radTextBoxControl_Version.Name = "radTextBoxControl_Version";
radTextBoxControl_Version.NullText = "e.g. 1.2.5.0";
radTextBoxControl_Version.Size = new Size(150, 24);
radTextBoxControl_Version.TabIndex = 1;
radTextBoxControl_Version.TextChanged += RadTextBoxControl1_TextChanged;
//
// radCheckBox_IsPublic
//
radCheckBox_IsPublic.Anchor = AnchorStyles.Left;
radCheckBox_IsPublic.Location = new Point(223, 5);
radCheckBox_IsPublic.Name = "radCheckBox_IsPublic";
radCheckBox_IsPublic.Size = new Size(76, 20);
radCheckBox_IsPublic.TabIndex = 2;
radCheckBox_IsPublic.Text = "Is public";
radCheckBox_IsPublic.ToggleStateChanged += RadCheckBox1_ToggleStateChanged;
//
// radMenuItem_Workspace
//
radMenuItem_Workspace.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_WorkspacePreferences, radMenuItem_SaveWorkspace, radMenuSeparatorItem1, radMenuHeaderItem_NewWorkspace, radMenuSeparatorItem3, radMenuHeaderItem_RecentWorkspaces });
radMenuItem_Workspace.Name = "radMenuItem_Workspace";
radMenuItem_Workspace.Text = "Workspace";
//
// radMenuItem_WorkspacePreferences
//
radMenuItem_WorkspacePreferences.Name = "radMenuItem_WorkspacePreferences";
radMenuItem_WorkspacePreferences.Text = "Preferences";
radMenuItem_WorkspacePreferences.Click += RadMenuItem_WorkspacePreferences_Click;
//
// radMenuItem_SaveWorkspace
//
radMenuItem_SaveWorkspace.Name = "radMenuItem_SaveWorkspace";
radMenuItem_SaveWorkspace.Text = "Save";
radMenuItem_SaveWorkspace.Click += RadMenuItem_SaveWorkspace_Click;
//
// radMenuSeparatorItem1
//
radMenuSeparatorItem1.Name = "radMenuSeparatorItem1";
radMenuSeparatorItem1.Text = "radMenuSeparatorItem1";
radMenuSeparatorItem1.TextAlignment = ContentAlignment.MiddleLeft;
//
// radMenuHeaderItem_NewWorkspace
//
radMenuHeaderItem_NewWorkspace.Name = "radMenuHeaderItem_NewWorkspace";
radMenuHeaderItem_NewWorkspace.Text = "New workspace";
//
// radMenuSeparatorItem3
//
radMenuSeparatorItem3.Name = "radMenuSeparatorItem3";
radMenuSeparatorItem3.Text = "radMenuSeparatorItem3";
radMenuSeparatorItem3.TextAlignment = ContentAlignment.MiddleLeft;
//
// radMenuHeaderItem_RecentWorkspaces
//
radMenuHeaderItem_RecentWorkspaces.Name = "radMenuHeaderItem_RecentWorkspaces";
radMenuHeaderItem_RecentWorkspaces.Text = "Recent workspaces";
//
// radMenuItem_Tools
//
radMenuItem_Tools.Name = "radMenuItem_Tools";
radMenuItem_Tools.Text = "Tools";
//
// radMenuItem_Updates
//
radMenuItem_Updates.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_CreateUpdate, radMenuItem_RemoveUpdate });
radMenuItem_Updates.Name = "radMenuItem_Updates";
radMenuItem_Updates.Text = "Updates";
radMenuItem_Updates.DropDownOpening += RadMenuItem_Updates_DropDownOpening;
//
// radMenuItem_CreateUpdate
//
radMenuItem_CreateUpdate.Name = "radMenuItem_CreateUpdate";
radMenuItem_CreateUpdate.Text = "Create";
radMenuItem_CreateUpdate.Click += RadMenuItem_CreateUpdate_Click;
//
// radMenuItem_RemoveUpdate
//
radMenuItem_RemoveUpdate.Name = "radMenuItem_RemoveUpdate";
radMenuItem_RemoveUpdate.Text = "Remove";
radMenuItem_RemoveUpdate.Click += RadMenuItem_RemoveUpdate_Click;
//
// radWaitingBar_Updates
//
radWaitingBar_Updates.AssociatedControl = radTreeView_Sets;
radWaitingBar_Updates.Location = new Point(0, 78);
radWaitingBar_Updates.Name = "radWaitingBar_Updates";
radWaitingBar_Updates.Size = new Size(70, 70);
radWaitingBar_Updates.TabIndex = 2;
radWaitingBar_Updates.Text = "radWaitingBar1";
radWaitingBar_Updates.WaitingIndicators.Add(dotsRingWaitingBarIndicatorElement1);
radWaitingBar_Updates.WaitingIndicatorSize = new Size(100, 14);
radWaitingBar_Updates.WaitingSpeed = 50;
radWaitingBar_Updates.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
//
// dotsRingWaitingBarIndicatorElement1
//
dotsRingWaitingBarIndicatorElement1.Name = "dotsRingWaitingBarIndicatorElement1";
//
// radWaitingBar_Actions
//
radWaitingBar_Actions.AssociatedControl = radGridView_Actions;
radWaitingBar_Actions.ForeColor = Color.Black;
radWaitingBar_Actions.Location = new Point(0, 145);
radWaitingBar_Actions.Name = "radWaitingBar_Actions";
radWaitingBar_Actions.Size = new Size(70, 70);
radWaitingBar_Actions.TabIndex = 3;
radWaitingBar_Actions.WaitingIndicators.Add(dotsRingWaitingBarIndicatorElement2);
radWaitingBar_Actions.WaitingIndicatorSize = new Size(100, 14);
radWaitingBar_Actions.WaitingSpeed = 50;
radWaitingBar_Actions.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
//
// dotsRingWaitingBarIndicatorElement2
//
dotsRingWaitingBarIndicatorElement2.Name = "dotsRingWaitingBarIndicatorElement2";
//
// radMenu1
//
radMenu1.Items.AddRange(new Telerik.WinControls.RadItem[] { radMenuItem_Workspace, radMenuItem_Updates, radMenuItem_Tools });
radMenu1.Location = new Point(0, 0);
radMenu1.Name = "radMenu1";
radMenu1.Size = new Size(800, 28);
radMenu1.TabIndex = 1;
//
// MainForm
//
AutoScaleBaseSize = new Size(7, 15);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
Controls.Add(radWaitingBar_Actions);
Controls.Add(radWaitingBar_Updates);
Controls.Add(radSplitContainer1);
Controls.Add(radMenu1);
Icon = (Icon)resources.GetObject("$this.Icon");
Name = "MainForm";
StartPosition = FormStartPosition.CenterScreen;
Text = "Minecraft Modpack Updates Manager";
WindowState = FormWindowState.Maximized;
Load += Form1_Load;
((System.ComponentModel.ISupportInitialize)radSplitContainer1).EndInit();
radSplitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
splitPanel1.ResumeLayout(false);
tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)radTreeView_Sets).EndInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
splitPanel2.ResumeLayout(false);
tableLayoutPanel_ActionSet.ResumeLayout(false);
tableLayoutPanel_ActionSet.PerformLayout();
((System.ComponentModel.ISupportInitialize)radGridView_Actions.MasterTemplate).EndInit();
((System.ComponentModel.ISupportInitialize)radGridView_Actions).EndInit();
tableLayoutPanel_ActionSetInfo.ResumeLayout(false);
tableLayoutPanel_ActionSetInfo.PerformLayout();
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
((System.ComponentModel.ISupportInitialize)radTextBoxControl_Version).EndInit();
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).EndInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Updates).EndInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar_Actions).EndInit();
((System.ComponentModel.ISupportInitialize)radMenu1).EndInit();
((System.ComponentModel.ISupportInitialize)this).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
private Telerik.WinControls.UI.SplitPanel splitPanel1;
private Telerik.WinControls.UI.SplitPanel splitPanel2;
private Telerik.WinControls.UI.RadMenu radMenu1;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Workspace;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_WorkspacePreferences;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Tools;
private TableLayoutPanel tableLayoutPanel2;
private TableLayoutPanel tableLayoutPanel_ActionSet;
private Telerik.WinControls.UI.RadGridView radGridView_Actions;
private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem1;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_SaveWorkspace;
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar_Updates;
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement1;
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar_Actions;
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement2;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_Updates;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_CreateUpdate;
private Telerik.WinControls.UI.RadMenuItem radMenuItem_RemoveUpdate;
private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_NewWorkspace;
private Telerik.WinControls.UI.RadMenuSeparatorItem radMenuSeparatorItem3;
private Telerik.WinControls.UI.RadMenuHeaderItem radMenuHeaderItem_RecentWorkspaces;
private Telerik.WinControls.UI.RadTreeView radTreeView_Sets;
private TableLayoutPanel tableLayoutPanel_ActionSetInfo;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadTextBoxControl radTextBoxControl_Version;
private Telerik.WinControls.UI.RadCheckBox radCheckBox_IsPublic;
}

View File

@@ -0,0 +1,651 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Settings;
using Pilz.Plugins.Advanced;
using Pilz.Plugins.Advanced.UI.WinForms.Telerik;
using Pilz.UI.Symbols;
using Pilz.UI.WinForms.Extensions;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Ui;
public partial class MainForm : RadForm, IMainApi
{
private record RecentFilesItemTag(WorkspaceConfig Config, WorkspaceFeature Feature);
private record WorkspaceTag(IWorkspace Workspace, WorkspaceFeature Feature);
private bool loadingMainView;
private WorkspaceTag? wsInfo;
private InstallAction? tempAction;
Form IMainApi.MainWindow => this;
IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace;
public IActionSetInfos? CurActionSet => radTreeView_Sets.SelectedNode?.Tag as IActionSetInfos;
public MainForm()
{
InitializeComponent();
radMenuItem_Workspace.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.workspace, SymbolSize.Small);
radMenuItem_WorkspacePreferences.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.settings, SymbolSize.Small);
radMenuItem_SaveWorkspace.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.save, SymbolSize.Small);
//radMenuItem_OpenNewWorkspace.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.new_window, SymbolSize.Small);
//radMenuItem_RecentWorkspaces.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.time_machine, SymbolSize.Small);
radMenuItem_Updates.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small);
radMenuItem_CreateUpdate.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.add, SymbolSize.Small);
radMenuItem_RemoveUpdate.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.remove, SymbolSize.Small);
radMenuItem_Tools.SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.tools, SymbolSize.Small);
radMenuItem_SaveWorkspace.Shortcuts.Add(new(Keys.Control, Keys.S));
PluginFeatureController.Instance.Features.Get(FeatureTypes.Workspace).InsertItemsTo(radMenuItem_Workspace.Items,
customClickHandler: RadMenuItem_OpenNewWorkspace_Click,
insertPrioSplitters: true,
customDefault: radMenuItem_Workspace.Items.IndexOf(radMenuHeaderItem_NewWorkspace) + 1);
PluginFeatureController.Instance.Functions.Get(FeatureTypes.Tools).InsertItemsTo(radMenuItem_Tools.Items,
customClickHandler: RadMenuItem_ToolsItem_Click,
insertPrioSplitters: true);
}
private void LoadRecentWorkspaces()
{
var settings = Program.Settings.Get<WorkspaceSettings>();
var startIndex = radMenuItem_Workspace.Items.IndexOf(radMenuHeaderItem_RecentWorkspaces) + 1;
foreach (var item in radMenuItem_Workspace.Items.Where(n => n.Tag is RecentFilesItemTag).ToArray())
radMenuItem_Workspace.Items.Remove(item);
foreach (var config in settings.Workspaces)
{
if (PluginFeatureController.Instance.Features.Get(FeatureTypes.Workspace).OfType<WorkspaceFeature>().FirstOrDefault(n => n.Identifier == config.ProviderId) is not WorkspaceFeature feature)
continue;
var item = new RadMenuItem
{
Text = config.DisplayText,
Tag = new RecentFilesItemTag(config, feature),
SvgImage = feature.Icon as RadSvgImage,
};
item.Click += RadMenuItem_OpenRecentWorkspace_Click;
radMenuItem_Workspace.Items.Insert(startIndex++, item);
}
}
private void AddToRecentFiles(IWorkspace workspace)
{
var settings = Program.Settings.Get<WorkspaceSettings>();
settings.Workspaces.Remove(workspace.Config);
settings.Workspaces.Insert(0, workspace.Config);
while (settings.Workspaces.Count > 20)
settings.Workspaces.RemoveAt(20);
}
private async Task LoadNewWorkspace(IWorkspace? workspace, WorkspaceFeature feature)
{
if (workspace is null)
return;
if (workspace != wsInfo?.Workspace)
wsInfo = new(workspace, feature);
AddToRecentFiles(workspace);
Invoke(LoadRecentWorkspaces);
radWaitingBar_Updates.StartWaiting();
if (!await workspace.Load())
{
radWaitingBar_Updates.StopWaiting();
return;
}
Invoke(LoadWorkspace);
}
private void LoadWorkspace()
{
if (wsInfo?.Workspace.Config is null || wsInfo.Workspace.InstallInfos is null || wsInfo.Workspace.UpdateInfos is null)
return;
radWaitingBar_Updates.StartWaiting();
Text = wsInfo.Workspace.Config.DisplayText;
radTreeView_Sets.BeginUpdate();
radTreeView_Sets.Nodes.Clear();
AddUpdateItem(wsInfo.Workspace.InstallInfos);
var nodeUpdates = new RadTreeNode
{
Text = "Updates",
Name = "updates",
SvgImage = AppGlobals.Symbols.GetSvgImage(AppSymbols.update_done, SymbolSize.Small),
};
wsInfo.Workspace.UpdateInfos.Updates.ForEach(n => AddUpdateItem(n, nodeUpdates.Nodes));
radTreeView_Sets.Nodes.Add(nodeUpdates);
radTreeView_Sets.EndUpdate();
radWaitingBar_Updates.StopWaiting();
}
private RadTreeNode AddUpdateItem(IActionSetInfos infos)
{
return AddUpdateItem(infos, radTreeView_Sets.Nodes);
}
private RadTreeNode AddUpdateItem(IActionSetInfos infos, RadTreeNodeCollection parent)
{
var item = CreateUpdateItem(infos);
parent.Add(item);
return item;
}
private RadTreeNode InsertUpdateItem(IActionSetInfos infos)
{
var item = CreateUpdateItem(infos);
var nodeUpdates = radTreeView_Sets.Nodes["updates"];
nodeUpdates.Nodes.Insert(Math.Min(1, nodeUpdates.Nodes.Count), item);
return item;
}
private RadTreeNode CreateUpdateItem(IActionSetInfos infos)
{
var item = new RadTreeNode();
UpdateUpdateItem(item, infos);
return item;
}
private void UpdateUpdateItem(RadTreeNode item)
{
if (item.Tag is IActionSetInfos infos)
UpdateUpdateItem(item, infos);
}
private void SaveActionsSet()
{
if (loadingMainView || CurActionSet is not IActionSetInfos infos)
return;
if (!Version.TryParse(radTextBoxControl_Version.Text.Trim(), out Version? version))
version = new Version("1.0.0.0");
infos.Version = version;
infos.IsPublic = radCheckBox_IsPublic.Checked;
UpdateUpdateItem(radTreeView_Sets.SelectedNode);
}
private void UpdateUpdateItem(RadTreeNode item, IActionSetInfos infos)
{
if (item.Tag != infos)
item.Tag = infos;
if (infos is UpdateInfo)
item.Text = string.Format(GeneralLangRes.Node_Update, infos.Version?.ToString() ?? "?");
else if (infos is InstallInfos)
item.Text = string.Format(GeneralLangRes.Node_Install, infos.Version?.ToString() ?? "?");
else
item.Text = infos.Version.ToString();
item.SvgImage = AppGlobals.Symbols.GetSvgImage(infos.IsPublic ? AppSymbols.eye : AppSymbols.invisible, SymbolSize.Small);
}
public void UpdateItem(IActionSetInfos actionSetInfos)
{
RadTreeNode? item = null;
var nodeUpdates = radTreeView_Sets.Nodes["updates"];
foreach (var iitem in nodeUpdates.Nodes)
{
if (item == null && iitem.Value == actionSetInfos)
item = iitem;
}
if (item == null)
InsertUpdateItem(actionSetInfos);
else if (wsInfo?.Workspace.UpdateInfos != null && !wsInfo.Workspace.UpdateInfos.Updates.Contains(actionSetInfos))
item.Remove();
else
UpdateUpdateItem(item);
}
public void UpdateItem(InstallAction action)
{
foreach (var row in radGridView_Actions.Rows)
{
if (row.Tag == action)
UpdateActionRow(row);
}
}
private void LoadMainView()
{
loadingMainView = true;
tableLayoutPanel_ActionSet.Visible = false;
tableLayoutPanel_ActionSetInfo.Visible = false;
if (CurActionSet is IActionSet set)
{
if (set is IActionSetInfos infos)
{
radTextBoxControl_Version.Text = infos.Version?.ToString();
radCheckBox_IsPublic.Checked = infos.IsPublic;
tableLayoutPanel_ActionSetInfo.Visible = true;
}
tableLayoutPanel_ActionSet.Visible = true;
LoadActionSet(set);
}
loadingMainView = false;
}
private void LoadActionSet(IActionSet infos)
{
radGridView_Actions.BeginUpdate();
radGridView_Actions.Rows.Clear();
radGridView_Actions.Columns.Clear();
// Add columns
radGridView_Actions.Columns.AddRange([
new GridViewTextBoxColumn
{
Name = "id",
HeaderText = ActionsListLangRes.Col_Id,
Width = 150,
IsVisible = infos is not UpdateInfo,
IsPinned = true,
},
new GridViewTextBoxColumn
{
Name = "name",
HeaderText = ActionsListLangRes.Col_Name,
Width = 150,
IsVisible = infos is not UpdateInfo,
},
new GridViewTextBoxColumn
{
Name = "inherit",
HeaderText = ActionsListLangRes.Col_InheritFrom,
Width = 150,
IsVisible = infos is UpdateInfo,
IsPinned = true,
},
new GridViewComboBoxColumn
{
Name = "utype",
HeaderText = ActionsListLangRes.Col_UpdateType,
Width = 150,
DataSource = Enum.GetValues<UpdateActionType>(),
IsVisible = infos is UpdateInfo,
},
new GridViewComboBoxColumn
{
Name = "side",
HeaderText = ActionsListLangRes.Col_Side,
Width = 100,
DataSource = Enum.GetValues<Side>(),
},
new GridViewCheckBoxColumn
{
Name = "isextra",
HeaderText = ActionsListLangRes.Col_IsExtra,
Width = 50,
},
new GridViewCheckBoxColumn
{
Name = "iszip",
HeaderText = ActionsListLangRes.Col_IsZip,
Width = 50,
},
new GridViewCheckBoxColumn
{
Name = "isdir",
HeaderText = ActionsListLangRes.Col_IsDir,
Width = 50,
IsVisible = infos is UpdateInfo,
},
new GridViewTextBoxColumn
{
Name = "destpath",
HeaderText = ActionsListLangRes.Col_DestPath,
Width = 250,
},
new GridViewComboBoxColumn
{
Name = "srctype",
HeaderText = ActionsListLangRes.Col_SrcType,
Width = 150,
DataSource = Enum.GetValues<SourceType>(),
},
new GridViewTextBoxColumn
{
Name = "srcowner",
HeaderText = ActionsListLangRes.Col_SrcOwner,
Width = 150,
},
new GridViewTextBoxColumn
{
Name = "srcname",
HeaderText = ActionsListLangRes.Col_SrcName,
Width = 150,
},
new GridViewTextBoxColumn
{
Name = "srcregex",
HeaderText = ActionsListLangRes.Col_SrcRegEx,
Width = 200,
},
new GridViewTextBoxColumn
{
Name = "srctag",
HeaderText = ActionsListLangRes.Col_SrcTag,
Width = 150,
},
new GridViewTextBoxColumn
{
Name = "srcurl",
HeaderText = ActionsListLangRes.Col_SrcUrl,
Width = 350,
},
new GridViewTextBoxColumn
{
Name = "zippath",
HeaderText = ActionsListLangRes.Col_ZipPath,
Width = 200,
},
new GridViewTextBoxColumn
{
Name = "srcpath",
HeaderText = ActionsListLangRes.Col_SrcPath,
Width = 250,
IsVisible = infos is UpdateInfo,
},
new GridViewTextBoxColumn
{
Name = "website",
HeaderText = ActionsListLangRes.Col_Website,
Width = 350,
},
]);
// Add rows
foreach (var action in infos.Actions)
{
var row = radGridView_Actions.Rows.AddNew();
row.Tag = action;
UpdateActionRow(row);
}
radGridView_Actions.EndUpdate();
}
private void UpdateActionRow(GridViewRowInfo row)
{
if (row.Tag is not InstallAction action)
return;
row.Cells["id"].Value = action.Id;
row.Cells["name"].Value = action.Name;
row.Cells["iszip"].Value = action.IsZip;
row.Cells["zippath"].Value = action.ZipPath;
row.Cells["destpath"].Value = action.DestPath;
row.Cells["srcurl"].Value = action.SourceUrl;
row.Cells["srctype"].Value = action.SourceType;
row.Cells["srcowner"].Value = action.SourceOwner;
row.Cells["srcname"].Value = action.SourceName;
row.Cells["srcregex"].Value = action.SourceRegex;
row.Cells["srctag"].Value = action.SourceTag;
row.Cells["side"].Value = action.Side;
row.Cells["isextra"].Value = action.IsExtra;
row.Cells["website"].Value = action.Website;
if (action is not UpdateAction uaction)
return;
row.Cells["inherit"].Value = uaction.InheritFrom; // TODO: Find inherit action and put it in here!
row.Cells["utype"].Value = uaction.Type;
row.Cells["srcpath"].Value = uaction.SrcPath;
row.Cells["isdir"].Value = uaction.IsDirectory;
}
private void Form1_Load(object sender, EventArgs e)
{
LoadRecentWorkspaces();
}
private async void RadMenuItem_OpenNewWorkspace_Click(object? sender, EventArgs e)
{
if (sender is RadMenuItem item && item.Tag is WorkspaceFeature feature)
{
var ws = wsInfo?.Workspace;
if (feature.Configure(ref ws))
await LoadNewWorkspace(ws, feature);
}
}
private async void RadMenuItem_OpenRecentWorkspace_Click(object? sender, EventArgs e)
{
if (sender is RadMenuItem item && item.Tag is RecentFilesItemTag tag && tag.Feature.CreateFromConfig(tag.Config) is IWorkspace workspace)
await LoadNewWorkspace(workspace, tag.Feature);
}
private async void RadMenuItem_WorkspacePreferences_Click(object sender, EventArgs e)
{
if (wsInfo != null)
{
var ws = wsInfo.Workspace;
if (wsInfo.Feature.Configure(ref ws))
await LoadNewWorkspace(ws, wsInfo.Feature);
}
}
private void RadMenuItem_SaveWorkspace_Click(object sender, EventArgs e)
{
wsInfo?.Workspace.Save();
}
private void RadMenuItem_ToolsItem_Click(object? sender, EventArgs e)
{
if (sender is RadMenuItem item && item.Tag is PluginFunction func)
func.Execute(new MainApiParameters(this));
}
private void RadTreeView_Sets_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{
LoadMainView();
}
private void RadGridView_Actions_CellFormatting(object sender, CellFormattingEventArgs e)
{
//var cellElement = e.CellElement;
//var cellInfo = e.Row.Cells[e.Column.Name];
//if (e.Column.Name == "srctype" && cellInfo?.Value is string sourceTypeStr && Enum.Parse<SourceType>(sourceTypeStr) is SourceType sourceType)
//{
// cellElement.SvgImage = sourceType switch
// {
// SourceType.DirectLink => AppGlobals.Symbols.GetSvgImage(AppSymbols.link, SymbolSize.Small),
// SourceType.GitHub => AppGlobals.Symbols.GetSvgImage(AppSymbols.github, SymbolSize.Small),
// _ => null,
// };
// cellElement.DrawImage = cellElement.SvgImage != null;
// cellElement.TextImageRelation = TextImageRelation.ImageBeforeText;
// cellElement.ImageAlignment = ContentAlignment.MiddleLeft;
//}
//else
//{
// cellElement.ResetValue(LightVisualElement.SvgImageProperty, ValueResetFlags.Local);
// cellElement.ResetValue(LightVisualElement.DrawImageProperty, ValueResetFlags.Local);
// cellElement.ResetValue(LightVisualElement.TextImageRelationProperty, ValueResetFlags.Local);
// cellElement.ResetValue(LightVisualElement.ImageAlignmentProperty, ValueResetFlags.Local);
//}
}
private void RadGridView_Actions_CellValueChanged(object sender, GridViewCellEventArgs e)
{
if (e.Row is null)
return;
if (e.Row.Tag is not InstallAction action)
{
if (CurActionSet is UpdateInfo)
action = tempAction ??= new UpdateAction();
else if (CurActionSet is InstallInfos)
action = tempAction ??= new InstallAction();
else
return;
}
var uaction = action as UpdateAction;
var newValue = e.Row.Cells[e.Column.Name].Value;
var colName = e.Column.Name;
if (newValue is bool valueBool)
{
switch (colName)
{
case "iszip":
action.IsZip = valueBool;
break;
case "isextra":
action.IsExtra = valueBool;
break;
case "isdir":
if (uaction is not null)
uaction.IsDirectory = valueBool;
break;
}
}
else
{
var valueStr = newValue as string ?? string.Empty;
var valueNullStr = valueStr.Nullify();
switch (colName)
{
case "id":
action.Id = valueNullStr;
break;
case "name":
action.Name = valueNullStr;
break;
case "zippath":
action.ZipPath = valueNullStr;
break;
case "destpath":
action.DestPath = valueNullStr;
break;
case "srcurl":
action.SourceUrl = valueNullStr;
break;
case "srctype":
action.SourceType = Enum.Parse<SourceType>(valueStr);
break;
case "srcowner":
action.SourceOwner = valueNullStr;
break;
case "srcname":
action.SourceName = valueNullStr;
break;
case "srcregex":
action.SourceRegex = valueNullStr;
break;
case "srctag":
action.SourceTag = valueNullStr;
break;
case "website":
action.Website = valueNullStr;
break;
case "side":
action.Side = Enum.Parse<Side>(valueStr);
break;
case "inherit":
if (uaction is not null)
uaction.InheritFrom = valueNullStr;
break;
case "utype":
if (uaction is not null)
uaction.Type = Enum.Parse<UpdateActionType>(valueStr);
break;
case "srcpath":
if (uaction is not null)
uaction.SrcPath = valueNullStr;
break;
}
}
}
private void RadMenuItem_Updates_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e)
{
radMenuItem_RemoveUpdate.Enabled = radTreeView_Sets.SelectedNode?.Tag is UpdateInfo;
}
private void RadMenuItem_CreateUpdate_Click(object sender, EventArgs e)
{
if (wsInfo?.Workspace.UpdateInfos is null)
return;
var infos = new UpdateInfo
{
Version = wsInfo.Workspace.InstallInfos?.Version,
};
wsInfo.Workspace.UpdateInfos.Updates.Insert(0, infos);
InsertUpdateItem(infos);
}
private void RadMenuItem_RemoveUpdate_Click(object sender, EventArgs e)
{
if (radTreeView_Sets.SelectedNode?.Tag is UpdateInfo infos && wsInfo?.Workspace.UpdateInfos is not null
&& RadMessageBox.Show(MsgBoxLangRes.RemoveUpdate, MsgBoxLangRes.RemoveUpdate_Title, MessageBoxButtons.YesNo, RadMessageIcon.Exclamation).IsYes())
{
wsInfo.Workspace.UpdateInfos.Updates.Remove(infos);
radTreeView_Sets.SelectedNode.Remove();
}
}
private void RadGridView_Actions_UserAddedRow(object sender, GridViewRowEventArgs e)
{
if (tempAction is UpdateAction uaction && CurActionSet is UpdateInfo uinfo)
uinfo.Actions.Add(uaction);
else if (tempAction is InstallAction iaction && CurActionSet is InstallInfos iinfo)
iinfo.Actions.Add(iaction);
tempAction = null;
}
private void RadGridView_Actions_UserDeletingRow(object sender, GridViewRowCancelEventArgs e)
{
foreach (var row in e.Rows)
{
if (row.Tag is UpdateAction uaction && CurActionSet is UpdateInfo uinfo)
uinfo.Actions.Remove(uaction);
else if (row.Tag is InstallAction iaction && CurActionSet is InstallInfos iinfo)
iinfo.Actions.Remove(iaction);
}
}
private void RadGridView_Actions_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
if (e.ContextMenuProvider is GridDataCellElement)
{
e.ContextMenu.Items.Add(new RadMenuSeparatorItem());
PluginFeatureController.Instance.Functions.Get(FeatureTypes.ActionsContextMenu).InsertItemsTo(e.ContextMenu.Items, customClickHandler: RadMenuItem_ToolsItem_Click, insertPrioSplitters: true);
}
}
private void RadTextBoxControl1_TextChanged(object sender, EventArgs e)
{
SaveActionsSet();
}
private void RadCheckBox1_ToggleStateChanged(object sender, StateChangedEventArgs args)
{
SaveActionsSet();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,268 @@
namespace ModpackUpdater.Apps.Manager.Ui;
partial class UpdatesCollectorUi
{
/// <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()
{
var listViewDetailColumn1 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 0", "Name");
var listViewDetailColumn2 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 1", "Current version");
var listViewDetailColumn3 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 2", "New version");
var listViewDetailColumn4 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 0", "Release");
var listViewDetailColumn5 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 1", "Tag");
var resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdatesCollectorUi));
tableLayoutPanel1 = new TableLayoutPanel();
radButton_Continue = new Telerik.WinControls.UI.RadButton();
radProgressBar1 = new Telerik.WinControls.UI.RadProgressBar();
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
tableLayoutPanel2 = new TableLayoutPanel();
radListView_Updates = new Telerik.WinControls.UI.RadListView();
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
tableLayoutPanel3 = new TableLayoutPanel();
radListView_VersionTags = new Telerik.WinControls.UI.RadListView();
radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();
dotsSpinnerWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsSpinnerWaitingBarIndicatorElement();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radButton_Continue).BeginInit();
((System.ComponentModel.ISupportInitialize)radProgressBar1).BeginInit();
((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit();
radSplitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
splitPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radListView_Updates).BeginInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
splitPanel2.SuspendLayout();
tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)radListView_VersionTags).BeginInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar1).BeginInit();
((System.ComponentModel.ISupportInitialize)this).BeginInit();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.ColumnCount = 3;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 200F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
tableLayoutPanel1.Controls.Add(radButton_Continue, 2, 0);
tableLayoutPanel1.Controls.Add(radProgressBar1, 0, 0);
tableLayoutPanel1.Dock = DockStyle.Bottom;
tableLayoutPanel1.Location = new Point(0, 419);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 1;
tableLayoutPanel1.RowStyles.Add(new RowStyle());
tableLayoutPanel1.Size = new Size(800, 30);
tableLayoutPanel1.TabIndex = 0;
//
// radButton_Continue
//
radButton_Continue.Anchor = AnchorStyles.Top | AnchorStyles.Right;
radButton_Continue.DialogResult = DialogResult.OK;
radButton_Continue.ImageAlignment = ContentAlignment.MiddleRight;
radButton_Continue.Location = new Point(647, 3);
radButton_Continue.Name = "radButton_Continue";
radButton_Continue.Size = new Size(150, 24);
radButton_Continue.TabIndex = 0;
radButton_Continue.Text = "Continue";
radButton_Continue.TextAlignment = ContentAlignment.MiddleLeft;
radButton_Continue.TextImageRelation = TextImageRelation.ImageBeforeText;
//
// radProgressBar1
//
radProgressBar1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
radProgressBar1.Location = new Point(3, 3);
radProgressBar1.Name = "radProgressBar1";
radProgressBar1.Size = new Size(194, 24);
radProgressBar1.TabIndex = 2;
radProgressBar1.Visible = false;
//
// radSplitContainer1
//
radSplitContainer1.Controls.Add(splitPanel1);
radSplitContainer1.Controls.Add(splitPanel2);
radSplitContainer1.Dock = DockStyle.Fill;
radSplitContainer1.Location = new Point(0, 0);
radSplitContainer1.Name = "radSplitContainer1";
radSplitContainer1.Size = new Size(800, 419);
radSplitContainer1.TabIndex = 1;
radSplitContainer1.TabStop = false;
//
// splitPanel1
//
splitPanel1.Controls.Add(tableLayoutPanel2);
splitPanel1.Location = new Point(0, 0);
splitPanel1.Name = "splitPanel1";
splitPanel1.Size = new Size(516, 419);
splitPanel1.SizeInfo.AutoSizeScale = new SizeF(0.148241222F, 0F);
splitPanel1.SizeInfo.SplitterCorrection = new Size(118, 0);
splitPanel1.TabIndex = 0;
splitPanel1.TabStop = false;
splitPanel1.Text = "splitPanel1";
//
// tableLayoutPanel2
//
tableLayoutPanel2.ColumnCount = 1;
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
tableLayoutPanel2.Controls.Add(radListView_Updates, 0, 0);
tableLayoutPanel2.Dock = DockStyle.Fill;
tableLayoutPanel2.Location = new Point(0, 0);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel2.Size = new Size(516, 419);
tableLayoutPanel2.TabIndex = 1;
//
// radListView_Updates
//
radListView_Updates.AllowEdit = false;
radListView_Updates.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
listViewDetailColumn1.HeaderText = "Name";
listViewDetailColumn2.HeaderText = "Current version";
listViewDetailColumn2.Width = 120F;
listViewDetailColumn3.HeaderText = "New version";
listViewDetailColumn3.Width = 120F;
radListView_Updates.Columns.AddRange(new Telerik.WinControls.UI.ListViewDetailColumn[] { listViewDetailColumn1, listViewDetailColumn2, listViewDetailColumn3 });
radListView_Updates.ItemSpacing = -1;
radListView_Updates.Location = new Point(3, 3);
radListView_Updates.Name = "radListView_Updates";
radListView_Updates.Size = new Size(510, 413);
radListView_Updates.TabIndex = 0;
radListView_Updates.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
radListView_Updates.SelectedItemChanged += RadListView_Updates_SelectedItemChanged;
radListView_Updates.ItemRemoved += RadListView_Updates_ItemRemoved;
//
// splitPanel2
//
splitPanel2.Controls.Add(tableLayoutPanel3);
splitPanel2.Location = new Point(520, 0);
splitPanel2.Name = "splitPanel2";
splitPanel2.Size = new Size(280, 419);
splitPanel2.SizeInfo.AutoSizeScale = new SizeF(-0.148241192F, 0F);
splitPanel2.SizeInfo.SplitterCorrection = new Size(-118, 0);
splitPanel2.TabIndex = 1;
splitPanel2.TabStop = false;
splitPanel2.Text = "splitPanel2";
//
// tableLayoutPanel3
//
tableLayoutPanel3.ColumnCount = 1;
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
tableLayoutPanel3.Controls.Add(radListView_VersionTags, 0, 0);
tableLayoutPanel3.Dock = DockStyle.Fill;
tableLayoutPanel3.Location = new Point(0, 0);
tableLayoutPanel3.Name = "tableLayoutPanel3";
tableLayoutPanel3.RowCount = 1;
tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel3.Size = new Size(280, 419);
tableLayoutPanel3.TabIndex = 0;
//
// radListView_VersionTags
//
radListView_VersionTags.AllowEdit = false;
radListView_VersionTags.AllowRemove = false;
radListView_VersionTags.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
listViewDetailColumn4.HeaderText = "Release";
listViewDetailColumn5.HeaderText = "Tag";
radListView_VersionTags.Columns.AddRange(new Telerik.WinControls.UI.ListViewDetailColumn[] { listViewDetailColumn4, listViewDetailColumn5 });
radListView_VersionTags.ItemSpacing = -1;
radListView_VersionTags.Location = new Point(3, 3);
radListView_VersionTags.Name = "radListView_VersionTags";
radListView_VersionTags.Size = new Size(274, 413);
radListView_VersionTags.TabIndex = 0;
radListView_VersionTags.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
radListView_VersionTags.SelectedIndexChanged += RadListView_VersionTags_SelectedIndexChanged;
//
// radWaitingBar1
//
radWaitingBar1.AssociatedControl = radListView_Updates;
radWaitingBar1.Location = new Point(220, 171);
radWaitingBar1.Name = "radWaitingBar1";
radWaitingBar1.Size = new Size(70, 70);
radWaitingBar1.TabIndex = 2;
radWaitingBar1.Text = "radWaitingBar1";
radWaitingBar1.WaitingIndicators.Add(dotsSpinnerWaitingBarIndicatorElement1);
radWaitingBar1.WaitingIndicatorSize = new Size(100, 14);
radWaitingBar1.WaitingSpeed = 100;
radWaitingBar1.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsSpinner;
//
// dotsSpinnerWaitingBarIndicatorElement1
//
dotsSpinnerWaitingBarIndicatorElement1.Name = "dotsSpinnerWaitingBarIndicatorElement1";
//
// UpdatesCollectorUi
//
AutoScaleBaseSize = new Size(7, 15);
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 449);
Controls.Add(radSplitContainer1);
Controls.Add(tableLayoutPanel1);
Icon = (Icon)resources.GetObject("$this.Icon");
Name = "UpdatesCollectorUi";
StartPosition = FormStartPosition.CenterParent;
Text = "Find updates";
Shown += UpdatesCollectorUi_Shown;
tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)radButton_Continue).EndInit();
((System.ComponentModel.ISupportInitialize)radProgressBar1).EndInit();
((System.ComponentModel.ISupportInitialize)radSplitContainer1).EndInit();
radSplitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
splitPanel1.ResumeLayout(false);
tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)radListView_Updates).EndInit();
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
splitPanel2.ResumeLayout(false);
tableLayoutPanel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)radListView_VersionTags).EndInit();
((System.ComponentModel.ISupportInitialize)radWaitingBar1).EndInit();
((System.ComponentModel.ISupportInitialize)this).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private TableLayoutPanel tableLayoutPanel1;
private Telerik.WinControls.UI.RadButton radButton_Continue;
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
private Telerik.WinControls.UI.SplitPanel splitPanel1;
private TableLayoutPanel tableLayoutPanel2;
private Telerik.WinControls.UI.SplitPanel splitPanel2;
private TableLayoutPanel tableLayoutPanel3;
private Telerik.WinControls.UI.RadListView radListView_Updates;
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar1;
private Telerik.WinControls.UI.RadListView radListView_VersionTags;
private Telerik.WinControls.UI.RadProgressBar radProgressBar1;
private Telerik.WinControls.UI.DotsSpinnerWaitingBarIndicatorElement dotsSpinnerWaitingBarIndicatorElement1;
}

View File

@@ -0,0 +1,139 @@
using ModpackUpdater.Apps.Manager.Api.Model;
using ModpackUpdater.Manager;
using Telerik.WinControls.UI;
namespace ModpackUpdater.Apps.Manager.Ui;
public partial class UpdatesCollectorUi : RadForm
{
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin)
{
public int NewVersion { get; set; } = 0;
}
public record ModUpdates(List<ModUpdateInfo> List);
private readonly IWorkspace workspace;
private readonly ModpackFactory factory = new();
private readonly InstallAction[] actions;
public ModUpdates? CurrentUpdates { get; private set; }
public ModUpdateInfo? SelectedUpdate => radListView_Updates.SelectedItem?.Value as ModUpdateInfo;
public int SelectedVersion => radListView_VersionTags.SelectedIndex;
public UpdatesCollectorUi(IWorkspace workspace, params InstallAction[] actions)
{
this.workspace = workspace;
this.actions = actions;
InitializeComponent();
radListView_Updates.AutoSizeColumnsMode = ListViewAutoSizeColumnsMode.Fill;
radListView_VersionTags.AutoSizeColumnsMode = ListViewAutoSizeColumnsMode.Fill;
}
private async Task<ModUpdates> FindUpdates()
{
var list = new List<ModUpdateInfo>();
foreach (var action in actions)
{
var updates = await factory.FindUpdates(action, workspace.ModpackConfig?.MinecraftVersion, workspace.ModpackConfig?.ModLoader ?? ModLoader.Any);
BeginInvoke(() =>
{
radProgressBar1.Value1 += 1;
radProgressBar1.Text = $"{radProgressBar1.Value1} / {radProgressBar1.Maximum}";
});
if (updates == null || updates.Length == 0 || updates[0].Value == action.SourceTag)
continue;
list.Add(new(updates, action));
}
return new ModUpdates(list);
}
private void LoadUpdates(ModUpdates updates)
{
radListView_Updates.BeginUpdate();
radListView_Updates.Items.Clear();
foreach (var update in updates.List)
{
var item = new ListViewDataItem(update);
UpdateUpdatesItem(item);
radListView_Updates.Items.Add(item);
}
radListView_Updates.EndUpdate();
}
private static void UpdateUpdatesItem(ListViewDataItem? item)
{
if (item?.Value is not ModUpdateInfo updates)
return;
item[0] = updates.Origin.Name;
item[1] = updates.Origin.SourceTag;
item[2] = updates.AvailableVersions[updates.NewVersion].Value;
}
private void LoadVersions(ModUpdateInfo updates)
{
radListView_VersionTags.BeginUpdate();
radListView_VersionTags.Items.Clear();
foreach (var kvp in updates.AvailableVersions)
{
var item = new ListViewDataItem();
item[0] = kvp.Key;
item[1] = kvp.Value;
radListView_VersionTags.Items.Add(item);
}
radListView_VersionTags.SelectedIndex = updates.NewVersion;
radListView_VersionTags.EndUpdate();
}
private async void UpdatesCollectorUi_Shown(object sender, EventArgs e)
{
radWaitingBar1.StartWaiting();
radProgressBar1.Value1 = 0;
radProgressBar1.Maximum = actions.Length;
radProgressBar1.Text = null;
radProgressBar1.Visible = true;
CurrentUpdates = await FindUpdates();
LoadUpdates(CurrentUpdates);
radProgressBar1.Visible = false;
radWaitingBar1.StopWaiting();
}
private void RadListView_Updates_SelectedItemChanged(object sender, EventArgs e)
{
if (SelectedUpdate is ModUpdateInfo updates)
LoadVersions(updates);
}
private void RadListView_VersionTags_SelectedIndexChanged(object sender, EventArgs e)
{
var newIndex = SelectedVersion;
if (newIndex != -1 && SelectedUpdate is ModUpdateInfo updates)
{
updates.NewVersion = newIndex;
UpdateUpdatesItem(radListView_Updates.SelectedItem);
}
}
private void RadListView_Updates_ItemRemoved(object sender, ListViewItemEventArgs e)
{
if (e.Item?.Value is ModUpdateInfo update && CurrentUpdates is not null && CurrentUpdates.List.Contains(update))
CurrentUpdates.List.Remove(update);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="TelerikWinFormsThemeName" value="Windows11CompactDark" />
</appSettings>
</configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@@ -0,0 +1,24 @@
using ModpackUpdater.Apps.Manager;
using Pilz.UI.WinForms.Telerik.Dialogs;
using Pilz.UI.WinForms.Telerik.Symbols;
using Pilz.UI.WinForms.Telerik.Theming;
using Telerik.WinControls.Themes;
namespace ModpackUpdater.Apps;
public static class AppGlobals
{
public static IRadSymbolFactory<AppSymbols> Symbols { get; } = new AppSymbolFactory();
public static void Initialize()
{
ThemeHelper.ApplyApplicationTheme(new ThemeDefinition(ApplicationTheme.Auto, HighContrastMode.Auto), n => n.Theme switch
{
ApplicationTheme.Light => new Windows11CompactTheme(),
ApplicationTheme.Gray or ApplicationTheme.Dark => new Windows11CompactDarkTheme(),
_ => throw new NotImplementedException(),
});
RadFlyoutBase.ConfirmSvg = Symbols.GetSvgImage(AppSymbols.checkmark, Pilz.UI.Symbols.SymbolSize.Small);
RadFlyoutBase.CancelSvg = Symbols.GetSvgImage(AppSymbols.cancel, Pilz.UI.Symbols.SymbolSize.Small);
}
}

View File

@@ -0,0 +1,17 @@
using Pilz.UI.WinForms.Telerik.Symbols;
using System.Reflection;
namespace ModpackUpdater.Apps.Manager;
internal class AppSymbolFactory : RadSymbolFactory<AppSymbols>
{
public override Assembly GetImageResourceAssembly()
{
return typeof(AppSymbols).Assembly;
}
public override string GetImageRessourcePath(AppSymbols svgImage)
{
return $"{typeof(AppSymbols).Namespace}.Symbols.{svgImage}.svg";
}
}

View File

@@ -0,0 +1,39 @@
namespace ModpackUpdater.Apps;
public enum AppSymbols
{
checkmark,
close,
delete,
done,
download_from_ftp,
general_warning_sign,
opened_folder,
paste,
refresh,
reload,
save,
services,
software_installer,
update_done,
wrench,
github,
gitlab,
cancel,
tools,
workspace,
new_window,
time_machine,
settings,
link,
add,
edit,
remove,
search,
eye,
invisible,
heart_with_pulse,
broom,
renew,
list_view,
}

View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Symbols\*.svg" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Pilz.UI" Version="3.0.0" />
<PackageReference Include="Pilz.UI.WinForms.Telerik.Symbols" Version="1.2.1" />
<PackageReference Include="UI.for.WinForms.Common" Version="2025.2.612-preview" />
<PackageReference Include="UI.for.WinForms.Themes" Version="2025.2.612-preview" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<linearGradient id="YT1YFZGinBDJ1OgDZNBs_a" x1="9.858" x2="38.142" y1="9.858" y2="38.142" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#21ad64" />
<stop offset="1" stop-color="#088242" />
</linearGradient>
<path fill="url(#YT1YFZGinBDJ1OgDZNBs_a)" d="M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z" />
<path d="M34,21h-7v-7c0-1.105-0.895-2-2-2h-2c-1.105,0-2,0.895-2,2v7h-7c-1.105,0-2,0.895-2,2v2c0,1.105,0.895,2,2,2h7v7c0,1.105,0.895,2,2,2h2c1.105,0,2-0.895,2-2v-7h7c1.105,0,2-0.895,2-2v-2C36,21.895,35.105,21,34,21z" opacity=".05" />
<path d="M34,21.5h-7.5V14c0-0.828-0.672-1.5-1.5-1.5h-2c-0.828,0-1.5,0.672-1.5,1.5v7.5H14c-0.828,0-1.5,0.672-1.5,1.5v2c0,0.828,0.672,1.5,1.5,1.5h7.5V34c0,0.828,0.672,1.5,1.5,1.5h2c0.828,0,1.5-0.672,1.5-1.5v-7.5H34c0.828,0,1.5-0.672,1.5-1.5v-2C35.5,22.172,34.828,21.5,34,21.5z" opacity=".07" />
<path fill="#fff" d="M23,13h2c0.552,0,1,0.448,1,1v20c0,0.552-0.448,1-1,1h-2c-0.552,0-1-0.448-1-1V14C22,13.448,22.448,13,23,13z" />
<path fill="#fff" d="M35,23v2c0,0.552-0.448,1-1,1H14c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1h20C34.552,22,35,22.448,35,23z" />
</svg>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<linearGradient id="_mrS6zdlYNXjKXndQNmOka" x1="24" x2="24" y1="1.206" y2="19.206" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#eba600" />
<stop offset="1" stop-color="#c28200" />
</linearGradient>
<path fill="url(#_mrS6zdlYNXjKXndQNmOka)" d="M27,19h-6V4c0-1.657,1.343-3,3-3h0c1.657,0,3,1.343,3,3V19z" />
<rect width="6" height="5" x="21" y="13" fill="#16528c" />
<linearGradient id="_mrS6zdlYNXjKXndQNmOkb" x1="24" x2="24" y1="44.265" y2="23.765" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffcf54" />
<stop offset=".261" stop-color="#fdcb4d" />
<stop offset=".639" stop-color="#f7c13a" />
<stop offset="1" stop-color="#f0b421" />
</linearGradient>
<path fill="url(#_mrS6zdlYNXjKXndQNmOkb)" d="M38,24H10C8.706,34.353,6,43,6,43s7.647,2,18,2s18-2,18-2S39.294,34.353,38,24z" />
<linearGradient id="_mrS6zdlYNXjKXndQNmOkc" x1="16.669" x2="16.669" y1="44.687" y2="34.602" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#eba600" />
<stop offset="1" stop-color="#c28200" />
</linearGradient>
<path fill="url(#_mrS6zdlYNXjKXndQNmOkc)" d="M18,44.778V34c-0.471,3.767-1.809,7.705-2.663,10.546C16.18,44.633,17.074,44.711,18,44.778z" />
<linearGradient id="_mrS6zdlYNXjKXndQNmOkd" x1="32.392" x2="32.392" y1="44.307" y2="29.756" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#eba600" />
<stop offset="1" stop-color="#c28200" />
</linearGradient>
<path fill="url(#_mrS6zdlYNXjKXndQNmOkd)" d="M33.784,44.42C32.922,41.117,31.747,34.974,31,29v15.701C31.982,44.619,32.907,44.523,33.784,44.42z" />
<linearGradient id="_mrS6zdlYNXjKXndQNmOke" x1="22.142" x2="25.491" y1="15.701" y2="27.791" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#0d61a9" />
<stop offset="1" stop-color="#16528c" />
</linearGradient>
<path fill="url(#_mrS6zdlYNXjKXndQNmOke)" d="M38,24H10v-2.77c0-1.369,0.919-2.57,2.247-2.905C14.551,17.744,18.565,17,24,17s9.449,0.744,11.753,1.325C37.081,18.659,38,19.861,38,21.23V24z" />
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="wRKXFJsqHCxLE9yyOYHkza" x1="9.858" x2="38.142" y1="9.858" y2="38.142" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f44f5a"/><stop offset=".443" stop-color="#ee3d4a"/><stop offset="1" stop-color="#e52030"/></linearGradient><path fill="url(#wRKXFJsqHCxLE9yyOYHkza)" d="M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z"/><path d="M33.192,28.95L28.243,24l4.95-4.95c0.781-0.781,0.781-2.047,0-2.828l-1.414-1.414c-0.781-0.781-2.047-0.781-2.828,0L24,19.757l-4.95-4.95c-0.781-0.781-2.047-0.781-2.828,0l-1.414,1.414c-0.781,0.781-0.781,2.047,0,2.828l4.95,4.95l-4.95,4.95c-0.781,0.781-0.781,2.047,0,2.828l1.414,1.414c0.781,0.781,2.047,0.781,2.828,0l4.95-4.95l4.95,4.95c0.781,0.781,2.047,0.781,2.828,0l1.414-1.414C33.973,30.997,33.973,29.731,33.192,28.95z" opacity=".05"/><path d="M32.839,29.303L27.536,24l5.303-5.303c0.586-0.586,0.586-1.536,0-2.121l-1.414-1.414c-0.586-0.586-1.536-0.586-2.121,0L24,20.464l-5.303-5.303c-0.586-0.586-1.536-0.586-2.121,0l-1.414,1.414c-0.586,0.586-0.586,1.536,0,2.121L20.464,24l-5.303,5.303c-0.586,0.586-0.586,1.536,0,2.121l1.414,1.414c0.586,0.586,1.536,0.586,2.121,0L24,27.536l5.303,5.303c0.586,0.586,1.536,0.586,2.121,0l1.414-1.414C33.425,30.839,33.425,29.889,32.839,29.303z" opacity=".07"/><path fill="#fff" d="M31.071,15.515l1.414,1.414c0.391,0.391,0.391,1.024,0,1.414L18.343,32.485c-0.391,0.391-1.024,0.391-1.414,0l-1.414-1.414c-0.391-0.391-0.391-1.024,0-1.414l14.142-14.142C30.047,15.124,30.681,15.124,31.071,15.515z"/><path fill="#fff" d="M32.485,31.071l-1.414,1.414c-0.391,0.391-1.024,0.391-1.414,0L15.515,18.343c-0.391-0.391-0.391-1.024,0-1.414l1.414-1.414c0.391-0.391,1.024-0.391,1.414,0l14.142,14.142C32.876,30.047,32.876,30.681,32.485,31.071z"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="IMoH7gpu5un5Dx2vID39Ra" x1="9.858" x2="38.142" y1="9.858" y2="38.142" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9dffce"/><stop offset="1" stop-color="#50d18d"/></linearGradient><path fill="url(#IMoH7gpu5un5Dx2vID39Ra)" d="M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z"/><linearGradient id="IMoH7gpu5un5Dx2vID39Rb" x1="13" x2="36" y1="24.793" y2="24.793" gradientUnits="userSpaceOnUse"><stop offset=".824" stop-color="#135d36"/><stop offset=".931" stop-color="#125933"/><stop offset="1" stop-color="#11522f"/></linearGradient><path fill="url(#IMoH7gpu5un5Dx2vID39Rb)" d="M21.293,32.707l-8-8c-0.391-0.391-0.391-1.024,0-1.414l1.414-1.414c0.391-0.391,1.024-0.391,1.414,0L22,27.758l10.879-10.879c0.391-0.391,1.024-0.391,1.414,0l1.414,1.414c0.391,0.391,0.391,1.024,0,1.414l-13,13C22.317,33.098,21.683,33.098,21.293,32.707z"/></svg>

After

Width:  |  Height:  |  Size: 954 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="hbE9Evnj3wAjjA2RX0We2a" x1="7.534" x2="27.557" y1="7.534" y2="27.557" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f44f5a"/><stop offset=".443" stop-color="#ee3d4a"/><stop offset="1" stop-color="#e52030"/></linearGradient><path fill="url(#hbE9Evnj3wAjjA2RX0We2a)" d="M42.42,12.401c0.774-0.774,0.774-2.028,0-2.802L38.401,5.58c-0.774-0.774-2.028-0.774-2.802,0L24,17.179L12.401,5.58c-0.774-0.774-2.028-0.774-2.802,0L5.58,9.599c-0.774,0.774-0.774,2.028,0,2.802L17.179,24L5.58,35.599c-0.774,0.774-0.774,2.028,0,2.802l4.019,4.019c0.774,0.774,2.028,0.774,2.802,0L42.42,12.401z"/><linearGradient id="hbE9Evnj3wAjjA2RX0We2b" x1="27.373" x2="40.507" y1="27.373" y2="40.507" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8142e"/><stop offset=".179" stop-color="#ba1632"/><stop offset=".243" stop-color="#c21734"/></linearGradient><path fill="url(#hbE9Evnj3wAjjA2RX0We2b)" d="M24,30.821L35.599,42.42c0.774,0.774,2.028,0.774,2.802,0l4.019-4.019c0.774-0.774,0.774-2.028,0-2.802L30.821,24L24,30.821z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="nyvBozV7VK1PdF3LtMmOna" x1="18.405" x2="33.814" y1="10.91" y2="43.484" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#nyvBozV7VK1PdF3LtMmOna)" d="M39,10l-2.835,31.181C36.072,42.211,35.208,43,34.174,43H13.826c-1.034,0-1.898-0.789-1.992-1.819L9,10H39z"/><path fill="#0176d0" d="M32,7c0-1.105-0.895-2-2-2H18c-1.105,0-2,0.895-2,2c0,0,0,0.634,0,1h16C32,7.634,32,7,32,7z"/><path fill="#007ad9" d="M7,9.886L7,9.886C7,9.363,7.358,8.912,7.868,8.8C10.173,8.293,16.763,7,24,7s13.827,1.293,16.132,1.8C40.642,8.912,41,9.363,41,9.886v0C41,10.501,40.501,11,39.886,11H8.114C7.499,11,7,10.501,7,9.886z"/></svg>

After

Width:  |  Height:  |  Size: 769 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="HoiJCu43QtshzIrYCxOfCa" x1="21.241" x2="3.541" y1="39.241" y2="21.541" gradientUnits="userSpaceOnUse"><stop offset=".108" stop-color="#0d7044"/><stop offset=".433" stop-color="#11945a"/></linearGradient><path fill="url(#HoiJCu43QtshzIrYCxOfCa)" d="M16.599,41.42L1.58,26.401c-0.774-0.774-0.774-2.028,0-2.802l4.019-4.019c0.774-0.774,2.028-0.774,2.802,0L23.42,34.599c0.774,0.774,0.774,2.028,0,2.802l-4.019,4.019C18.627,42.193,17.373,42.193,16.599,41.42z"/><linearGradient id="HoiJCu43QtshzIrYCxOfCb" x1="-15.77" x2="26.403" y1="43.228" y2="43.228" gradientTransform="rotate(134.999 21.287 38.873)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2ac782"/><stop offset="1" stop-color="#21b876"/></linearGradient><path fill="url(#HoiJCu43QtshzIrYCxOfCb)" d="M12.58,34.599L39.599,7.58c0.774-0.774,2.028-0.774,2.802,0l4.019,4.019c0.774,0.774,0.774,2.028,0,2.802L19.401,41.42c-0.774,0.774-2.028,0.774-2.802,0l-4.019-4.019C11.807,36.627,11.807,35.373,12.58,34.599z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="U9JenDUaYvGOzlbpKqZV2a" x1="23" x2="23" y1="548.505" y2="556.288" gradientTransform="translate(0 -541.78)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#eba600"/><stop offset="1" stop-color="#c28200"/></linearGradient><path fill="url(#U9JenDUaYvGOzlbpKqZV2a)" d="M22.414,10.414l-2.536-2.536C19.316,7.316,18.553,7,17.757,7H5C3.895,7,3,7.895,3,9v8l2,22h38V13l-18.569-2h-0.603C23.298,11,22.789,10.789,22.414,10.414z"/><linearGradient id="U9JenDUaYvGOzlbpKqZV2b" x1="24" x2="24" y1="552.634" y2="582.763" gradientTransform="translate(0 -541.78)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd869"/><stop offset="1" stop-color="#fec52b"/></linearGradient><path fill="url(#U9JenDUaYvGOzlbpKqZV2b)" d="M20.586,14.414l3.268-3.268C23.947,11.053,24.074,11,24.207,11H28l17,17v11c0,1.105-0.895,2-2,2H5c-1.105,0-2-0.895-2-2V15.5C3,15.224,3.224,15,3.5,15h15.672C19.702,15,20.211,14.789,20.586,14.414z"/><path d="M32.24,39.34L30.75,41h-13.5l-1.49-1.66c-0.54-0.6-0.67-1.42-0.34-2.15c0.32-0.74,1.02-1.19,1.83-1.19H20v-9c0-1.1,0.9-2,2-2h4c1.1,0,2,0.9,2,2v9h2.75c0.81,0,1.51,0.45,1.83,1.19C32.91,37.92,32.78,38.74,32.24,39.34z" opacity=".05"/><path d="M31.87,39l-1.8,2H17.93l-1.8-2c-0.4-0.44-0.5-1.06-0.25-1.61c0.24-0.55,0.76-0.89,1.37-0.89h3.25V27c0-0.83,0.67-1.5,1.5-1.5h4c0.83,0,1.5,0.67,1.5,1.5v9.5h3.25c0.61,0,1.13,0.34,1.37,0.89C32.37,37.94,32.27,38.56,31.87,39z" opacity=".07"/><path d="M45,22.99v6.98C44.66,29.99,44.33,30,44,30c-4.78,0-9.3-1.88-12.72-5.28c-3.62-3.64-5.53-8.63-5.25-13.72h6.98v0.04c-0.11,3.03,0.99,6.03,3.02,8.23C38.2,21.64,41.29,23,44.5,23c0.16,0,0.3,0,0.44-0.01H45z" opacity=".05"/><path d="M45,23.49v5.98c-0.34,0.02-0.67,0.03-1,0.03c-4.65,0-9.04-1.82-12.36-5.14c-3.53-3.53-5.39-8.4-5.11-13.36h5.98v0.02c-0.12,3.16,1.03,6.29,3.15,8.59c2.27,2.47,5.49,3.89,8.84,3.89h0.03c0.14,0,0.29,0,0.44-0.01H45z" opacity=".07"/><linearGradient id="U9JenDUaYvGOzlbpKqZV2c" x1="27" x2="45" y1="27.89" y2="27.89" gradientTransform="matrix(1 0 0 -1 0 47.89)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7819a2"/><stop offset="1" stop-color="#771aa9"/></linearGradient><path fill="url(#U9JenDUaYvGOzlbpKqZV2c)" d="M31.99,24.01c-3.298-3.309-5.254-7.936-4.961-13.01h4.981c-0.12,3.29,1.05,6.53,3.28,8.95C37.65,22.52,41.01,24,44.5,24c0.16,0,0.33,0,0.5-0.01v4.981C39.926,29.264,35.299,27.308,31.99,24.01z"/><path fill="#a238c2" d="M31,11.5c0-0.17,0-0.34,0.01-0.5h5.01c-0.13,2.3,0.67,4.56,2.21,6.25C39.84,19,42.12,20,44.5,20c0.17,0,0.33,0,0.5-0.02v5.01C44.84,25,44.67,25,44.5,25C37.06,25,31,18.94,31,11.5z"/><path fill="#ba54d9" d="M35,11.5c0-0.17,0-0.33,0.01-0.5h5.08c0.2,1.26,0.8,2.38,1.67,3.24c0.86,0.87,1.98,1.47,3.24,1.67v5.08C44.83,21,44.67,21,44.5,21C39.26,21,35,16.74,35,11.5z"/><path fill="#c767e5" d="M39.021,11.008c0.003-0.003,0.005-0.005,0.009-0.008H43c1.105,0,2,0.893,2,1.998v3.944c-0.004,0.036-0.004,0.036-0.008,0.037C41.565,17.276,38.724,14.436,39.021,11.008z"/><linearGradient id="U9JenDUaYvGOzlbpKqZV2d" x1="-101.914" x2="-91.369" y1="507.75" y2="488.785" gradientTransform="matrix(1 0 0 -1 120 533.89)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#007ad9"/><stop offset="1" stop-color="#2aa4f4"/></linearGradient><path fill="url(#U9JenDUaYvGOzlbpKqZV2d)" d="M30.755,37H27V27c0-0.552-0.448-1-1-1h-4c-0.552,0-1,0.448-1,1v10h-3.755c-0.866,0-1.322,1.025-0.743,1.669l6.011,6.679c0.794,0.883,2.179,0.883,2.973,0l6.011-6.679C32.077,38.025,31.62,37,30.755,37z"/></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<path fill="#c94f60" d="M42.583,9.067l-3.651-3.65c-0.555-0.556-1.459-0.556-2.015,0l-1.718,1.72l5.664,5.664l1.72-1.718C43.139,10.526,43.139,9.625,42.583,9.067" />
<path fill="#f0f0f0" d="M6.905,35.43L5,43l7.571-1.906l0.794-6.567L6.905,35.43z" />
<path fill="#edbe00" d="M36.032,17.632l-23.46,23.461l-5.665-5.665l23.46-23.461L36.032,17.632z" />
<linearGradient id="YoPixpDbHWOyk~b005eF1a" x1="35.612" x2="35.612" y1="7.494" y2="17.921" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#dedede" />
<stop offset="1" stop-color="#d6d6d6" />
</linearGradient>
<path fill="url(#YoPixpDbHWOyk~b005eF1a)" d="M30.363,11.968l4.832-4.834l5.668,5.664l-4.832,4.834L30.363,11.968z" />
<path fill="#787878" d="M5.965,39.172L5,43l3.827-0.965L5.965,39.172z" />
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><radialGradient id="q52hzhdzvMMZA5gZkbbYUa" cx="24.134" cy="19.042" r="21.223" gradientTransform="matrix(1.05 0 0 1.0625 -1.2 -1.563)" gradientUnits="userSpaceOnUse"><stop offset=".55" stop-color="#e4e4e6"/><stop offset=".73" stop-color="#e1e2e4"/><stop offset=".854" stop-color="#d8dadc"/><stop offset=".961" stop-color="#c9cdcf"/><stop offset="1" stop-color="#c1c6c9"/></radialGradient><ellipse cx="24" cy="24" fill="url(#q52hzhdzvMMZA5gZkbbYUa)" rx="21" ry="17"/><linearGradient id="q52hzhdzvMMZA5gZkbbYUb" x1="15.089" x2="33.163" y1="12.089" y2="30.163" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><circle cx="24" cy="21" r="14" fill="url(#q52hzhdzvMMZA5gZkbbYUb)"/><radialGradient id="q52hzhdzvMMZA5gZkbbYUc" cx="19.876" cy="10.758" r="18.169" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4b4b4b"/><stop offset=".531" stop-color="#393939"/><stop offset="1" stop-color="#252525"/></radialGradient><circle cx="24" cy="21" r="7" fill="url(#q52hzhdzvMMZA5gZkbbYUc)"/><circle cx="19" cy="16" r="2" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" data-name="Слой 1" viewBox="0 0 48 48"><defs><linearGradient id="Oks0BVGeIiW4yZ9DYg69Ba" x1="10.531" x2="27.482" y1="4.992" y2="51.563" data-name="Безымянный градиент 138" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6d6d6d"/><stop offset=".126" stop-color="#626262"/><stop offset=".987" stop-color="#464646"/><stop offset=".998" stop-color="#454545"/></linearGradient><linearGradient id="Oks0BVGeIiW4yZ9DYg69Bb" x1="18.357" x2="24.573" y1="-1872.995" y2="-1908.249" data-name="Безымянный градиент 134" gradientTransform="matrix(1 0 0 -1 0 -1864)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffda1c"/><stop offset="1" stop-color="#feb705"/></linearGradient><radialGradient id="Oks0BVGeIiW4yZ9DYg69Bc" cx="18.189" cy="-1948.781" r="22.363" data-name="Безымянный градиент 133" gradientTransform="matrix(1 0 0 -1 0 -1930)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4b4b4b"/><stop offset=".531" stop-color="#393939"/><stop offset="1" stop-color="#252525"/></radialGradient></defs><path fill="url(#Oks0BVGeIiW4yZ9DYg69Ba)" d="M24.00043,4A1.96747,1.96747,0,0,0,22.2731,5.00878L1.82176,41.00568A2.00136,2.00136,0,0,0,3.54909,44H44.45078a2.001,2.001,0,0,0,1.72733-2.99432L25.72776,5.00878A1.96745,1.96745,0,0,0,24.00043,4Z"/><polygon fill="url(#Oks0BVGeIiW4yZ9DYg69Bb)" points="5 41 24.001 8 43 41 5 41"/><path fill="url(#Oks0BVGeIiW4yZ9DYg69Bc)" d="M24.014,39a2.55181,2.55181,0,0,1-1.812-.666,2.124,2.124,0,0,1-.714-1.613,2.055,2.055,0,0,1,.721-1.62,2.6383,2.6383,0,0,1,1.805-.631,2.56628,2.56628,0,0,1,1.798.638,2.08812,2.08812,0,0,1,.7,1.613,2.13406,2.13406,0,0,1-.693,1.633A2.54451,2.54451,0,0,1,24.014,39Zm2.222-19.279-.481,12.175a.69392.69392,0,0,1-.693.666H22.883a.6936.6936,0,0,1-.693-.668L21.735,19.72a.69384.69384,0,0,1,.693-.72h3.116A.69267.69267,0,0,1,26.236,19.721Z"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="32" height="32">
<path fill="#e53935" d="M24 43L16 20 32 20z" />
<path fill="#ff7043" d="M24 43L42 20 32 20z" />
<path fill="#e53935" d="M37 5L42 20 32 20z" />
<path fill="#ffa726" d="M24 43L42 20 45 28z" />
<path fill="#ff7043" d="M24 43L6 20 16 20z" />
<path fill="#e53935" d="M11 5L6 20 16 20z" />
<path fill="#ffa726" d="M24 43L6 20 3 28z" />
</svg>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<linearGradient id="o5BohGJy0xHajxWpIzsAMa" x1="15.595" x2="35.333" y1="4.867" y2="35.264" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#f44f5a" />
<stop offset=".443" stop-color="#ee3d4a" />
<stop offset="1" stop-color="#e52030" />
</linearGradient>
<path fill="url(#o5BohGJy0xHajxWpIzsAMa)" d="M24,12.25c0,0,4.701-5.25,10.5-5.25S45,11.765,45,17.5c0,9.869-15.466,21.138-19.853,24.135c-0.695,0.475-1.599,0.475-2.294,0C18.466,38.638,3,27.369,3,17.5C3,11.765,7.701,7,13.5,7S24,12.25,24,12.25z" />
<path fill="#ffebee" d="M26.67,28.236c0.111,0.362,0.419,0.63,0.793,0.691c0.369,0.058,0.751-0.095,0.973-0.401L30.261,26H34.5c0.553,0,1-0.448,1-1s-0.447-1-1-1h-4.75c-0.321,0-0.622,0.154-0.811,0.415l-0.951,1.316l-1.783-5.767c-0.126-0.41-0.5-0.693-0.929-0.704c-0.425-0.017-0.816,0.251-0.965,0.654l-3.192,8.659L19.24,15.483c-0.065-0.456-0.434-0.807-0.891-0.853c-0.466-0.049-0.888,0.227-1.042,0.66l-3.214,9.045l-2.641-3.896c-0.198-0.291-0.536-0.461-0.882-0.438c-0.351,0.019-0.665,0.22-0.829,0.529L7.898,24H4.903c0.365,0.671,0.772,1.338,1.216,2H8.5c0.37,0,0.71-0.204,0.883-0.531l1.347-2.534l2.817,4.158c0.211,0.312,0.571,0.481,0.955,0.431c0.374-0.047,0.689-0.302,0.815-0.657l2.519-7.09l1.865,12.99c0.065,0.453,0.43,0.804,0.885,0.853c0.036,0.003,0.071,0.005,0.106,0.005c0.414,0,0.791-0.258,0.938-0.654l3.537-9.595L26.67,28.236z" />
<path fill="#ffebee" d="M35,23c-1.105,0-2,0.895-2,2s0.895,2,2,2s2-0.895,2-2S36.105,23,35,23z" />
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><radialGradient id="tx8Zca041q9EWw3FdAYMda" cx="-7.914" cy="526.782" r="21.223" gradientTransform="matrix(1.05 0 0 -1.0625 32.45 578.375)" gradientUnits="userSpaceOnUse"><stop offset=".55" stop-color="#e4e4e6"/><stop offset=".73" stop-color="#e1e2e4"/><stop offset=".854" stop-color="#d8dadc"/><stop offset=".961" stop-color="#c9cdcf"/><stop offset="1" stop-color="#c1c6c9"/></radialGradient><ellipse cx="24" cy="24" fill="url(#tx8Zca041q9EWw3FdAYMda)" rx="21" ry="17"/><linearGradient id="tx8Zca041q9EWw3FdAYMdb" x1="15.089" x2="33.163" y1="513.911" y2="495.837" gradientTransform="matrix(1 0 0 -1 0 526)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><circle cx="24" cy="21" r="14" fill="url(#tx8Zca041q9EWw3FdAYMdb)"/><radialGradient id="tx8Zca041q9EWw3FdAYMdc" cx="19.876" cy="515.242" r="18.169" gradientTransform="matrix(1 0 0 -1 0 526)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4b4b4b"/><stop offset=".531" stop-color="#393939"/><stop offset="1" stop-color="#252525"/></radialGradient><circle cx="24" cy="21" r="7" fill="url(#tx8Zca041q9EWw3FdAYMdc)"/><circle cx="19" cy="16" r="2" fill="#fff"/><path fill="#e52030" d="M44.888,42.734L5.266,3.112c-0.149-0.149-0.39-0.149-0.539,0L3.112,4.728c-0.149,0.149-0.149,0.39,0,0.539l39.622,39.622c0.149,0.149,0.39,0.149,0.539,0l1.616-1.616C45.037,43.124,45.037,42.882,44.888,42.734z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<path fill="#0078d4" d="M7.782,40.218c3.71,3.71,9.725,3.71,13.435,0c1.733-1.733,5.267-5.267,7-7c3.71-3.71,3.71-9.725,0-13.435c-3.71-3.71-9.725-3.71-13.435,0c-1.733,1.733-5.267,5.267-7,7C4.073,30.492,4.073,36.508,7.782,40.218z M11.318,30.318c1.02-1.02,6.237-6.237,7-7c1.757-1.757,4.607-1.757,6.364,0c1.757,1.757,1.757,4.607,0,6.364c-0.763,0.763-5.98,5.98-7,7c-1.757,1.757-4.607,1.757-6.364,0C9.561,34.925,9.561,32.075,11.318,30.318z" />
<path d="M23.609,22.509c0,0-0.609-1.509,0.77-3.131l1.369-1.37c-3.165-1.583-7.022-1.285-9.926,0.888C15,22,16.197,25.439,16.197,25.439c1.04-1.04,1.872-1.872,2.121-2.121C19.758,21.879,21.851,21.613,23.609,22.509z" opacity=".05" />
<path d="M22.827,22.193c-0.082-0.664-0.178-2.024,1.022-3.345c0.07-0.07,0.92-0.94,1.143-1.163c-2.642-1.109-5.689-0.896-8.192,0.57c-0.849,2.578-0.317,5.522,0,6.582c0.743-0.743,1.324-1.324,1.519-1.519C19.548,22.088,21.254,21.714,22.827,22.193z" opacity=".07" />
<path fill="#1b9de2" d="M40.218,7.782c-3.71-3.71-9.725-3.71-13.435,0c-1.733,1.733-5.267,5.267-7,7c-3.71,3.71-3.71,9.725,0,13.435c3.71,3.71,9.725,3.71,13.435,0c1.733-1.733,5.267-5.267,7-7C43.927,17.508,43.927,11.492,40.218,7.782z M36.682,17.682c-1.02,1.02-6.237,6.237-7,7c-1.757,1.757-4.607,1.757-6.364,0c-1.757-1.757-1.757-4.607,0-6.364c0.763-0.763,5.98-5.98,7-7c1.757-1.757,4.607-1.757,6.364,0C38.439,13.075,38.439,15.925,36.682,17.682z" />
<path d="M24.386,25.476c0,0,0.614,1.524-0.765,3.146l-1.369,1.37c3.165,1.583,7.022,1.285,9.926-0.888C33,26,31.803,22.561,31.803,22.561c-1.04,1.04-1.872,1.872-2.121,2.121C28.242,26.121,26.09,26.395,24.386,25.476z" opacity=".05" />
<path d="M25.188,25.806c0.082,0.664,0.163,2.025-1.037,3.346c-0.07,0.07-0.92,0.92-1.143,1.143c2.642,1.109,5.718,0.897,8.196-0.628c0.849-2.578,0.314-5.445-0.004-6.504c-0.743,0.743-1.324,1.324-1.519,1.519C28.452,25.912,26.673,26.271,25.188,25.806z" opacity=".07" />
<path fill="#0078d4" d="M24.682,23.318c1.757,1.757,1.757,4.607,0,6.364c-0.763,0.763-5.98,5.98-7,7l3.536,3.536c1.733-1.733,5.267-5.267,7-7c3.71-3.71,3.71-9.725,0-13.435L24.682,23.318z" />
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill="#B2EBF2" d="M7 4H41V44H7z"/><path fill="#00ACC1" d="M13 26H17V30H13zM13 18H17V22H13zM13 34H17V38H13zM13 10H17V14H13zM21 26H35V30H21zM21 18H35V22H21zM21 34H35V38H21zM21 10H35V14H21z"/></svg>

After

Width:  |  Height:  |  Size: 284 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="ssYo2_G6_lrXAD6cTwfU1a" x1="4.614" x2="42.936" y1="110.259" y2="102.467" gradientTransform="matrix(1 0 0 -1 0 118)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0077d2"/><stop offset="1" stop-color="#0b59a2"/></linearGradient><path fill="url(#ssYo2_G6_lrXAD6cTwfU1a)" d="M44,10v5H4v-5c0-1.1,0.9-2,2-2h36C43.1,8,44,8.9,44,10z"/><linearGradient id="ssYo2_G6_lrXAD6cTwfU1b" x1="13.275" x2="31.78" y1="107.204" y2="80.436" gradientTransform="matrix(1 0 0 -1 0 118)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7dd8f3"/><stop offset="1" stop-color="#45b0d0"/></linearGradient><path fill="url(#ssYo2_G6_lrXAD6cTwfU1b)" d="M4,38V14h40v24c0,1.1-0.9,2-2,2H6C4.9,40,4,39.1,4,38z"/><path d="M23,36c-1.103,0-2-0.897-2-2v-4h-4c-1.103,0-2-0.897-2-2v-2c0-1.103,0.897-2,2-2h4v-4c0-1.103,0.897-2,2-2h2c1.103,0,2,0.897,2,2v4h4c1.103,0,2,0.897,2,2v2c0,1.103-0.897,2-2,2h-4v4c0,1.103-0.897,2-2,2H23z" opacity=".05"/><path d="M23,35.5c-0.827,0-1.5-0.673-1.5-1.5v-4.5H17c-0.827,0-1.5-0.673-1.5-1.5v-2c0-0.827,0.673-1.5,1.5-1.5h4.5V20c0-0.827,0.673-1.5,1.5-1.5h2c0.827,0,1.5,0.673,1.5,1.5v4.5H31c0.827,0,1.5,0.673,1.5,1.5v2c0,0.827-0.673,1.5-1.5,1.5h-4.5V34c0,0.827-0.673,1.5-1.5,1.5H23z" opacity=".07"/><path fill="#fff" d="M31,25h-5v-5c0-0.552-0.448-1-1-1h-2c-0.552,0-1,0.448-1,1v5h-5c-0.552,0-1,0.448-1,1v2c0,0.552,0.448,1,1,1h5v5c0,0.552,0.448,1,1,1h2c0.552,0,1-0.448,1-1v-5h5c0.552,0,1-0.448,1-1v-2C32,25.448,31.552,25,31,25z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="xGIh33lbYX9pWIYWeZsuka" x1="24" x2="24" y1="6.955" y2="23.167" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#eba600"/><stop offset="1" stop-color="#c28200"/></linearGradient><path fill="url(#xGIh33lbYX9pWIYWeZsuka)" d="M24.414,10.414l-2.536-2.536C21.316,7.316,20.553,7,19.757,7H5C3.895,7,3,7.895,3,9v30c0,1.105,0.895,2,2,2h38c1.105,0,2-0.895,2-2V13c0-1.105-0.895-2-2-2H25.828C25.298,11,24.789,10.789,24.414,10.414z"/><linearGradient id="xGIh33lbYX9pWIYWeZsukb" x1="24.066" x2="24.066" y1="19.228" y2="33.821" gradientTransform="matrix(-1 0 0 1 48 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd869"/><stop offset="1" stop-color="#fec52b"/></linearGradient><path fill="url(#xGIh33lbYX9pWIYWeZsukb)" d="M24,23l3.854-3.854C27.947,19.053,28.074,19,28.207,19H44.81c1.176,0,2.098,1.01,1.992,2.181l-1.636,18C45.072,40.211,44.208,41,43.174,41H4.79c-1.019,0-1.875-0.766-1.988-1.779L1.062,23.555C1.029,23.259,1.261,23,1.559,23H24z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 48 48">
<path fill="#455A64" d="M32,6h-8c0,1.104-1,3-3,3s-3-1.896-3-3h-8c-2.209,0-4,1.791-4,4v30c0,2.209,1.791,4,4,4h22c2.209,0,4-1.791,4-4V10C36,7.791,34.209,6,32,6" />
<path fill="#FFF" d="M32,41H10c-0.552,0-1-0.448-1-1V10c0-0.552,0.448-1,1-1h22c0.552,0,1,0.448,1,1v30C33,40.552,32.552,41,32,41z" />
<path fill="#90A4AE" d="M23,6c0,1.105-0.895,2-2,2s-2-0.895-2-2h-7v4c0,1.105,0.895,2,2,2h14c1.105,0,2-0.895,2-2V6H23z" />
<path fill="#90A4AE" d="M21,2c-2.206,0-4,1.794-4,4s1.794,4,4,4s4-1.794,4-4S23.206,2,21,2 M21,8c-1.103,0-2-0.896-2-2s0.897-2,2-2s2,0.896,2,2S22.103,8,21,8" />
<path fill="#90CAF9" d="M17 17H42V47H17z" />
<g>
<path fill="#1976D2" d="M21 37H33V39H21zM21 33H38V35H21zM21 29H33V31H21zM21 25H38V27H21z" />
</g>
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="I93pW93qJSUhtSDIz1RZKa" x1="-248" x2="-238" y1="-234" y2="-234" gradientTransform="rotate(180 -112 -112)" gradientUnits="userSpaceOnUse"><stop offset=".266" stop-color="#199ae0"/><stop offset=".582" stop-color="#1898de"/><stop offset=".745" stop-color="#1590d6"/><stop offset=".873" stop-color="#1083c9"/><stop offset=".982" stop-color="#0870b7"/><stop offset="1" stop-color="#076cb3"/></linearGradient><path fill="url(#I93pW93qJSUhtSDIz1RZKa)" d="M14,13h9c0.552,0,1-0.448,1-1V8c0-0.552-0.448-1-1-1h-9V13z"/><linearGradient id="I93pW93qJSUhtSDIz1RZKb" x1="3.924" x2="17.001" y1="8.199" y2="41.867" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#I93pW93qJSUhtSDIz1RZKb)" d="M18.19,32H14V7l-4.828,4.828C8.421,12.579,8,13.596,8,14.657V32H3.81c-0.72,0-1.08,0.87-0.571,1.379l6.701,6.701c0.586,0.586,1.536,0.586,2.121,0l6.701-6.701C19.271,32.87,18.91,32,18.19,32z"/><linearGradient id="I93pW93qJSUhtSDIz1RZKc" x1="-365" x2="-355" y1="-231.472" y2="-231.472" gradientTransform="translate(389 269.472)" gradientUnits="userSpaceOnUse"><stop offset=".266" stop-color="#199ae0"/><stop offset=".582" stop-color="#1898de"/><stop offset=".745" stop-color="#1590d6"/><stop offset=".873" stop-color="#1083c9"/><stop offset=".982" stop-color="#0870b7"/><stop offset="1" stop-color="#076cb3"/></linearGradient><path fill="url(#I93pW93qJSUhtSDIz1RZKc)" d="M34,35h-9c-0.552,0-1,0.448-1,1v4c0,0.552,0.448,1,1,1h9V35z"/><linearGradient id="I93pW93qJSUhtSDIz1RZKd" x1="32.313" x2="44" y1="7.663" y2="40.775" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#I93pW93qJSUhtSDIz1RZKd)" d="M29.81,16H34v25l4.828-4.828c0.75-0.75,1.172-1.768,1.172-2.828V16h4.19c0.72,0,1.08-0.87,0.571-1.379L38.061,7.92c-0.586-0.586-1.536-0.586-2.121,0l-6.701,6.701C28.729,15.13,29.09,16,29.81,16z"/></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<linearGradient id="WxWrlTsssL_WlnpfbClFCa" x1="24" x2="24" y1="592.908" y2="650.553" gradientTransform="matrix(1 0 0 -1 0 662)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#f44f5a" />
<stop offset=".443" stop-color="#ee3d4a" />
<stop offset="1" stop-color="#e52030" />
</linearGradient>
<path fill="url(#WxWrlTsssL_WlnpfbClFCa)" d="M39,10v31c0,1.105-0.895,2-2,2H11c-1.105,0-2-0.895-2-2V10H39z" />
<linearGradient id="WxWrlTsssL_WlnpfbClFCb" x1="24" x2="24" y1="657.947" y2="648.199" gradientTransform="matrix(1 0 0 -1 0 662)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#f44f5a" />
<stop offset=".443" stop-color="#ee3d4a" />
<stop offset="1" stop-color="#e52030" />
</linearGradient>
<path fill="url(#WxWrlTsssL_WlnpfbClFCb)" d="M28,4h-8c-1.105,0-2,0.895-2,2v2h12V6C30,4.895,29.105,4,28,4z" />
<path fill="#ffa8a8" d="M8,11v-1c0-1.657,1.343-3,3-3h26c1.657,0,3,1.343,3,3v1H8z" />
<path d="M32.395,30.153L28.243,26l4.191-4.191c0.781-0.781,0.781-2.047,0-2.828 l-1.414-1.414c-0.781-0.781-2.047-0.781-2.828,0L24,21.757l-4.191-4.191c-0.781-0.781-2.047-0.781-2.828,0l-1.414,1.414 c-0.781,0.781-0.781,2.047,0,2.828l4.191,4.191l-4.192,4.192c-0.781,0.781-0.781,2.047,0,2.828l1.414,1.414 c0.781,0.781,2.047,0.781,2.828,0L24,30.241l4.153,4.153c0.781,0.781,2.047,0.781,2.828,0l1.414-1.414 C33.176,32.2,33.176,30.934,32.395,30.153z" opacity=".05" />
<path d="M32.042,30.506L27.536,26l4.544-4.544c0.586-0.586,0.586-1.536,0-2.121 l-1.414-1.414c-0.586-0.586-1.536-0.586-2.121,0L24,22.464l-4.544-4.544c-0.586-0.586-1.536-0.586-2.121,0l-1.414,1.414 c-0.586,0.586-0.586,1.536,0,2.121L20.464,26l-4.545,4.545c-0.586,0.586-0.586,1.536,0,2.121l1.414,1.414 c0.586,0.586,1.536,0.586,2.121,0L24,29.536l4.506,4.506c0.586,0.586,1.536,0.586,2.121,0l1.414-1.414 C32.628,32.042,32.628,31.092,32.042,30.506z" opacity=".07" />
<path fill="#fff" d="M26.828,26l4.898-4.898c0.391-0.39,0.391-1.023,0-1.414l-1.414-1.414 c-0.39-0.391-1.024-0.391-1.414,0L24,23.172l-4.898-4.898c-0.39-0.391-1.023-0.391-1.414,0l-1.414,1.414 c-0.391,0.39-0.391,1.023,0,1.414L21.172,26l-4.899,4.899c-0.391,0.39-0.391,1.023,0,1.414l1.414,1.414 c0.39,0.391,1.023,0.391,1.414,0L24,28.828l4.86,4.86c0.39,0.391,1.023,0.391,1.414,0l1.414-1.414c0.391-0.39,0.391-1.024,0-1.414 L26.828,26z" />
</svg>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="240" height="240">
<linearGradient id="2oz8eBjuNR7A1ADmHf2vja" x1="41.018" x2="45.176" y1="228" y2="228" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#3537b0" />
<stop offset="1" stop-color="#4646cf" />
</linearGradient>
<path fill="url(#2oz8eBjuNR7A1ADmHf2vja)" d="M43,11h-3v30h3c1.105,0,2-0.895,2-2V13C45,11.895,44.105,11,43,11z" />
<path fill="#5286ff" d="M41,39V9c0-1.105-0.895-2-2-2H5C3.895,7,3,7.895,3,9v30c0,1.105,0.895,2,2,2h38C41.895,41,41,40.105,41,39z" />
<path fill="#fff" d="M37,17H7c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1h30c0.552,0,1,0.448,1,1v2C38,16.552,37.552,17,37,17z" />
<path fill="#fff" d="M19,36H7c-0.552,0-1-0.448-1-1V22c0-0.552,0.448-1,1-1h12c0.552,0,1,0.448,1,1v13C20,35.552,19.552,36,19,36z" />
<path fill="#fff" d="M38,24H24v-2c0-0.552,0.448-1,1-1h12c0.552,0,1,0.448,1,1V24z" />
<rect width="14" height="3" x="24" y="24" fill="#e6eeff" />
<rect width="14" height="3" x="24" y="27" fill="#ccdcff" />
<rect width="14" height="3" x="24" y="30" fill="#b3cbff" />
<path fill="#9abaff" d="M37,36H25c-0.552,0-1-0.448-1-1v-2h14v2C38,35.552,37.552,36,37,36z" />
<radialGradient id="2oz8eBjuNR7A1ADmHf2vjb" cx="37.925" cy="38.053" r="11.954" gradientUnits="userSpaceOnUse">
<stop offset="0" />
<stop offset="1" stop-opacity="0" />
</radialGradient>
<path fill="url(#2oz8eBjuNR7A1ADmHf2vjb)" d="M38,26c-6.617,0-12,5.383-12,12c0,1.037,0.146,2.039,0.395,3H43c1.105,0,2-0.895,2-2V28.273C43.027,26.849,40.614,26,38,26z" />
<linearGradient id="2oz8eBjuNR7A1ADmHf2vjc" x1="27.766" x2="43.124" y1="226.234" y2="210.876" gradientTransform="matrix(1 0 0 -1 0 254)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#05acb3" />
<stop offset="1" stop-color="#038387" />
</linearGradient>
<path fill="url(#2oz8eBjuNR7A1ADmHf2vjc)" d="M48,38c0,5.522-4.478,10-10,10s-10-4.478-10-10s4.478-10,10-10S48,32.478,48,38z" />
<path d="M38.01,44.537c-1.727,0-3.36-0.633-4.603-1.781c-2.416-2.237-2.83-5.982-1.026-8.709l-0.279-0.279c-0.385-0.385-0.498-0.958-0.29-1.46c0.207-0.502,0.692-0.826,1.236-0.826h3.034c0.816,0,1.481,0.665,1.481,1.481v3.034c0,0.739-0.602,1.34-1.342,1.34c-0.346,0-0.674-0.133-0.925-0.374c-0.123,0.401-0.157,0.827-0.098,1.245c0.114,0.8,0.556,1.496,1.244,1.958c0.457,0.308,0.998,0.47,1.564,0.47s1.107-0.162,1.564-0.47c0.696-0.468,1.143-1.172,1.257-1.982c0.114-0.803-0.117-1.618-0.634-2.234c-0.46-0.55-0.43-1.343,0.071-1.844l0.857-0.857c0.254-0.254,0.605-0.399,0.966-0.399c0.387,0,0.755,0.165,1.009,0.454c2.407,2.735,2.188,6.977-0.489,9.455C41.367,43.905,39.734,44.537,38.01,44.537z" opacity=".05" />
<path d="M38.009,44.037c-1.6,0-3.113-0.586-4.262-1.648c-2.363-2.188-2.644-5.861-0.715-8.396l-0.577-0.578c-0.241-0.241-0.313-0.6-0.182-0.915c0.13-0.314,0.434-0.518,0.774-0.518h3.034c0.541,0,0.981,0.44,0.981,0.981v3.034c0,0.463-0.378,0.84-0.842,0.84c-0.222,0-0.432-0.088-0.591-0.247l-0.495-0.495c-0.384,0.653-0.54,1.425-0.432,2.184c0.135,0.942,0.652,1.76,1.46,2.303c0.539,0.362,1.177,0.555,1.844,0.555s1.305-0.192,1.844-0.555c0.814-0.548,1.338-1.374,1.473-2.327c0.134-0.943-0.138-1.9-0.745-2.626c-0.293-0.35-0.275-0.853,0.041-1.169l0.857-0.857c0.161-0.161,0.384-0.253,0.612-0.253c0.243,0,0.475,0.104,0.634,0.284c2.229,2.534,2.025,6.462-0.454,8.758C41.121,43.452,39.608,44.037,38.009,44.037L38.009,44.037z" opacity=".07" />
<path fill="#fff" d="M42.35,33.964c-0.134-0.153-0.375-0.153-0.519-0.009l-0.857,0.857c-0.136,0.136-0.134,0.348-0.011,0.495c1.425,1.703,1.148,4.357-0.833,5.689c-1.268,0.853-2.978,0.853-4.246,0c-1.979-1.331-2.237-3.971-0.815-5.673l0.914,0.914c0.214,0.214,0.579,0.062,0.579-0.24v-3.034c0-0.266-0.216-0.482-0.482-0.482h-3.034c-0.302,0-0.453,0.365-0.24,0.579l0.898,0.898c-2.061,2.322-1.949,5.907,0.38,8.063c2.182,2.02,5.66,2.021,7.843,0.001C44.253,39.873,44.393,36.287,42.35,33.964z" />
</svg>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#0884db" d="M23.401,10.798L18.069,6.8c-0.533-0.4-0.533-1.2,0-1.599L23.4,1.202C24.06,0.707,25,1.178,25,2.001v7.997C25,10.822,24.06,11.293,23.401,10.798z"/><path fill="#0368ba" d="M25.105,43.97C13.609,44.597,4,35.366,4,24c0-4.358,1.462-8.63,4.146-12.099c0.346-0.447,1.008-0.494,1.435-0.124l1.479,1.282c0.411,0.356,0.447,0.964,0.113,1.393c-2.688,3.464-3.711,8.072-2.906,12.531c1.399,7.746,8.128,13.145,15.998,13.015c9.228-0.152,16.62-8.218,15.649-17.667l4.056,2.775C43.42,35.174,35.174,43.42,25.105,43.97z"/><path fill="#0884db" d="M24,44c0,0,16-3,16-20c0-8.8-7.2-16-16-16h-3.2V4H24c11,0,20,9,20,20S35,44,24,44z"/></svg>

After

Width:  |  Height:  |  Size: 689 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><linearGradient id="RYATVpJlDntEW8LOcPQLra" x1="5.715" x2="40.857" y1="40.37" y2="5.229" gradientTransform="matrix(1 0 0 -1 0 48)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><path fill="url(#RYATVpJlDntEW8LOcPQLra)" d="M36.2,6H8C6.9,6,6,6.9,6,8v32c0,1.1,0.9,2,2,2h32c1.1,0,2-0.9,2-2V11.8c0-0.5-0.2-1-0.6-1.4l-3.8-3.8C37.2,6.2,36.7,6,36.2,6z"/><path d="M36,6H14v10c0,1.7,1.3,3,3,3h16c1.7,0,3-1.3,3-3V6z" opacity=".05"/><path fill="#1fa4e6" d="M33,19H13c-1.1,0-2-0.9-2-2V6h24v11C35,18.1,34.1,19,33,19z"/><path d="M33,18.5H17c-1.4,0-2.5-1.1-2.5-2.5V6h21v10C35.5,17.4,34.4,18.5,33,18.5z" opacity=".07"/><radialGradient id="RYATVpJlDntEW8LOcPQLrb" cx="17.573" cy="45.392" r="23.87" gradientTransform="matrix(1 0 0 -1 0 48)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fafafb"/><stop offset=".523" stop-color="#e2e4e7"/><stop offset="1" stop-color="#c8cdd1"/></radialGradient><path fill="url(#RYATVpJlDntEW8LOcPQLrb)" d="M15,6v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6H15z"/><rect width="4" height="8" x="27" y="8" fill="#177cad"/><linearGradient id="RYATVpJlDntEW8LOcPQLrc" x1="38.003" x2="40.027" y1="9.997" y2="7.973" gradientTransform="matrix(1 0 0 -1 0 48)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0d61a9"/><stop offset="1" stop-color="#16528c"/></linearGradient><rect width="2" height="2" x="38" y="38" fill="url(#RYATVpJlDntEW8LOcPQLrc)"/><linearGradient id="RYATVpJlDntEW8LOcPQLrd" x1="8.003" x2="10.027" y1="9.997" y2="7.973" gradientTransform="matrix(1 0 0 -1 0 48)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0d61a9"/><stop offset="1" stop-color="#16528c"/></linearGradient><rect width="2" height="2" x="8" y="38" fill="url(#RYATVpJlDntEW8LOcPQLrd)"/><linearGradient id="RYATVpJlDntEW8LOcPQLre" x1="13.83" x2="34.965" y1="23.83" y2="44.965" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".242" stop-color="#f2f2f2"/><stop offset="1" stop-color="#ccc"/></linearGradient><path fill="url(#RYATVpJlDntEW8LOcPQLre)" d="M34,42H14c-1.1,0-2-0.9-2-2V28c0-1.1,0.9-2,2-2h20c1.1,0,2,0.9,2,2v12C36,41.1,35.1,42,34,42z"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

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