Compare commits
255 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b87d896b8f
|
|||
|
26a807c8be
|
|||
|
4e657469b3
|
|||
|
535679d4ee
|
|||
|
c220d7f2b8
|
|||
|
ada6f59434
|
|||
|
ce09b47456
|
|||
|
cd1006b422
|
|||
|
b2331926d7
|
|||
|
e04e5f0b13
|
|||
|
5df8019cfb
|
|||
|
fb36f897d6
|
|||
|
d68df750a6
|
|||
|
ea8d1522f1
|
|||
|
1a8b03696d
|
|||
|
7e2a103dbe
|
|||
|
d80f5c47b1
|
|||
|
c2ac96938e
|
|||
|
0bc93bb24b
|
|||
|
c9eb3e32b4
|
|||
|
afc9ceaa1f
|
|||
|
7c745cc2f7
|
|||
|
e584996043
|
|||
|
72a81e05ad
|
|||
|
da79ada91e
|
|||
|
e47d6599b5
|
|||
|
7469d037d5
|
|||
|
8f132afe92
|
|||
|
a5db244bc1
|
|||
|
0b50f1ade2
|
|||
|
f6b39cb678
|
|||
|
d2a454aca0
|
|||
|
795e3dd1a7
|
|||
|
b9ddc20b7d
|
|||
|
|
336b6ad1fd | ||
|
|
a22f6238d4 | ||
|
|
bb96755232 | ||
|
|
b4e4154445 | ||
|
|
cd766f73fc | ||
|
d798eea1d8
|
|||
|
8ab1689309
|
|||
|
6cf27b4867
|
|||
|
da25510543
|
|||
|
a2d15425d1
|
|||
|
3618d83ef8
|
|||
|
2edbcf72c7
|
|||
|
19b9a64721
|
|||
|
ec6830e636
|
|||
|
9a5c70581b
|
|||
|
a6175b3874
|
|||
|
27ce41e0d1
|
|||
|
574a8d5ec2
|
|||
|
d570d29c92
|
|||
|
562ce27341
|
|||
|
463c2bbf2b
|
|||
|
145a5771a1
|
|||
|
3adfcda472
|
|||
|
078d5c0661
|
|||
|
06db3289c0
|
|||
|
a573f4fb89
|
|||
|
091d820332
|
|||
|
1d44f93a92
|
|||
|
3de764b833
|
|||
|
3e6b70bc4c
|
|||
|
065d915d46
|
|||
| 11b76ee73b | |||
|
1c070891f1
|
|||
| 4baf571713 | |||
|
|
b899d2ee7d | ||
|
|
05b94a3189 | ||
|
|
6a6fd7efe6 | ||
|
|
a89145071d | ||
| 554304c801 | |||
| 785c4ce41d | |||
| bd7ce5bbe7 | |||
| 8ef522bc6c | |||
| 582752c987 | |||
| b434ddf480 | |||
| 8300f571a3 | |||
| e86fe2ee17 | |||
| 531c2a60bf | |||
| b1ac3cd73c | |||
| 6674872848 | |||
| 03f27214d6 | |||
| d8c798fe09 | |||
| 70786fc169 | |||
| aed70d4f3f | |||
| 45ef76e647 | |||
| 433613e43d | |||
| 6e8b4f0a9d | |||
| 87cb9b8b37 | |||
|
|
77a93b585a | ||
|
|
d0e3d2fa61 | ||
|
|
f5596ab0ba | ||
|
|
09c1ac8b08 | ||
|
|
4e69acaf04 | ||
|
|
55db801c4c | ||
|
|
cbbb546f30 | ||
| 04848d4622 | |||
| d85a41c158 | |||
| 798961ea22 | |||
| bf0037cf79 | |||
| c52c4059a0 | |||
| 03fefa33fe | |||
| 30b1832cd0 | |||
| 0aa6ed98c6 | |||
| c1616fecf0 | |||
| a5eb9fad43 | |||
| df21d8180d | |||
| f19974599f | |||
| e14dedc924 | |||
| 0285892f20 | |||
| 01fc5606cb | |||
| 70805083ba | |||
| 96cd9bcaac | |||
| 986257c0a4 | |||
| b11ad06287 | |||
| d68dd09ad2 | |||
| 1b3070493c | |||
| 1c9c50778a | |||
| 33a209a01a | |||
| 2ce73ad032 | |||
| ecb7ae0d1a | |||
| 40380d088f | |||
| 50cbf081e1 | |||
| 3b79335e85 | |||
| 3e1ab72162 | |||
| a83d109f24 | |||
| e50d5f4874 | |||
| 72b765e6fd | |||
| 26347ca9a4 | |||
| 9c8eb4a9a8 | |||
| f8801cc861 | |||
| 97bf2b1323 | |||
| 8fae2a2c9d | |||
| 334b9583c6 | |||
| 8561fdb09b | |||
| ee69d8af56 | |||
| cd929485d0 | |||
| 2fddf23e6a | |||
| d8847a8a0e | |||
| e321c66f72 | |||
| ac146900d0 | |||
| 5fc97ed522 | |||
| 9694ba56fd | |||
| 2a389ae5d4 | |||
| 6a0bf70e97 | |||
| a329d21feb | |||
| c07ba7fc28 | |||
| 07a94cfa5f | |||
| 690355266c | |||
| 3ec94fa22d | |||
| 95a81a9306 | |||
| 934b8db71b | |||
| 31f557cc8d | |||
| 6f8ac996fd | |||
| a420e7bf74 | |||
| 12c00841ff | |||
| f64c8cdba0 | |||
| 2f9d60f1a8 | |||
| bc6c483ba6 | |||
| 7e5acd413e | |||
| 333f5011de | |||
| c6153488cd | |||
| 32d9212edc | |||
| 1747083c99 | |||
| f2a78a462c | |||
| 4c54f592d3 | |||
| 27879f15c3 | |||
| a02f275577 | |||
| 4b964e548f | |||
| 8087c0539a | |||
| 19fccd8af9 | |||
| 043b14e9a9 | |||
| f6219c0aa8 | |||
| f453e85956 | |||
| 5e678db077 | |||
| f0f63a1895 | |||
| 0276f11a8a | |||
| 5083af5fd1 | |||
| 86b7ec67fc | |||
| 3239fb5431 | |||
| 9bfd83ee4a | |||
| ebc57e05d5 | |||
| 5bccd070f4 | |||
| 3625962a27 | |||
| 939c87820f | |||
| b4f0d43b46 | |||
| 46179463e1 | |||
| 7c4dae8c8d | |||
| 6427ce4726 | |||
| b35e3d5187 | |||
| deeee34f87 | |||
| f254ac03e1 | |||
| c9650c6118 | |||
| 2e467c0a96 | |||
| 69cd869cd1 | |||
| ef314ac227 | |||
| a30893e04c | |||
| 368948d277 | |||
| 60b11d949d | |||
| 1e41fa8b10 | |||
| d1f35676ee | |||
| 1bd0e87211 | |||
| 64e89eb6ba | |||
| b6e0f6f77a | |||
| ade4f8f245 | |||
| 80d41c869c | |||
| 725711877c | |||
| 9fb56678f3 | |||
| a4a0549920 | |||
| b7a201e621 | |||
| 1fba037e3f | |||
| bf38ed6df6 | |||
| 1e00870f29 | |||
| ebb15bf25c | |||
| b5878572aa | |||
| 7804a60377 | |||
| 44450546d0 | |||
| 11e9290fc8 | |||
| 4b78ce1b6f | |||
|
|
20c1e5dc8e | ||
|
|
f1185c242c | ||
|
|
ab1d3f38b0 | ||
|
|
1746bb6442 | ||
| 68b940fddd | |||
| 87cfacfdbb | |||
| ee46f7272e | |||
| 3be25d7070 | |||
| 4ea4a70e50 | |||
| c97a04c4ce | |||
| 604d35856f | |||
| 3dc69a4f26 | |||
| fc27fc1c34 | |||
| c31cc3aa20 | |||
| 00de4d8708 | |||
| f3b2d07117 | |||
| 6808f772c1 | |||
| 0f4ba96963 | |||
| c95e73be48 | |||
| 40279ba6b9 | |||
| 0f3e93bfff | |||
| deb14caf24 | |||
| f07fad0a80 | |||
| b21d33237f | |||
| b32d2c5512 | |||
| e303b6c381 | |||
| a7a3abf6e5 | |||
| 4dd112cd8c | |||
| af58f0d8ea | |||
| f1b11ea3c6 | |||
| 54ab66fba0 | |||
| 9c43055580 | |||
| a4d5fff876 | |||
| 99b1db952b |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -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,6 @@ MigrationBackup/
|
|||||||
|
|
||||||
# Ionide (cross platform F# VS Code tools) working folder
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
.ionide/
|
.ionide/
|
||||||
|
*.json
|
||||||
|
|
||||||
|
.idea/
|
||||||
23
Directory.Build.props
Normal file
23
Directory.Build.props
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<Project>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackageProjectUrl>https://git.pilzinsel64.de/litw-refined/minecraft-modpack-updater</PackageProjectUrl>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<GenerateSerializationAssemblies>False</GenerateSerializationAssemblies>
|
||||||
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
|
<NoWarn>1591</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||||
|
<DebugSymbols>False</DebugSymbols>
|
||||||
|
<DebugType>None</DebugType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Pilzinsel64
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
11
ModpackUpdater.Apps.Client.Gui/App.axaml
Normal file
11
ModpackUpdater.Apps.Client.Gui/App.axaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="ModpackUpdater.Apps.Client.Gui.App"
|
||||||
|
RequestedThemeVariant="Default">
|
||||||
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme />
|
||||||
|
<StyleInclude Source="avares://Pilz.UI.AvaloniaUI/Assets/Styles/EnhancedDefaults.axaml"/>
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
||||||
21
ModpackUpdater.Apps.Client.Gui/App.axaml.cs
Normal file
21
ModpackUpdater.Apps.Client.Gui/App.axaml.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Client.Gui;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
AppGlobals.Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
desktop.MainWindow = new MainForm();
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
26
ModpackUpdater.Apps.Client.Gui/AppConfig.cs
Normal file
26
ModpackUpdater.Apps.Client.Gui/AppConfig.cs
Normal 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>();
|
||||||
|
}
|
||||||
BIN
ModpackUpdater.Apps.Client.Gui/Assets/app.ico
Normal file
BIN
ModpackUpdater.Apps.Client.Gui/Assets/app.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
25
ModpackUpdater.Apps.Client.Gui/Assets/app.svg
Normal file
25
ModpackUpdater.Apps.Client.Gui/Assets/app.svg
Normal 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 |
81
ModpackUpdater.Apps.Client.Gui/FiledialogFilters.Designer.cs
generated
Normal file
81
ModpackUpdater.Apps.Client.Gui/FiledialogFilters.Designer.cs
generated
Normal 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.Apps.Client.Gui {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
162
ModpackUpdater.Apps.Client.Gui/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
162
ModpackUpdater.Apps.Client.Gui/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Client.Gui.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class GeneralLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal GeneralLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.LangRes.GeneralLangRes", typeof(GeneralLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string AnUpdateIsAvailable {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AnUpdateIsAvailable", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CheckForUpdates {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CheckForUpdates", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CheckingForUpdates {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CheckingForUpdates", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ConfigIncompleteOrNotLoaded {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ConfigIncompleteOrNotLoaded", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string DownloadProgramUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DownloadProgramUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ErrorOnUpdateCheckOrUpdating {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorOnUpdateCheckOrUpdating", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EverythingIsRightAndUpToDate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("EverythingIsRightAndUpToDate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Install {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Install", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string InstallationKey {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("InstallationKey", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Installing {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Installing", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string MinecraftProfile {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MinecraftProfile", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string MinecraftProfileFolderSeemsInvalid {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MinecraftProfileFolderSeemsInvalid", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModpackConfigUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModpackConfigUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Repair {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Repair", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Select {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Select", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SelectMinecraftProfileFolder {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SelectMinecraftProfileFolder", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Status {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Status", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateServerInMaintenance {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateServerInMaintenance", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string InstallationKeyNotValid {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("InstallationKeyNotValid", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,32 +117,61 @@
|
|||||||
<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="AnUpdateIsAvailable" xml:space="preserve">
|
||||||
<data name="icons8_checkmark_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<value>An update is available!</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="CheckForUpdates" 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>Check for updates</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_download_from_ftp_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="CheckingForUpdates" 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>Checking for Updates...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_general_warning_sign_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ConfigIncompleteOrNotLoaded" 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>Config incomplete or not loaded!</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_opened_folder_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="DownloadProgramUpdate" 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>Downloading program update...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_save_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ErrorOnUpdateCheckOrUpdating" 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>Error on update check or while updating!</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_software_installer_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="EverythingIsRightAndUpToDate" 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>Everything is right and up-to-date.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_update_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Install" 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>Install</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="icons8_wrench_16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="InstallationKey" 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>Installation key</value>
|
||||||
|
</data>
|
||||||
|
<data name="Installing" xml:space="preserve">
|
||||||
|
<value>Installing...</value>
|
||||||
|
</data>
|
||||||
|
<data name="MinecraftProfile" xml:space="preserve">
|
||||||
|
<value>Minecraft profile</value>
|
||||||
|
</data>
|
||||||
|
<data name="MinecraftProfileFolderSeemsInvalid" xml:space="preserve">
|
||||||
|
<value>Minecraft profile folder seems to be not valid.</value>
|
||||||
|
</data>
|
||||||
|
<data name="ModpackConfigUrl" xml:space="preserve">
|
||||||
|
<value>Modpack config url</value>
|
||||||
|
</data>
|
||||||
|
<data name="Repair" xml:space="preserve">
|
||||||
|
<value>Repair</value>
|
||||||
|
</data>
|
||||||
|
<data name="Select" xml:space="preserve">
|
||||||
|
<value>Select</value>
|
||||||
|
</data>
|
||||||
|
<data name="SelectMinecraftProfileFolder" xml:space="preserve">
|
||||||
|
<value>Select the minecraft profile folder (usually named .minecraft)</value>
|
||||||
|
</data>
|
||||||
|
<data name="Status" xml:space="preserve">
|
||||||
|
<value>Status</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdateServerInMaintenance" xml:space="preserve">
|
||||||
|
<value>The update servers are in maintenance.</value>
|
||||||
|
</data>
|
||||||
|
<data name="InstallationKeyNotValid" xml:space="preserve">
|
||||||
|
<value>Installation key seems to be invalid</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
72
ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs
generated
Normal file
72
ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Client.Gui.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class MsgBoxLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal MsgBoxLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Client.Gui.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateAvailable {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateAvailable", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateAvailable_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateAvailable_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ErrorWhileUpdate_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorWhileUpdate_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ErrorWhileUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorWhileUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
133
ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx
Normal file
133
ModpackUpdater.Apps.Client.Gui/LangRes/MsgBoxLangRes.resx
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<?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="UpdateAvailable" xml:space="preserve">
|
||||||
|
<value>A new version of this program is available! Install now?
|
||||||
|
If you confirm, the update will be installed automatically within a few seconds.</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdateAvailable_Title" xml:space="preserve">
|
||||||
|
<value>New program version available</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorWhileUpdate_Title" xml:space="preserve">
|
||||||
|
<value>Error while updating</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorWhileUpdate" xml:space="preserve">
|
||||||
|
<value>An error happened while updating the program. Error message:\n{0}</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
113
ModpackUpdater.Apps.Client.Gui/MainForm.axaml
Normal file
113
ModpackUpdater.Apps.Client.Gui/MainForm.axaml
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:lang="clr-namespace:ModpackUpdater.Apps.Client.Gui.LangRes"
|
||||||
|
xmlns:pilz="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||||
|
xmlns:symbols="clr-namespace:Pilz.UI.Symbols;assembly=Pilz.UI"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
x:Class="ModpackUpdater.Apps.Client.Gui.MainForm"
|
||||||
|
Width="520"
|
||||||
|
SizeToContent="Height"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
CanMaximize="false"
|
||||||
|
Title="Minecraft Modpack Updater"
|
||||||
|
Icon="/Assets/app.ico">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Margin="3"
|
||||||
|
x:Name="MainGrid">
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*" MinWidth="250"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- Labels -->
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Margin="3" Content="{x:Static lang:GeneralLangRes.MinecraftProfile}" Target="TextBoxMinecraftProfileFolder"/>
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Margin="3" Content="{x:Static lang:GeneralLangRes.ModpackConfigUrl}" Target="TextBoxModpackConfig"/>
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Margin="3" IsVisible="false" x:Name="LabelInstallKey" Content="{x:Static lang:GeneralLangRes.InstallationKey}" Target="TextBoxInstallKey"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="0" Margin="3" Text="{x:Static lang:GeneralLangRes.Status}"/>
|
||||||
|
<StackPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Orientation="Horizontal" Spacing="6" MinHeight="{Binding MinHeight, ElementName=TextBoxMinecraftProfileFolder}">
|
||||||
|
<Image Width="{x:Static symbols:SymbolGlobals.DefaultImageSmallSize}" x:Name="ImageStatus"/>
|
||||||
|
<TextBlock x:Name="TextStatus"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- TextBoxes: Profile -->
|
||||||
|
<TextBox
|
||||||
|
x:Name="TextBoxMinecraftProfileFolder"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Watermark="C:\..."
|
||||||
|
TextChanged="TextBoxMinecraftProfileFolder_TextChanged"/>
|
||||||
|
|
||||||
|
<!-- TextBoxes: ModpackConfig -->
|
||||||
|
<TextBox
|
||||||
|
x:Name="TextBoxModpackConfig"
|
||||||
|
Grid.Row="1"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Watermark="https://..."
|
||||||
|
TextChanged="TextBoxModpackConfig_TextChanged"/>
|
||||||
|
|
||||||
|
<!-- TextBoxes: InstallKey -->
|
||||||
|
<TextBox
|
||||||
|
x:Name="TextBoxInstallKey"
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Watermark="XXXXX-YYYYY-ZZZZZ-AAAAA-BBBBB"
|
||||||
|
TextChanged="TextBoxInstallKey_TextChanged"
|
||||||
|
IsVisible="false"/>
|
||||||
|
|
||||||
|
<!-- Button: SearchProfileFolder -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonSearchProfileFolder"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Text="{x:Static lang:GeneralLangRes.Select}"
|
||||||
|
Click="ButtonSearchProfileFolder_Click"/>
|
||||||
|
|
||||||
|
<!-- Button: CheckForUpdates -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonCheckForUpdates"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Text="{x:Static lang:GeneralLangRes.CheckForUpdates}"
|
||||||
|
Click="ButtonCheckForUpdates_Click"/>
|
||||||
|
|
||||||
|
<!-- Button: Install -->
|
||||||
|
<pilz:ImageSplitButton
|
||||||
|
x:Name="ButtonInstall"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="3"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Text="{x:Static lang:GeneralLangRes.Install}"
|
||||||
|
Click="ButtonInstall_Click">
|
||||||
|
<SplitButton.Flyout>
|
||||||
|
<MenuFlyout>
|
||||||
|
<MenuItem x:Name="MenuItemRepair" Header="{x:Static lang:GeneralLangRes.Repair}" Click="MenuItemRepair_Click"/>
|
||||||
|
</MenuFlyout>
|
||||||
|
</SplitButton.Flyout>
|
||||||
|
</pilz:ImageSplitButton>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
341
ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs
Normal file
341
ModpackUpdater.Apps.Client.Gui/MainForm.axaml.cs
Normal file
@@ -0,0 +1,341 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Platform.Storage;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
using ModpackUpdater.Apps.Client.Gui.LangRes;
|
||||||
|
using ModpackUpdater.Manager;
|
||||||
|
using MsBox.Avalonia;
|
||||||
|
using MsBox.Avalonia.Enums;
|
||||||
|
using Pilz;
|
||||||
|
using Pilz.Extensions;
|
||||||
|
using Pilz.Runtime;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
using Pilz.Updating.Client;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Client.Gui;
|
||||||
|
|
||||||
|
public partial class MainForm : Window
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
|
||||||
|
Title = $"{Title} (v{Assembly.GetExecutingAssembly().GetAppVersion().ToShortString()})";
|
||||||
|
|
||||||
|
Closing += MainForm_Closing;
|
||||||
|
Loaded += MainForm_Loaded;
|
||||||
|
|
||||||
|
ButtonSearchProfileFolder.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.opened_folder);
|
||||||
|
ButtonCheckForUpdates.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.update_done);
|
||||||
|
ButtonInstall.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer);
|
||||||
|
MenuItemRepair.Icon = AppGlobals.Symbols.GetImage(AppSymbols.wrench, SymbolSize.Small);
|
||||||
|
|
||||||
|
ClearStatus();
|
||||||
|
LoadProfileToUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Features
|
||||||
|
|
||||||
|
private void SetStatus(string statusText, IImage? image)
|
||||||
|
{
|
||||||
|
TextStatus.Text = statusText;
|
||||||
|
ImageStatus.Source = image;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearStatus()
|
||||||
|
{
|
||||||
|
TextStatus.Text = "-";
|
||||||
|
ImageStatus.Source = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadProfileToUi()
|
||||||
|
{
|
||||||
|
loadingData = true;
|
||||||
|
|
||||||
|
TextBoxMinecraftProfileFolder.Text = modpackInfo.LocalPath ?? AppConfig.Instance.LastMinecraftProfilePath ?? TextBoxMinecraftProfileFolder.Text;
|
||||||
|
TextBoxModpackConfig.Text = modpackInfo.ConfigUrl ?? TextBoxModpackConfig.Text;
|
||||||
|
TextBoxInstallKey.Text = modpackInfo.ExtrasKey ?? TextBoxInstallKey.Text;
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Post(() => loadingData = false, DispatcherPriority.Background);
|
||||||
|
}
|
||||||
|
|
||||||
|
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(TextBoxMinecraftProfileFolder.Text?.Trim());
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loadProfileToUi)
|
||||||
|
LoadProfileToUi();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
updateConfig = ModpackConfig.LoadFromUrl(TextBoxModpackConfig.Text);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
features = new(updateConfig);
|
||||||
|
modpackInfo.ExtrasKey = TextBoxInstallKey.Text?.Trim();
|
||||||
|
if (!features.IsInvalid() && !string.IsNullOrWhiteSpace(TextBoxInstallKey.Text) && !AllowExtras())
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.InstallationKeyNotValid, AppGlobals.Symbols.GetImageSource(AppSymbols.general_warning_sign));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelInstallKey.IsVisible = TextBoxInstallKey.IsVisible = !string.IsNullOrWhiteSpace(updateConfig.UnleashApiUrl);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(TextBoxMinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.MinecraftProfileFolderSeemsInvalid, AppGlobals.Symbols.GetImageSource(AppSymbols.general_warning_sign));
|
||||||
|
ButtonCheckForUpdates.IsEnabled = false;
|
||||||
|
ButtonInstall.IsEnabled = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (string.IsNullOrWhiteSpace(TextBoxModpackConfig.Text))
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.ConfigIncompleteOrNotLoaded, AppGlobals.Symbols.GetImageSource(AppSymbols.general_warning_sign));
|
||||||
|
ButtonCheckForUpdates.IsEnabled = false;
|
||||||
|
ButtonInstall.IsEnabled = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (updateConfig.Maintenance && !updateOptions.IgnoreMaintenance)
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.UpdateServerInMaintenance, AppGlobals.Symbols.GetImageSource(AppSymbols.services));
|
||||||
|
ButtonCheckForUpdates.IsEnabled = false;
|
||||||
|
ButtonInstall.IsEnabled = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
LoadOptionsToUi();
|
||||||
|
ButtonCheckForUpdates.IsEnabled = true;
|
||||||
|
ButtonInstall.IsEnabled = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ExecuteUpdate(bool doInstall, bool repair)
|
||||||
|
{
|
||||||
|
// Ensure set extras key
|
||||||
|
modpackInfo.ExtrasKey = TextBoxInstallKey.Text?.Trim();
|
||||||
|
|
||||||
|
var updater = new ModpackInstaller(updateConfig, modpackInfo);
|
||||||
|
updater.InstallProgessUpdated += Update_InstallProgessUpdated;
|
||||||
|
updater.CheckingProgressUpdated += Updated_CheckingProgresssUpdated;
|
||||||
|
|
||||||
|
void error()
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.ErrorOnUpdateCheckOrUpdating, AppGlobals.Symbols.GetImageSource(AppSymbols.close));
|
||||||
|
currentUpdating = false;
|
||||||
|
}
|
||||||
|
void installing()
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.Installing, AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
|
||||||
|
currentUpdating = true;
|
||||||
|
}
|
||||||
|
void updatesAvailable()
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.AnUpdateIsAvailable, AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
|
||||||
|
}
|
||||||
|
void everythingOk()
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.EverythingIsRightAndUpToDate, AppGlobals.Symbols.GetImageSource(AppSymbols.done));
|
||||||
|
currentUpdating = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check only if not pressed "install", not really needed otherwise.
|
||||||
|
if (lastUpdateCheckResult is null || !doInstall || repair)
|
||||||
|
{
|
||||||
|
SetStatus(GeneralLangRes.CheckingForUpdates, AppGlobals.Symbols.GetImageSource(AppSymbols.update_done));
|
||||||
|
|
||||||
|
// Check for extras once again
|
||||||
|
updateOptions.IncludeExtras = AllowExtras();
|
||||||
|
|
||||||
|
// Force re-install on repair
|
||||||
|
updateOptions.IgnoreInstalledVersion = repair;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lastUpdateCheckResult = await updater.Check(updateOptions);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
error();
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 bool AllowExtras()
|
||||||
|
{
|
||||||
|
return features != null && features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(modpackInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Updated_CheckingProgresssUpdated(int toCheck, int processed)
|
||||||
|
{
|
||||||
|
SetStatus(Math.Round(processed / (double)toCheck * 100d, 1) + "%", AppGlobals.Symbols.GetImageSource(AppSymbols.update_done));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update_InstallProgessUpdated(UpdateCheckResult result, int processedSyncs)
|
||||||
|
{
|
||||||
|
var actionCount = result.Actions.Count;
|
||||||
|
SetStatus(Math.Round(processedSyncs / (double)actionCount * 100d, 1) + "%", AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Gui
|
||||||
|
|
||||||
|
private void MainForm_Closing(object? sender, WindowClosingEventArgs e)
|
||||||
|
{
|
||||||
|
AppConfig.Instance.LastMinecraftProfilePath = TextBoxMinecraftProfileFolder.Text?.Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MainForm_Loaded(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var updates = new AppUpdates(Program.UpdateUrl, this);
|
||||||
|
updates.OnDownloadProgramUpdate += (o, args) => SetStatus(GeneralLangRes.DownloadProgramUpdate, AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
|
||||||
|
await updates.UpdateApp();
|
||||||
|
ClearStatus();
|
||||||
|
|
||||||
|
CheckStatusAndUpdate(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBoxMinecraftProfileFolder_TextChanged(object? o, TextChangedEventArgs args)
|
||||||
|
{
|
||||||
|
if (!loadingData)
|
||||||
|
CheckStatusAndUpdate(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBoxModpackConfig_TextChanged(object? o, RoutedEventArgs args)
|
||||||
|
{
|
||||||
|
if (!loadingData)
|
||||||
|
CheckStatusAndUpdate(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBoxInstallKey_TextChanged(object? o, RoutedEventArgs args)
|
||||||
|
{
|
||||||
|
if (!loadingData)
|
||||||
|
CheckStatusAndUpdate(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ButtonSearchProfileFolder_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var filePaths = await StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
|
{
|
||||||
|
Title = GeneralLangRes.SelectMinecraftProfileFolder,
|
||||||
|
SuggestedStartLocation = await StorageProvider.TryGetFolderFromPathAsync(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)),
|
||||||
|
AllowMultiple = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (filePaths.Count >= 1)
|
||||||
|
TextBoxMinecraftProfileFolder.Text = filePaths[0].Path.AbsolutePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ButtonCheckForUpdates_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
ClearStatus();
|
||||||
|
await ExecuteUpdate(false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ButtonInstall_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (currentUpdating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ClearStatus();
|
||||||
|
await ExecuteUpdate(true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemRepair_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (currentUpdating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ClearStatus();
|
||||||
|
await ExecuteUpdate(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<ApplicationIcon>Assets\app.ico</ApplicationIcon>
|
||||||
|
<AssemblyName>MinecraftModpackUpdater</AssemblyName>
|
||||||
|
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||||
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Version.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="FiledialogFilters.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>FiledialogFilters.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>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="FiledialogFilters.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>FiledialogFilters.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\MsgBoxLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>MsgBoxLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia.BuildServices" Version="11.3.2">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MessageBox.Avalonia" Version="3.3.0" />
|
||||||
|
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||||
|
<PackageReference Include="Pilz" Version="2.6.1" />
|
||||||
|
<PackageReference Include="Pilz.Configuration" Version="3.2.7" />
|
||||||
|
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
|
||||||
|
<PackageReference Include="Pilz.IO" Version="2.1.0" />
|
||||||
|
<PackageReference Include="Pilz.UI" Version="3.1.4" />
|
||||||
|
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.18" />
|
||||||
|
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Svg" Version="11.3.0" />
|
||||||
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8" />
|
||||||
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
|
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8">
|
||||||
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||||
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Pilz.Updating" Version="4.3.5" />
|
||||||
|
<PackageReference Include="Pilz.Updating.Client" Version="4.4.6" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Apps\ModpackUpdater.Apps.csproj" />
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
|
||||||
|
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
71
ModpackUpdater.Apps.Client.Gui/Program.cs
Normal file
71
ModpackUpdater.Apps.Client.Gui/Program.cs
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Castle.Core.Logging;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Pilz;
|
||||||
|
using Pilz.Configuration;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Client.Gui;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public const string UpdateUrl = "https://git.pilzinsel64.de/litw-refined/minecraft-modpack-updater/-/snippets/3/raw/main/updates-new.json";
|
||||||
|
|
||||||
|
private static readonly SettingsManager settingsManager;
|
||||||
|
|
||||||
|
public static ISettings Settings => settingsManager.Instance;
|
||||||
|
public static ILogger Log { get; } = new ConsoleLogger();
|
||||||
|
|
||||||
|
static Program()
|
||||||
|
{
|
||||||
|
settingsManager = new(GetSettingsPath(2), true);
|
||||||
|
MigrateLegacySettings(GetSettingsPath(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
[STAThread]
|
||||||
|
internal static void Main(string[] args)
|
||||||
|
{
|
||||||
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
{
|
||||||
|
return AppBuilder.Configure<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
.WithInterFont()
|
||||||
|
.LogToTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
92
ModpackUpdater.Apps.Client.Gui/app.pupnet.conf
Normal file
92
ModpackUpdater.Apps.Client.Gui/app.pupnet.conf
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# PUPNET DEPLOY: 1.9.1
|
||||||
|
# Use: 'pupnet --help conf' for information.
|
||||||
|
|
||||||
|
# APP PREAMBLE
|
||||||
|
AppBaseName = MinecraftModpackUpdater
|
||||||
|
AppFriendlyName = Minecraft Modpack Updater
|
||||||
|
AppId = de.pilzinsel64.minecraft-modpack-updater
|
||||||
|
AppVersionRelease = 1.0.0[1]
|
||||||
|
AppShortSummary = Install and Update Minecraft Modpacks easliy.
|
||||||
|
AppDescription = """
|
||||||
|
Minecraft Modpack Updater is a simple tool to install and update a modpack to a selected minecraft profile by a selected modpack configuration file. It downloads a config file via https and checks the version there and what files has been changed and download the updateded files via a given link from the config.
|
||||||
|
"""
|
||||||
|
AppLicenseId = MIT
|
||||||
|
AppLicenseFile = ../LICENSE
|
||||||
|
AppChangeFile =
|
||||||
|
|
||||||
|
# PUBLISHER
|
||||||
|
PublisherName = Pilzinsel64
|
||||||
|
PublisherId = de.pilzinsel64
|
||||||
|
PublisherCopyright = Copyright (C) Pilzinsel64 2025
|
||||||
|
PublisherLinkName = Pilzinsel64 Homepage
|
||||||
|
PublisherLinkUrl = https://pilzinsel64.de
|
||||||
|
PublisherEmail =
|
||||||
|
|
||||||
|
# DESKTOP INTEGRATION
|
||||||
|
DesktopNoDisplay = false
|
||||||
|
DesktopTerminal = false
|
||||||
|
DesktopFile =
|
||||||
|
StartCommand =
|
||||||
|
PrimeCategory =
|
||||||
|
MetaFile =
|
||||||
|
IconFiles = """
|
||||||
|
Assets/app.ico
|
||||||
|
Assets/app.svg
|
||||||
|
"""
|
||||||
|
|
||||||
|
# DOTNET PUBLISH
|
||||||
|
DotnetProjectPath = ModpackUpdater.Apps.Client.Gui.csproj
|
||||||
|
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=false
|
||||||
|
DotnetPostPublish =
|
||||||
|
DotnetPostPublishOnWindows =
|
||||||
|
|
||||||
|
# PACKAGE OUTPUT
|
||||||
|
PackageName = minecraft-modpack-updater
|
||||||
|
OutputDirectory = ../publish/client-ui
|
||||||
|
|
||||||
|
# APPIMAGE OPTIONS
|
||||||
|
AppImageArgs =
|
||||||
|
AppImageRuntimePath =
|
||||||
|
AppImageVersionOutput = false
|
||||||
|
|
||||||
|
# FLATPAK OPTIONS
|
||||||
|
FlatpakPlatformRuntime = org.freedesktop.Platform
|
||||||
|
FlatpakPlatformSdk = org.freedesktop.Sdk
|
||||||
|
FlatpakPlatformVersion = 25.08
|
||||||
|
FlatpakFinishArgs = """
|
||||||
|
--socket=wayland
|
||||||
|
--socket=fallback-x11
|
||||||
|
--filesystem=home
|
||||||
|
--share=network
|
||||||
|
"""
|
||||||
|
FlatpakBuilderArgs =
|
||||||
|
|
||||||
|
# RPM OPTIONS
|
||||||
|
RpmAutoReq = false
|
||||||
|
RpmAutoProv = true
|
||||||
|
RpmRequires = """
|
||||||
|
krb5-libs
|
||||||
|
libicu
|
||||||
|
openssl-libs
|
||||||
|
"""
|
||||||
|
|
||||||
|
# DEBIAN OPTIONS
|
||||||
|
DebianRecommends = """
|
||||||
|
libc6
|
||||||
|
libgcc1
|
||||||
|
libgssapi-krb5-2
|
||||||
|
libicu70
|
||||||
|
libssl3
|
||||||
|
libstdc++6
|
||||||
|
zlib1g
|
||||||
|
"""
|
||||||
|
|
||||||
|
# WINDOWS SETUP OPTIONS
|
||||||
|
SetupGroupName =
|
||||||
|
SetupAdminInstall = false
|
||||||
|
SetupCommandPrompt =
|
||||||
|
SetupMinWindowsVersion = 10
|
||||||
|
SetupSignTool =
|
||||||
|
SetupSuffixOutput =
|
||||||
|
SetupVersionOutput = false
|
||||||
|
SetupUninstallScript =
|
||||||
12
ModpackUpdater.Apps.Client.Gui/publish.sh
Executable file
12
ModpackUpdater.Apps.Client.Gui/publish.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
pupnet -y -v "$1[1]" -r linux-x64 -k appimage
|
||||||
|
#pupnet -y -v "$1[1]" -r linux-x64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-x64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-x64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||||
|
pupnet -y -v "$1[1]" -r linux-arm64 -k appimage
|
||||||
|
#pupnet -y -v "$1[1]" -r linux-arm64 -k flatpak -p DefineConstants=DISABLE_UPDATE
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-arm64 -k deb -p DefineConstants=DISABLE_UPDATE
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-arm64 -k rpm -p DefineConstants=DISABLE_UPDATE
|
||||||
|
pupnet -y -v "$1[1]" -r win-x64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r win-arm64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r osx-x64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r osx-arm64 -k zip
|
||||||
BIN
ModpackUpdater.Apps.Client/Assets/app.ico
Normal file
BIN
ModpackUpdater.Apps.Client/Assets/app.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
25
ModpackUpdater.Apps.Client/Assets/app.svg
Normal file
25
ModpackUpdater.Apps.Client/Assets/app.svg
Normal 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 |
30
ModpackUpdater.Apps.Client/ModpackUpdater.Apps.Client.csproj
Normal file
30
ModpackUpdater.Apps.Client/ModpackUpdater.Apps.Client.csproj
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<ApplicationIcon>Assets\app.ico</ApplicationIcon>
|
||||||
|
<AssemblyName>MinecraftModpackUpdaterCli</AssemblyName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Version.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||||
|
<PackageReference Include="Pilz" Version="2.6.1" />
|
||||||
|
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
|
||||||
|
<PackageReference Include="Pilz.IO" Version="2.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ModpackUpdater.Manager\ModpackUpdater.Manager.csproj" />
|
||||||
|
<ProjectReference Include="..\ModpackUpdater\ModpackUpdater.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
41
ModpackUpdater.Apps.Client/Options.cs
Normal file
41
ModpackUpdater.Apps.Client/Options.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
60
ModpackUpdater.Apps.Client/Program.cs
Normal file
60
ModpackUpdater.Apps.Client/Program.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
@@ -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>
|
||||||
10
ModpackUpdater.Apps.Client/UpdateCheckOptionsAdv.cs
Normal file
10
ModpackUpdater.Apps.Client/UpdateCheckOptionsAdv.cs
Normal 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; }
|
||||||
|
}
|
||||||
90
ModpackUpdater.Apps.Client/app.pupnet.conf
Normal file
90
ModpackUpdater.Apps.Client/app.pupnet.conf
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
# PUPNET DEPLOY: 1.9.1
|
||||||
|
# Use: 'pupnet --help conf' for information.
|
||||||
|
|
||||||
|
# APP PREAMBLE
|
||||||
|
AppBaseName = MinecraftModpackUpdaterCli
|
||||||
|
AppFriendlyName = Minecraft Modpack Updater CLI
|
||||||
|
AppId = de.pilzinsel64.minecraft-modpack-updater-cli
|
||||||
|
AppVersionRelease = 1.0.0[1]
|
||||||
|
AppShortSummary = Install and Update Minecraft Modpacks easliy.
|
||||||
|
AppDescription = """
|
||||||
|
Minecraft Modpack Updater is a simple tool to install and update a modpack to a selected minecraft profile by a selected modpack configuration file. It downloads a config file via https and checks the version there and what files has been changed and download the updateded files via a given link from the config.
|
||||||
|
"""
|
||||||
|
AppLicenseId = MIT
|
||||||
|
AppLicenseFile = ../LICENSE
|
||||||
|
AppChangeFile =
|
||||||
|
|
||||||
|
# PUBLISHER
|
||||||
|
PublisherName = Pilzinsel64
|
||||||
|
PublisherId = de.pilzinsel64
|
||||||
|
PublisherCopyright = Copyright (C) Pilzinsel64 2025
|
||||||
|
PublisherLinkName = Pilzinsel64 Homepage
|
||||||
|
PublisherLinkUrl = https://pilzinsel64.de
|
||||||
|
PublisherEmail =
|
||||||
|
|
||||||
|
# DESKTOP INTEGRATION
|
||||||
|
DesktopNoDisplay = true
|
||||||
|
DesktopTerminal = false
|
||||||
|
DesktopFile =
|
||||||
|
StartCommand =
|
||||||
|
PrimeCategory =
|
||||||
|
MetaFile =
|
||||||
|
IconFiles = """
|
||||||
|
"""
|
||||||
|
|
||||||
|
# DOTNET PUBLISH
|
||||||
|
DotnetProjectPath = ModpackUpdater.Apps.Client.csproj
|
||||||
|
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=false
|
||||||
|
DotnetPostPublish =
|
||||||
|
DotnetPostPublishOnWindows =
|
||||||
|
|
||||||
|
# PACKAGE OUTPUT
|
||||||
|
PackageName = minecraft-modpack-updater-cli
|
||||||
|
OutputDirectory = ../publish/client-cli
|
||||||
|
|
||||||
|
# APPIMAGE OPTIONS
|
||||||
|
AppImageArgs =
|
||||||
|
AppImageRuntimePath =
|
||||||
|
AppImageVersionOutput = false
|
||||||
|
|
||||||
|
# FLATPAK OPTIONS
|
||||||
|
FlatpakPlatformRuntime = org.freedesktop.Platform
|
||||||
|
FlatpakPlatformSdk = org.freedesktop.Sdk
|
||||||
|
FlatpakPlatformVersion = 25.08
|
||||||
|
FlatpakFinishArgs = """
|
||||||
|
--socket=wayland
|
||||||
|
--socket=fallback-x11
|
||||||
|
--filesystem=home
|
||||||
|
--share=network
|
||||||
|
"""
|
||||||
|
FlatpakBuilderArgs =
|
||||||
|
|
||||||
|
# RPM OPTIONS
|
||||||
|
RpmAutoReq = false
|
||||||
|
RpmAutoProv = true
|
||||||
|
RpmRequires = """
|
||||||
|
krb5-libs
|
||||||
|
libicu
|
||||||
|
openssl-libs
|
||||||
|
"""
|
||||||
|
|
||||||
|
# DEBIAN OPTIONS
|
||||||
|
DebianRecommends = """
|
||||||
|
libc6
|
||||||
|
libgcc1
|
||||||
|
libgssapi-krb5-2
|
||||||
|
libicu70
|
||||||
|
libssl3
|
||||||
|
libstdc++6
|
||||||
|
zlib1g
|
||||||
|
"""
|
||||||
|
|
||||||
|
# WINDOWS SETUP OPTIONS
|
||||||
|
SetupGroupName =
|
||||||
|
SetupAdminInstall = false
|
||||||
|
SetupCommandPrompt =
|
||||||
|
SetupMinWindowsVersion = 10
|
||||||
|
SetupSignTool =
|
||||||
|
SetupSuffixOutput =
|
||||||
|
SetupVersionOutput = false
|
||||||
|
SetupUninstallScript =
|
||||||
12
ModpackUpdater.Apps.Client/publish.sh
Executable file
12
ModpackUpdater.Apps.Client/publish.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
pupnet -y -v "$1[1]" -r linux-x64 -k appimage
|
||||||
|
#pupnet -y -v "$1[1]" -r linux-x64 -k flatpak
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-x64 -k deb
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-x64 -k rpm
|
||||||
|
pupnet -y -v "$1[1]" -r linux-arm64 -k appimage
|
||||||
|
#pupnet -y -v "$1[1]" -r linux-arm64 -k flatpak
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-arm64 -k deb
|
||||||
|
#pupnet -y -v "$1[1]"-r linux-arm64 -k rpm
|
||||||
|
pupnet -y -v "$1[1]" -r win-x64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r win-arm64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r osx-x64 -k zip
|
||||||
|
pupnet -y -v "$1[1]" -r osx-arm64 -k zip
|
||||||
8
ModpackUpdater.Apps.Manager/Api/FeatureTypes.cs
Normal file
8
ModpackUpdater.Apps.Manager/Api/FeatureTypes.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace ModpackUpdater.Apps.Manager.Api;
|
||||||
|
|
||||||
|
public static class FeatureTypes
|
||||||
|
{
|
||||||
|
public static string Workspace => "workspace";
|
||||||
|
public static string Tools => "tools";
|
||||||
|
public static string ActionsContextMenu => "cm.actions";
|
||||||
|
}
|
||||||
12
ModpackUpdater.Apps.Manager/Api/Model/IMainApi.cs
Normal file
12
ModpackUpdater.Apps.Manager/Api/Model/IMainApi.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
|
||||||
|
public interface IMainApi
|
||||||
|
{
|
||||||
|
Window MainWindow { get; }
|
||||||
|
MainWindowViewModel Model { get; }
|
||||||
|
bool HasClosed { get; }
|
||||||
|
}
|
||||||
19
ModpackUpdater.Apps.Manager/Api/Model/IWorkspace.cs
Normal file
19
ModpackUpdater.Apps.Manager/Api/Model/IWorkspace.cs
Normal 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();
|
||||||
|
}
|
||||||
14
ModpackUpdater.Apps.Manager/Api/Model/WorkspaceConfig.cs
Normal file
14
ModpackUpdater.Apps.Manager/Api/Model/WorkspaceConfig.cs
Normal 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; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
|
||||||
|
public class WorkspaceContext(IMainApi mainApi, IWorkspace? workspace)
|
||||||
|
{
|
||||||
|
public IMainApi MainApi => mainApi;
|
||||||
|
public IWorkspace? Workspace { get; set; } = workspace;
|
||||||
|
public bool Canceled { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using Pilz.Features;
|
||||||
|
|
||||||
|
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 async Task Configure(WorkspaceContext context)
|
||||||
|
{
|
||||||
|
await OnConfigure(context);
|
||||||
|
|
||||||
|
if (!context.Canceled && context.Workspace?.Config is not null)
|
||||||
|
context.Workspace.Config.ProviderId = Identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual IWorkspace CreateFromConfig(WorkspaceConfig config)
|
||||||
|
{
|
||||||
|
OnCreate(out var workspace, config);
|
||||||
|
return workspace;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void OnCreate(out IWorkspace workspace, WorkspaceConfig config);
|
||||||
|
|
||||||
|
protected abstract Task OnConfigure(WorkspaceContext context);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using Pilz.Features;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
|
||||||
|
public class MainApiParameters(IMainApi api) : PluginFunctionParameter
|
||||||
|
{
|
||||||
|
public IMainApi Api { get; } = api;
|
||||||
|
}
|
||||||
15
ModpackUpdater.Apps.Manager/App.axaml
Normal file
15
ModpackUpdater.Apps.Manager/App.axaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="ModpackUpdater.Apps.Manager.App"
|
||||||
|
RequestedThemeVariant="Default">
|
||||||
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme DensityStyle="Normal" />
|
||||||
|
<!-- <FluentTheme DensityStyle="Compact" /> -->
|
||||||
|
<!-- <SimpleTheme /> -->
|
||||||
|
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
|
||||||
|
<!-- <StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Simple.xaml"/> -->
|
||||||
|
<StyleInclude Source="avares://Pilz.UI.AvaloniaUI/Assets/Styles/EnhancedDefaults.axaml"/>
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
||||||
24
ModpackUpdater.Apps.Manager/App.axaml.cs
Normal file
24
ModpackUpdater.Apps.Manager/App.axaml.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui;
|
||||||
|
using Pilz.Features;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
AppGlobals.Initialize();
|
||||||
|
PluginFeatureController.Instance.RegisterAllOwn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
desktop.MainWindow = new MainWindow();
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
1
ModpackUpdater.Apps.Manager/Assembly.cs
Normal file
1
ModpackUpdater.Apps.Manager/Assembly.cs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[assembly: PropertyChanged.FilterType("ModpackUpdater.Apps.Manager.Ui.Models")]
|
||||||
BIN
ModpackUpdater.Apps.Manager/Assets/app.ico
Normal file
BIN
ModpackUpdater.Apps.Manager/Assets/app.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
25
ModpackUpdater.Apps.Manager/Assets/app.svg
Normal file
25
ModpackUpdater.Apps.Manager/Assets/app.svg
Normal 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 |
@@ -0,0 +1,27 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.heart_with_pulse, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.SelectedGridRow is not { } row)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.CheckActionHealthy(p.Api, row);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.broom, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is MainApiParameters p && p.Api.Model.SelectedGridRow is { } row)
|
||||||
|
SharedFunctions.ClearDirectLinks(p.Api, row);
|
||||||
|
return Task.FromResult<object?>(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.search, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.SelectedGridRow is not { } row)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.CollectUpdates(p.Api, row.Action);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.renew, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.SelectedGridRow is not MainWindowGridRow row)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.FindNewDirectLinks(p.Api, row);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
285
ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs
Normal file
285
ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs
Normal file
@@ -0,0 +1,285 @@
|
|||||||
|
using System.Text;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
using ModpackUpdater.Manager;
|
||||||
|
using MsBox.Avalonia;
|
||||||
|
using OfficeOpenXml;
|
||||||
|
using OfficeOpenXml.Table;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features;
|
||||||
|
|
||||||
|
internal static class SharedFunctions
|
||||||
|
{
|
||||||
|
private static readonly IImage? imageSourceSuccess = AppGlobals.Symbols.GetImageSource(AppSymbols.done);
|
||||||
|
private static readonly IImage? imageSourceWorking = AppGlobals.Symbols.GetImageSource(AppSymbols.hourglass);
|
||||||
|
private static readonly IImage? imageSourceFailed = AppGlobals.Symbols.GetImageSource(AppSymbols.close);
|
||||||
|
|
||||||
|
public static async Task CheckActionHealthy(IMainApi api, params MainWindowGridRow[] rows)
|
||||||
|
{
|
||||||
|
var rowsCount = rows.Length;
|
||||||
|
var failed = false;
|
||||||
|
var factory = new ModpackFactory();
|
||||||
|
|
||||||
|
api.Model.Progress.Start(rowsCount);
|
||||||
|
|
||||||
|
for (var i = 0; i < rowsCount; i++)
|
||||||
|
{
|
||||||
|
var row = rows[i];
|
||||||
|
if (row.SourceType == SourceType.DirectLink)
|
||||||
|
continue;
|
||||||
|
row.StateImage = imageSourceWorking;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = await factory.ResolveSourceUrl(row.Action);
|
||||||
|
failed = string.IsNullOrWhiteSpace(result);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
if (api.HasClosed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
row.StateImage = failed ? imageSourceFailed : imageSourceSuccess;
|
||||||
|
api.Model.Progress.Set(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
api.Model.Progress.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<bool> CollectUpdates(IMainApi api, params InstallAction[] actions)
|
||||||
|
{
|
||||||
|
if (api.Model.CurrentWorkspace?.UpdateInfos is null || api.Model.CurrentTreeNodes is null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Collect updates
|
||||||
|
var result = await AvaloniaFlyoutBase.Show(new UpdatesCollectorView(api.Model.CurrentWorkspace, actions), api.MainWindow);
|
||||||
|
if (api.HasClosed || result.Result is not ModUpdates resultUpdates)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Collect versions with changes
|
||||||
|
var updates = resultUpdates.List.Where(update => update.Origin.SourceTag != update.AvailableVersions[update.NewVersion].Key).ToList();
|
||||||
|
|
||||||
|
// Path install actions
|
||||||
|
foreach (var update in updates)
|
||||||
|
{
|
||||||
|
var sourceTag = update.AvailableVersions[update.NewVersion].Key;
|
||||||
|
if (api.Model.CurrentGridRows?.FirstOrDefault(n => n.Action == update.Origin) is { } row)
|
||||||
|
row.SourceTag = sourceTag;
|
||||||
|
else
|
||||||
|
update.Origin.SourceTag = sourceTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create update actions
|
||||||
|
var updateSet = new UpdateInfo();
|
||||||
|
foreach (var update in updates)
|
||||||
|
{
|
||||||
|
updateSet.Actions.Add(new()
|
||||||
|
{
|
||||||
|
InheritFrom = update.Origin.Id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
api.Model.CurrentWorkspace.UpdateInfos.Updates.Insert(0, updateSet);
|
||||||
|
|
||||||
|
// Add update to ui
|
||||||
|
api.Model.CurrentTreeNodes[1].Nodes.Insert(0, new ActionSetTreeNode(updateSet));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task FindNewDirectLinks(IMainApi api, params MainWindowGridRow[] rows)
|
||||||
|
{
|
||||||
|
var factory = new ModpackFactory();
|
||||||
|
|
||||||
|
api.Model.Progress.Start(rows.Length);
|
||||||
|
|
||||||
|
for (var i = 0; i < rows.Length; i++)
|
||||||
|
{
|
||||||
|
var row = rows[i];
|
||||||
|
if (row.SourceType == SourceType.DirectLink)
|
||||||
|
continue;
|
||||||
|
row.StateImage = imageSourceWorking;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
row.SourceUrl = await factory.ResolveSourceUrl(row.Action);
|
||||||
|
row.StateImage = imageSourceSuccess;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
row.StateImage = imageSourceFailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (api.HasClosed)
|
||||||
|
return;
|
||||||
|
api.Model.Progress.Set(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
api.Model.Progress.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ClearDirectLinks(IMainApi api, params MainWindowGridRow[] rows)
|
||||||
|
{
|
||||||
|
api.Model.Progress.Start(rows.Length);
|
||||||
|
|
||||||
|
for (var i = 0; i < rows.Length; i++)
|
||||||
|
{
|
||||||
|
var row = rows[i];
|
||||||
|
if (row.SourceType != SourceType.DirectLink)
|
||||||
|
row.SourceUrl = null;
|
||||||
|
row.StateImage = null;
|
||||||
|
api.Model.Progress.Set(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
api.Model.Progress.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
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.ModlistForVersionX, 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 = TableStyles.Medium16;
|
||||||
|
tableDef.ShowHeader = true;
|
||||||
|
|
||||||
|
return pkg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.heart_with_pulse, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.CurrentGridRows is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.CheckActionHealthy(p.Api, [.. p.Api.Model.CurrentGridRows]);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.broom, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is MainApiParameters p && p.Api.Model.CurrentGridRows is not null)
|
||||||
|
SharedFunctions.ClearDirectLinks(p.Api, [.. p.Api.Model.CurrentGridRows]);
|
||||||
|
return Task.FromResult<object?>(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
using MsBox.Avalonia;
|
||||||
|
using MsBox.Avalonia.Enums;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.time_machine, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p
|
||||||
|
|| p.Api.Model.CurrentWorkspace?.InstallInfos is null
|
||||||
|
|| p.Api.Model.SelectedTreeNode is not ActionSetTreeNode node
|
||||||
|
|| node.Infos is not UpdateInfo updateInfo)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var changelog = SharedFunctions.GenerateChangelog(p.Api.Model.CurrentWorkspace.InstallInfos, updateInfo);
|
||||||
|
if (string.IsNullOrWhiteSpace(changelog))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await p.Api.MainWindow.Clipboard?.SetTextAsync(changelog);
|
||||||
|
await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.ChangelogCopiedToClipboard_Title, MsgBoxLangRes.ChangelogCopiedToClipboard, ButtonEnum.Ok, MsBox.Avalonia.Enums.Icon.Info).ShowAsPopupAsync(p.Api.MainWindow);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using ModpackUpdater.Apps.Manager.Utils;
|
||||||
|
using MsBox.Avalonia;
|
||||||
|
using MsBox.Avalonia.Enums;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.list_view, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.CurrentWorkspace?.InstallInfos is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Generate excel
|
||||||
|
using var pkg = SharedFunctions.GenerateModlistAsExcel(p.Api.Model.CurrentWorkspace.InstallInfos);
|
||||||
|
|
||||||
|
// Ask for save
|
||||||
|
var file = await TopLevel.GetTopLevel(p.Api.MainWindow)!.StorageProvider.SaveFilePickerAsync(new()
|
||||||
|
{
|
||||||
|
FileTypeChoices = [MyFilePickerFileTypes.Excel]
|
||||||
|
});
|
||||||
|
if (file is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Save file
|
||||||
|
await pkg.SaveAsAsync(file.Path.AbsolutePath);
|
||||||
|
await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.ModlistGenerated_Title, MsgBoxLangRes.ModlistGenerated, ButtonEnum.Ok, MsBox.Avalonia.Enums.Icon.Info).ShowAsPopupAsync(p.Api.MainWindow);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using MsBox.Avalonia;
|
||||||
|
using MsBox.Avalonia.Enums;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.list_view, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.CurrentWorkspace?.InstallInfos is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
p.Api.MainWindow.Clipboard?.SetTextAsync(SharedFunctions.GenerateModlistAsMarkdown(p.Api.Model.CurrentWorkspace.InstallInfos));
|
||||||
|
|
||||||
|
await MessageBoxManager.GetMessageBoxStandard(MsgBoxLangRes.ModlistCopiedToClipboard_Title, MsgBoxLangRes.ModlistCopiedToClipboard, ButtonEnum.Ok, MsBox.Avalonia.Enums.Icon.Info).ShowAsPopupAsync(p.Api.MainWindow);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
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.GetImage(AppSymbols.renew, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.CurrentGridRows is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.FindNewDirectLinks(p.Api, [.. p.Api.Model.CurrentGridRows]);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
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.GetImage(AppSymbols.search, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<object?> ExecuteFunctionAsync(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is not MainApiParameters p || p.Api.Model.CurrentWorkspace?.InstallInfos is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
await SharedFunctions.CollectUpdates(p.Api, [.. p.Api.Model.CurrentWorkspace.InstallInfos.Actions]);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
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;
|
||||||
|
private string? rawUpdateInfos;
|
||||||
|
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
var failed = true;
|
||||||
|
|
||||||
|
if (InstallInfos != null)
|
||||||
|
{
|
||||||
|
var newInstallInfos = InstallInfos.ToString();
|
||||||
|
if (newInstallInfos != rawInstallInfos)
|
||||||
|
{
|
||||||
|
if (await SaveContent(ConfigX.FileLocationInstallJson, newInstallInfos))
|
||||||
|
rawInstallInfos = newInstallInfos;
|
||||||
|
else
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UpdateInfos != null)
|
||||||
|
{
|
||||||
|
var newUpdateInfos = UpdateInfos.ToString();
|
||||||
|
if (newUpdateInfos != rawUpdateInfos)
|
||||||
|
{
|
||||||
|
if (await SaveContent(ConfigX.FileLocationUpdateJson, newUpdateInfos))
|
||||||
|
rawUpdateInfos = newUpdateInfos;
|
||||||
|
else
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
|
||||||
|
|
||||||
|
public class GitLabRepoWorkspaceConfig : WorkspaceConfig, ICloneable
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
return MemberwiseClone();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<dialogs:AvaloniaFlyoutBase
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:dialogs="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||||
|
xmlns:gitLabRepo="clr-namespace:ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo"
|
||||||
|
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
Width="300"
|
||||||
|
x:Class="ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo.GitLabRepoWorkspaceConfigEditorView"
|
||||||
|
x:DataType="gitLabRepo:GitLabRepoWorkspaceConfig">
|
||||||
|
|
||||||
|
<dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<Label Target="TextBoxInstanceUrl" Content="{x:Static langRes:GeneralLangRes.GitLabInstanceUrl}"/>
|
||||||
|
<TextBox Name="TextBoxInstanceUrl" Text="{Binding InstanceUrl}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxApiToken" Content="{x:Static langRes:GeneralLangRes.GitLabApiToken}"/>
|
||||||
|
<TextBox Name="TextBoxApiToken" Text="{Binding ApiToken}"/>
|
||||||
|
|
||||||
|
<Label Target="NumericUpDownRepoId" Content="{x:Static langRes:GeneralLangRes.RepositoryId}"/>
|
||||||
|
<NumericUpDown Name="NumericUpDownRepoId" Value="{Binding RepoId}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxInstallJson" Content="{x:Static langRes:GeneralLangRes.FileLocationOfInstallJson}"/>
|
||||||
|
<TextBox Name="TextBoxInstallJson" Text="{Binding FileLocationInstallJson}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxUpdateJson" Content="{x:Static langRes:GeneralLangRes.FileLocationOfUpdateJson}"/>
|
||||||
|
<TextBox Name="TextBoxUpdateJson" Text="{Binding FileLocationUpdateJson}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxModpackConfigUrl" Content="{x:Static langRes:GeneralLangRes.ModpackConfigUrl}"/>
|
||||||
|
<TextBox Name="TextBoxModpackConfigUrl" Text="{Binding ModpackConfigUrl}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
</dialogs:AvaloniaFlyoutBase>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
|
||||||
|
|
||||||
|
public partial class GitLabRepoWorkspaceConfigEditorView : AvaloniaFlyoutBase
|
||||||
|
{
|
||||||
|
public GitLabRepoWorkspaceConfig Settings { get; }
|
||||||
|
|
||||||
|
public GitLabRepoWorkspaceConfigEditorView(GitLabRepoWorkspaceConfig settings)
|
||||||
|
{
|
||||||
|
Settings = settings;
|
||||||
|
DataContext = settings;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override object? GetResult()
|
||||||
|
{
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.GitLabRepo;
|
||||||
|
|
||||||
|
internal class GitLabRepoWorkspaceFeature() : WorkspaceFeature("origin.gitlab", FeatureNamesLangRes.GitLabWorkspace), IPluginFeatureProvider<GitLabRepoWorkspaceFeature>
|
||||||
|
{
|
||||||
|
public static GitLabRepoWorkspaceFeature Instance { get; } = new();
|
||||||
|
|
||||||
|
public override object? Icon => AppGlobals.Symbols.GetImage(AppSymbols.gitlab, SymbolSize.Small);
|
||||||
|
|
||||||
|
protected override async Task OnConfigure(WorkspaceContext context)
|
||||||
|
{
|
||||||
|
var settings = context.Workspace?.Config as GitLabRepoWorkspaceConfig ?? new();
|
||||||
|
|
||||||
|
if ((await AvaloniaFlyoutBase.Show(
|
||||||
|
new GitLabRepoWorkspaceConfigEditorView((GitLabRepoWorkspaceConfig)settings.Clone()),
|
||||||
|
context.MainApi.MainWindow,
|
||||||
|
TitlesLangRes.GitLabRepoWorkspaceEditor,
|
||||||
|
AppGlobals.Symbols.GetImageSource(AppSymbols.gitlab)))
|
||||||
|
.Result is GitLabRepoWorkspaceConfig settingsNew)
|
||||||
|
context.Workspace = new GitLabRepoWorkspace(settingsNew);
|
||||||
|
else
|
||||||
|
context.Canceled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnCreate(out IWorkspace workspace, WorkspaceConfig config)
|
||||||
|
{
|
||||||
|
if (config is not GitLabRepoWorkspaceConfig gitlabConfig)
|
||||||
|
throw new NotSupportedException($"Only configs of type {nameof(GitLabRepoWorkspaceConfig)} are allowed.");
|
||||||
|
workspace = new GitLabRepoWorkspace(gitlabConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder;
|
||||||
|
|
||||||
|
internal class LocalFolderWorkspace(LocalFolderWorkspaceConfig config) : IWorkspace
|
||||||
|
{
|
||||||
|
private string? rawInstallInfos;
|
||||||
|
private string? rawUpdateInfos;
|
||||||
|
|
||||||
|
public WorkspaceConfig Config => ConfigX;
|
||||||
|
public LocalFolderWorkspaceConfig ConfigX { get; } = config;
|
||||||
|
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);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(ConfigX.FolderName))
|
||||||
|
ConfigX.FolderName = Path.GetFileName(ConfigX.RootFolderPath);
|
||||||
|
|
||||||
|
return InstallInfos != null && UpdateInfos != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> Save()
|
||||||
|
{
|
||||||
|
var failed = false;
|
||||||
|
|
||||||
|
if (InstallInfos != null)
|
||||||
|
{
|
||||||
|
var newInstallInfos = InstallInfos.ToString();
|
||||||
|
if (newInstallInfos != rawInstallInfos)
|
||||||
|
{
|
||||||
|
if (await SaveContent(ConfigX.FileLocationInstallJson, newInstallInfos))
|
||||||
|
rawInstallInfos = newInstallInfos;
|
||||||
|
else
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UpdateInfos != null)
|
||||||
|
{
|
||||||
|
var newUpdateInfos = UpdateInfos.ToString();
|
||||||
|
if (newUpdateInfos != rawUpdateInfos)
|
||||||
|
{
|
||||||
|
if (await SaveContent(ConfigX.FileLocationUpdateJson, newUpdateInfos))
|
||||||
|
rawUpdateInfos = newUpdateInfos;
|
||||||
|
else
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return !failed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<string?> GetContent(string path)
|
||||||
|
{
|
||||||
|
if (ConfigX.RootFolderPath == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var filePath = Path.Combine(ConfigX.RootFolderPath!, path);
|
||||||
|
return File.Exists(filePath) ? await File.ReadAllTextAsync(filePath) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<bool> SaveContent(string path, string content)
|
||||||
|
{
|
||||||
|
if (ConfigX.RootFolderPath == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var filePath = Path.Combine(ConfigX.RootFolderPath!, path);
|
||||||
|
if (!File.Exists(filePath))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
await File.WriteAllTextAsync(filePath, content);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder;
|
||||||
|
|
||||||
|
public class LocalFolderWorkspaceConfig : WorkspaceConfig, ICloneable
|
||||||
|
{
|
||||||
|
public override string DisplayText => FolderName ?? string.Empty;
|
||||||
|
public string? FolderName { get; set; }
|
||||||
|
public string? RootFolderPath { get; set; }
|
||||||
|
public string FileLocationInstallJson { get; set; } = "install.json";
|
||||||
|
public string FileLocationUpdateJson { get; set; } = "updates.json";
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
return MemberwiseClone();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<dialogs:AvaloniaFlyoutBase
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:dialogs="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||||
|
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||||
|
xmlns:localFolder="clr-namespace:ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
Width="300"
|
||||||
|
x:Class="ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder.LocalFolderWorkspaceConfigEditorView"
|
||||||
|
x:DataType="localFolder:LocalFolderWorkspaceConfig">
|
||||||
|
|
||||||
|
<dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<Label Target="TextBoxName" Content="{x:Static langRes:GeneralLangRes.Name}"/>
|
||||||
|
<TextBox Name="TextBoxName" Text="{Binding FolderName}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxRootFolderPath" Content="{x:Static langRes:GeneralLangRes.RootFolderPath}"/>
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="*,Auto"
|
||||||
|
ColumnSpacing="6">
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="0"
|
||||||
|
x:Name="TextBoxRootFolderPath"
|
||||||
|
Text="{Binding RootFolderPath}"/>
|
||||||
|
|
||||||
|
<dialogs:ImageButton
|
||||||
|
Grid.Column="1"
|
||||||
|
x:Name="ButtonSearch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Select}"
|
||||||
|
Click="ButtonSearch_OnClick"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Label Target="TextBoxInstallJson" Content="{x:Static langRes:GeneralLangRes.FileLocationOfInstallJson}"/>
|
||||||
|
<TextBox Name="TextBoxInstallJson" Text="{Binding FileLocationInstallJson}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxUpdateJson" Content="{x:Static langRes:GeneralLangRes.FileLocationOfUpdateJson}"/>
|
||||||
|
<TextBox Name="TextBoxUpdateJson" Text="{Binding FileLocationUpdateJson}"/>
|
||||||
|
|
||||||
|
<Label Target="TextBoxModpackConfigUrl" Content="{x:Static langRes:GeneralLangRes.ModpackConfigUrl}"/>
|
||||||
|
<TextBox Name="TextBoxModpackConfigUrl" Text="{Binding ModpackConfigUrl}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
</dialogs:AvaloniaFlyoutBase>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Platform.Storage;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder;
|
||||||
|
|
||||||
|
public partial class LocalFolderWorkspaceConfigEditorView : AvaloniaFlyoutBase
|
||||||
|
{
|
||||||
|
public LocalFolderWorkspaceConfig Settings { get; }
|
||||||
|
|
||||||
|
public LocalFolderWorkspaceConfigEditorView() : this(new())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalFolderWorkspaceConfigEditorView(LocalFolderWorkspaceConfig settings)
|
||||||
|
{
|
||||||
|
Settings = settings;
|
||||||
|
DataContext = settings;
|
||||||
|
InitializeComponent();
|
||||||
|
ButtonSearch.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.opened_folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override object? GetResult()
|
||||||
|
{
|
||||||
|
return Settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ButtonSearch_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (TopLevel.GetTopLevel(this) is not { } topLevel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var filePaths = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||||
|
{
|
||||||
|
Title = GeneralLangRes.SelectRootFolder,
|
||||||
|
AllowMultiple = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (filePaths.Count < 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TextBoxRootFolderPath.Text = filePaths[0].Path.AbsolutePath;
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(TextBoxName.Text))
|
||||||
|
TextBoxName.Text = filePaths[0].Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Workspaces.LocalFolder;
|
||||||
|
|
||||||
|
internal class LocalFolderWorkspaceFeature() : WorkspaceFeature("origin.localfolder", FeatureNamesLangRes.LocalFolderWorkspace), IPluginFeatureProvider<LocalFolderWorkspaceFeature>
|
||||||
|
{
|
||||||
|
public static LocalFolderWorkspaceFeature Instance { get; } = new();
|
||||||
|
|
||||||
|
public override object? Icon => AppGlobals.Symbols.GetImage(AppSymbols.opened_folder, SymbolSize.Small);
|
||||||
|
|
||||||
|
protected override async Task OnConfigure(WorkspaceContext context)
|
||||||
|
{
|
||||||
|
var settings = context.Workspace?.Config as LocalFolderWorkspaceConfig ?? new();
|
||||||
|
|
||||||
|
if ((await AvaloniaFlyoutBase.Show(
|
||||||
|
new LocalFolderWorkspaceConfigEditorView((LocalFolderWorkspaceConfig)settings.Clone()),
|
||||||
|
context.MainApi.MainWindow,
|
||||||
|
TitlesLangRes.LocalFolderWorkspaceEditor,
|
||||||
|
AppGlobals.Symbols.GetImageSource(AppSymbols.gitlab)))
|
||||||
|
.Result is LocalFolderWorkspaceConfig settingsNew)
|
||||||
|
context.Workspace = new LocalFolderWorkspace(settingsNew);
|
||||||
|
else
|
||||||
|
context.Canceled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnCreate(out IWorkspace workspace, WorkspaceConfig config)
|
||||||
|
{
|
||||||
|
if (config is not LocalFolderWorkspaceConfig gitlabConfig)
|
||||||
|
throw new NotSupportedException($"Only configs of type {nameof(LocalFolderWorkspaceConfig)} are allowed.");
|
||||||
|
workspace = new LocalFolderWorkspace(gitlabConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
4
ModpackUpdater.Apps.Manager/FodyWeavers.xml
Normal file
4
ModpackUpdater.Apps.Manager/FodyWeavers.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||||
|
<PropertyChanged />
|
||||||
|
</Weavers>
|
||||||
74
ModpackUpdater.Apps.Manager/FodyWeavers.xsd
Normal file
74
ModpackUpdater.Apps.Manager/FodyWeavers.xsd
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||||
|
<xs:element name="Weavers">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:all>
|
||||||
|
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="EventInvokerNames" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="CheckForEquality" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="SuppressWarnings" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:all>
|
||||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:attribute>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
||||||
156
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.Designer.cs
generated
Normal file
156
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class ActionsListLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal ActionsListLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.ActionsListLangRes", typeof(ActionsListLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_DestPath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_DestPath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_Id {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_Id", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_InheritFrom {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_InheritFrom", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_IsDir {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_IsDir", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_IsExtra {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_IsExtra", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_IsZip {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_IsZip", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_Name {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_Side {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_Side", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcOwner {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcOwner", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcPath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcPath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcRegEx {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcRegEx", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcTag {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcTag", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcType {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcType", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_SrcUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_SrcUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_UpdateType {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_UpdateType", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_Website {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_Website", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Col_ZipPath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Col_ZipPath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
174
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.resx
Normal file
174
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.resx
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<?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="Col_DestPath" xml:space="preserve">
|
||||||
|
<value>Destination path</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_Id" xml:space="preserve">
|
||||||
|
<value>Id</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_InheritFrom" xml:space="preserve">
|
||||||
|
<value>Inherit from</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_IsDir" xml:space="preserve">
|
||||||
|
<value>Is directory</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_IsExtra" xml:space="preserve">
|
||||||
|
<value>Is Extra</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_IsZip" xml:space="preserve">
|
||||||
|
<value>Is ZIP</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_Name" xml:space="preserve">
|
||||||
|
<value>Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_Side" xml:space="preserve">
|
||||||
|
<value>Side</value>
|
||||||
|
</data>
|
||||||
|
<data name="Col_SrcName" xml:space="preserve">
|
||||||
|
<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>
|
||||||
|
</root>
|
||||||
126
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.Designer.cs
generated
Normal file
126
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class FeatureNamesLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal FeatureNamesLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.FeatureNamesLangRes", typeof(FeatureNamesLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CheckAllActionsHealthy {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CheckAllActionsHealthy", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CheckSingleActionHealthy {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CheckSingleActionHealthy", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ClearDirectLinkFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ClearDirectLinkFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ClearDirectLinksFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ClearDirectLinksFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GenerateChangelogFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GenerateChangelogFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GenerateModlistAsExcelFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GenerateModlistAsExcelFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GenerateModlistAsMarkdownFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GenerateModlistAsMarkdownFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GitLabWorkspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLabWorkspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string LocalFolderWorkspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("LocalFolderWorkspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateCollectorFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateCollectorFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateDirectLinkFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateDirectLinkFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateDirectLinksFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateDirectLinksFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdatesCollectorFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdatesCollectorFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
159
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.resx
Normal file
159
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.resx
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
<?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</value>
|
||||||
|
</data>
|
||||||
|
<data name="LocalFolderWorkspace" xml:space="preserve">
|
||||||
|
<value>Local folder</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>
|
||||||
318
ModpackUpdater.Apps.Manager/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
318
ModpackUpdater.Apps.Manager/LangRes/GeneralLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class GeneralLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal GeneralLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.GeneralLangRes", typeof(GeneralLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModlistForVersionX {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModlistForVersionX", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GitLabInstanceUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLabInstanceUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GitLabApiToken {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLabApiToken", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RepositoryId {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RepositoryId", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RootFolderPath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RootFolderPath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FileLocationOfInstallJson {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FileLocationOfInstallJson", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FileLocationOfUpdateJson {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FileLocationOfUpdateJson", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModpackConfigUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModpackConfigUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Remove {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Remove", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string WorkspacePreferences {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("WorkspacePreferences", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SaveWorkspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SaveWorkspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string NewWorkspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("NewWorkspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RecentWorkspaces {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RecentWorkspaces", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Workspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Workspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CreateUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CreateUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RemoveUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RemoveUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Update {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Update", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Tools {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Tools", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Updates {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Updates", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Add {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Add", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Public {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Public", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Id {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Id", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Side {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Side", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateType {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateType", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourceType {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourceType", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string DestinationPath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DestinationPath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string State {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("State", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string InheritFrom {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("InheritFrom", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourcePath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourcePath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string IsDirectory {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("IsDirectory", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string General {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("General", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Name {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string IsExtra {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("IsExtra", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Destination {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Destination", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Source {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Source", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string IsZipArchive {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("IsZipArchive", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourceOwner {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourceOwner", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourceName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourceName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourceRegex {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourceRegex", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SourceUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SourceUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ZipArchivePath {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ZipArchivePath", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Metadata {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Metadata", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Website {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Website", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Select {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Select", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SelectRootFolder {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SelectRootFolder", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
255
ModpackUpdater.Apps.Manager/LangRes/GeneralLangRes.resx
Normal file
255
ModpackUpdater.Apps.Manager/LangRes/GeneralLangRes.resx
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
<?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="ModlistForVersionX" xml:space="preserve">
|
||||||
|
<value>Modlist for v{0}</value>
|
||||||
|
</data>
|
||||||
|
<data name="GitLabInstanceUrl" xml:space="preserve">
|
||||||
|
<value>GitLab instance url</value>
|
||||||
|
</data>
|
||||||
|
<data name="GitLabApiToken" xml:space="preserve">
|
||||||
|
<value>GitLab Api token</value>
|
||||||
|
</data>
|
||||||
|
<data name="RepositoryId" xml:space="preserve">
|
||||||
|
<value>Repository Id</value>
|
||||||
|
</data>
|
||||||
|
<data name="RootFolderPath" xml:space="preserve">
|
||||||
|
<value>Root folder path</value>
|
||||||
|
</data>
|
||||||
|
<data name="FileLocationOfInstallJson" xml:space="preserve">
|
||||||
|
<value>File location of "install.json"</value>
|
||||||
|
</data>
|
||||||
|
<data name="FileLocationOfUpdateJson" xml:space="preserve">
|
||||||
|
<value>File location of "update.json"</value>
|
||||||
|
</data>
|
||||||
|
<data name="ModpackConfigUrl" xml:space="preserve">
|
||||||
|
<value>Modpack config url</value>
|
||||||
|
</data>
|
||||||
|
<data name="Remove" xml:space="preserve">
|
||||||
|
<value>Remove</value>
|
||||||
|
</data>
|
||||||
|
<data name="WorkspacePreferences" xml:space="preserve">
|
||||||
|
<value>Workspace preferences</value>
|
||||||
|
</data>
|
||||||
|
<data name="SaveWorkspace" xml:space="preserve">
|
||||||
|
<value>Save workspace</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewWorkspace" xml:space="preserve">
|
||||||
|
<value>New workspace</value>
|
||||||
|
</data>
|
||||||
|
<data name="RecentWorkspaces" xml:space="preserve">
|
||||||
|
<value>Recent workspace</value>
|
||||||
|
</data>
|
||||||
|
<data name="Workspace" xml:space="preserve">
|
||||||
|
<value>Workspace</value>
|
||||||
|
</data>
|
||||||
|
<data name="CreateUpdate" xml:space="preserve">
|
||||||
|
<value>Create update</value>
|
||||||
|
</data>
|
||||||
|
<data name="RemoveUpdate" xml:space="preserve">
|
||||||
|
<value>Remove update</value>
|
||||||
|
</data>
|
||||||
|
<data name="Update" xml:space="preserve">
|
||||||
|
<value>Update</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tools" xml:space="preserve">
|
||||||
|
<value>Tools</value>
|
||||||
|
</data>
|
||||||
|
<data name="Updates" xml:space="preserve">
|
||||||
|
<value>Updates</value>
|
||||||
|
</data>
|
||||||
|
<data name="Add" xml:space="preserve">
|
||||||
|
<value>Add</value>
|
||||||
|
</data>
|
||||||
|
<data name="Public" xml:space="preserve">
|
||||||
|
<value>Public</value>
|
||||||
|
</data>
|
||||||
|
<data name="Id" xml:space="preserve">
|
||||||
|
<value>Id</value>
|
||||||
|
</data>
|
||||||
|
<data name="Side" xml:space="preserve">
|
||||||
|
<value>Side</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdateType" xml:space="preserve">
|
||||||
|
<value>Update type</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourceType" xml:space="preserve">
|
||||||
|
<value>Source type</value>
|
||||||
|
</data>
|
||||||
|
<data name="DestinationPath" xml:space="preserve">
|
||||||
|
<value>Destination path</value>
|
||||||
|
</data>
|
||||||
|
<data name="State" xml:space="preserve">
|
||||||
|
<value>State</value>
|
||||||
|
</data>
|
||||||
|
<data name="InheritFrom" xml:space="preserve">
|
||||||
|
<value>Inherit from</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourcePath" xml:space="preserve">
|
||||||
|
<value>Source path</value>
|
||||||
|
</data>
|
||||||
|
<data name="IsDirectory" xml:space="preserve">
|
||||||
|
<value>Is directory</value>
|
||||||
|
</data>
|
||||||
|
<data name="General" xml:space="preserve">
|
||||||
|
<value>General</value>
|
||||||
|
</data>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="IsExtra" xml:space="preserve">
|
||||||
|
<value>Is extra</value>
|
||||||
|
</data>
|
||||||
|
<data name="Destination" xml:space="preserve">
|
||||||
|
<value>Destination</value>
|
||||||
|
</data>
|
||||||
|
<data name="Source" xml:space="preserve">
|
||||||
|
<value>Source</value>
|
||||||
|
</data>
|
||||||
|
<data name="IsZipArchive" xml:space="preserve">
|
||||||
|
<value>Is Zip archive</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourceOwner" xml:space="preserve">
|
||||||
|
<value>Source owner</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourceName" xml:space="preserve">
|
||||||
|
<value>Source name</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourceRegex" xml:space="preserve">
|
||||||
|
<value>Source RegEx</value>
|
||||||
|
</data>
|
||||||
|
<data name="SourceUrl" xml:space="preserve">
|
||||||
|
<value>Source URL</value>
|
||||||
|
</data>
|
||||||
|
<data name="ZipArchivePath" xml:space="preserve">
|
||||||
|
<value>ZIP archive path</value>
|
||||||
|
</data>
|
||||||
|
<data name="Metadata" xml:space="preserve">
|
||||||
|
<value>Metadata</value>
|
||||||
|
</data>
|
||||||
|
<data name="Website" xml:space="preserve">
|
||||||
|
<value>Website</value>
|
||||||
|
</data>
|
||||||
|
<data name="Select" xml:space="preserve">
|
||||||
|
<value>Select</value>
|
||||||
|
</data>
|
||||||
|
<data name="SelectRootFolder" xml:space="preserve">
|
||||||
|
<value>Select root folder</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
108
ModpackUpdater.Apps.Manager/LangRes/MsgBoxLangRes.Designer.cs
generated
Normal file
108
ModpackUpdater.Apps.Manager/LangRes/MsgBoxLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class MsgBoxLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal MsgBoxLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.MsgBoxLangRes", typeof(MsgBoxLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ChangelogCopiedToClipboard {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ChangelogCopiedToClipboard", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ChangelogCopiedToClipboard_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ChangelogCopiedToClipboard_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModlistCopiedToClipboard {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModlistCopiedToClipboard", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModlistCopiedToClipboard_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModlistCopiedToClipboard_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModlistGenerated {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModlistGenerated", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ModlistGenerated_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModlistGenerated_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RemoveUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RemoveUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RemoveUpdate_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RemoveUpdate_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateAvailable {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateAvailable", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UpdateAvailable_Title {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateAvailable_Title", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,34 +117,35 @@
|
|||||||
<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>
|
||||||
<data name="MsgBox_UpdateAvailable" xml:space="preserve">
|
<data name="ChangelogCopiedToClipboard" xml:space="preserve">
|
||||||
<value>A new version of this program is available. If you confirm, the update will be installed automatically. It takes just a few seconds. Continue?</value>
|
<value>The changelog for the selected version has been generated and copied to the clipboard.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MsgBox_UpdateAvailable_Title" xml:space="preserve">
|
<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>
|
||||||
|
<data name="UpdateAvailable" xml:space="preserve">
|
||||||
|
<value>A new version of this program is available! Install now?
|
||||||
|
If you confirm, the update will be installed automatically within a few seconds.</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdateAvailable_Title" xml:space="preserve">
|
||||||
<value>New program version available</value>
|
<value>New program version available</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="StatusTest_EverythingOk" xml:space="preserve">
|
|
||||||
<value>Everything is right and up-to-date.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_CheckingForUpdates" xml:space="preserve">
|
|
||||||
<value>Checking for Updates...</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_ConfigIncompleteOrNotLoaded" xml:space="preserve">
|
|
||||||
<value>Config incomplete or not loaded!</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_ErrorWhileUpdateCheckOrUpdate" xml:space="preserve">
|
|
||||||
<value>Error on update check or while updating!</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_Installing" xml:space="preserve">
|
|
||||||
<value>Installing...</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_InstallingAppUpdate" xml:space="preserve">
|
|
||||||
<value>Downloading program update...</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_MinecraftProfileWarning" xml:space="preserve">
|
|
||||||
<value>Minecraft profile folder seems to be not valid.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StatusText_UpdateAvailable" xml:space="preserve">
|
|
||||||
<value>An update is available!</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
66
ModpackUpdater.Apps.Manager/LangRes/SideLangRes.Designer.cs
generated
Normal file
66
ModpackUpdater.Apps.Manager/LangRes/SideLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class SideLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal SideLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.SideLangRes", typeof(SideLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Client {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Client", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Server {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Server", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Both {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Both", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
ModpackUpdater.Apps.Manager/LangRes/SideLangRes.resx
Normal file
30
ModpackUpdater.Apps.Manager/LangRes/SideLangRes.resx
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Client" xml:space="preserve">
|
||||||
|
<value>Client</value>
|
||||||
|
</data>
|
||||||
|
<data name="Server" xml:space="preserve">
|
||||||
|
<value>Server</value>
|
||||||
|
</data>
|
||||||
|
<data name="Both" xml:space="preserve">
|
||||||
|
<value>Both</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
78
ModpackUpdater.Apps.Manager/LangRes/SourceTypeLangRes.Designer.cs
generated
Normal file
78
ModpackUpdater.Apps.Manager/LangRes/SourceTypeLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class SourceTypeLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal SourceTypeLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.SourceTypeLangRes", typeof(SourceTypeLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string DirectLink {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DirectLink", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GitHub {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitHub", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GitLab {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLab", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string CurseForge {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CurseForge", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Modrinth {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Modrinth", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
ModpackUpdater.Apps.Manager/LangRes/SourceTypeLangRes.resx
Normal file
36
ModpackUpdater.Apps.Manager/LangRes/SourceTypeLangRes.resx
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="DirectLink" xml:space="preserve">
|
||||||
|
<value>Direct link</value>
|
||||||
|
</data>
|
||||||
|
<data name="GitHub" xml:space="preserve">
|
||||||
|
<value>GitHub</value>
|
||||||
|
</data>
|
||||||
|
<data name="GitLab" xml:space="preserve">
|
||||||
|
<value>GitLab</value>
|
||||||
|
</data>
|
||||||
|
<data name="CurseForge" xml:space="preserve">
|
||||||
|
<value>CurseForge</value>
|
||||||
|
</data>
|
||||||
|
<data name="Modrinth" xml:space="preserve">
|
||||||
|
<value>Modrinth</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
72
ModpackUpdater.Apps.Manager/LangRes/TitlesLangRes.Designer.cs
generated
Normal file
72
ModpackUpdater.Apps.Manager/LangRes/TitlesLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class TitlesLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal TitlesLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.TitlesLangRes", typeof(TitlesLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CreateUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CreateUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string EditUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("EditUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GitLabRepoWorkspaceEditor {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLabRepoWorkspaceEditor", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string LocalFolderWorkspaceEditor {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("LocalFolderWorkspaceEditor", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
132
ModpackUpdater.Apps.Manager/LangRes/TitlesLangRes.resx
Normal file
132
ModpackUpdater.Apps.Manager/LangRes/TitlesLangRes.resx
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<?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</value>
|
||||||
|
</data>
|
||||||
|
<data name="LocalFolderWorkspaceEditor" xml:space="preserve">
|
||||||
|
<value>Setup local folder</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
78
ModpackUpdater.Apps.Manager/LangRes/UpdateActionTypeLangRes.Designer.cs
generated
Normal file
78
ModpackUpdater.Apps.Manager/LangRes/UpdateActionTypeLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class UpdateActionTypeLangRes {
|
||||||
|
|
||||||
|
private static System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal UpdateActionTypeLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.Equals(null, resourceMan)) {
|
||||||
|
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.UpdateActionTypeLangRes", typeof(UpdateActionTypeLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string None {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("None", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Update {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Update", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Delete {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Delete", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Move {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Move", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string Copy {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Copy", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="None" xml:space="preserve">
|
||||||
|
<value>None</value>
|
||||||
|
</data>
|
||||||
|
<data name="Update" xml:space="preserve">
|
||||||
|
<value>Update</value>
|
||||||
|
</data>
|
||||||
|
<data name="Delete" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="Move" xml:space="preserve">
|
||||||
|
<value>Move</value>
|
||||||
|
</data>
|
||||||
|
<data name="Copy" xml:space="preserve">
|
||||||
|
<value>Copy</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
139
ModpackUpdater.Apps.Manager/ModpackUpdater.Apps.Manager.csproj
Normal file
139
ModpackUpdater.Apps.Manager/ModpackUpdater.Apps.Manager.csproj
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<ApplicationIcon>Assets\app.ico</ApplicationIcon>
|
||||||
|
<AssemblyName>MinecraftModpackUpdateManager</AssemblyName>
|
||||||
|
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||||
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Version.cs" />
|
||||||
|
<Compile Update="LangRes\UpdateActionTypeLangRes.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>UpdateActionTypeLangRes.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="LangRes\SideLangRes.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>SideLangRes.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="LangRes\SourceTypeLangRes.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>SourceTypeLangRes.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Features\Workspaces\LocalFolder\LocalFolderWorkspaceConfigEditorView.axaml.cs">
|
||||||
|
<DependentUpon>GitLabRepoWorkspaceConfigEditorView.axaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.8" />
|
||||||
|
<PackageReference Include="MessageBox.Avalonia" Version="3.3.0" />
|
||||||
|
<PackageReference Include="EPPlus" Version="8.2.1" />
|
||||||
|
<PackageReference Include="NGitLab" Version="11.0.1" />
|
||||||
|
<PackageReference Include="Pilz" Version="2.6.1" />
|
||||||
|
<PackageReference Include="Pilz.Configuration" Version="3.2.7" />
|
||||||
|
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
|
||||||
|
<PackageReference Include="Pilz.Features" Version="2.13.0" />
|
||||||
|
<PackageReference Include="Pilz.UI" Version="3.1.4" />
|
||||||
|
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.18" />
|
||||||
|
<PackageReference Include="Pilz.UI.AvaloniaUI.Features" Version="1.0.1" />
|
||||||
|
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Svg" Version="11.3.0" />
|
||||||
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.8" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.8" />
|
||||||
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
|
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8">
|
||||||
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||||
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets='All' />
|
||||||
|
</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>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>ActionsListLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\FeatureNamesLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>FeatureNamesLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\MsgBoxLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>MsgBoxLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\TitlesLangRes.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>TitlesLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\UpdateActionTypeLangRes.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>UpdateActionTypeLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\SideLangRes.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>SideLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\SourceTypeLangRes.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>SourceTypeLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Pilz">
|
||||||
|
<HintPath>..\..\..\.nuget\packages\pilz\2.6.1\lib\net8.0\Pilz.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
53
ModpackUpdater.Apps.Manager/Program.cs
Normal file
53
ModpackUpdater.Apps.Manager/Program.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Castle.Core.Logging;
|
||||||
|
using OfficeOpenXml;
|
||||||
|
using Pilz.Configuration;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public const string UpdateUrl = "https://git.pilzinsel64.de/litw-refined/minecraft-modpack-updater/-/snippets/3/raw/main/updates-manager.json";
|
||||||
|
|
||||||
|
internal static readonly SettingsManager settingsManager;
|
||||||
|
|
||||||
|
public static ISettings Settings => settingsManager.Instance;
|
||||||
|
|
||||||
|
static Program()
|
||||||
|
{
|
||||||
|
ExcelPackage.License.SetNonCommercialPersonal("Pilzinsel64");
|
||||||
|
settingsManager = new(GetSettingsPath(), true);
|
||||||
|
settingsManager.Instance.Logger = new ConsoleLogger("Settings");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
internal static void Main(string[] args)
|
||||||
|
{
|
||||||
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
|
// see https://aka.ms/applicationconfiguration.
|
||||||
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
{
|
||||||
|
return AppBuilder.Configure<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
.WithInterFont()
|
||||||
|
.LogToTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetSettingsPath()
|
||||||
|
{
|
||||||
|
const string AppDataDirectoryName = "MinecraftModpackUpdateManager";
|
||||||
|
const string settingsFileName = "Settings.json";
|
||||||
|
|
||||||
|
var settingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppDataDirectoryName);
|
||||||
|
Directory.CreateDirectory(settingsPath);
|
||||||
|
settingsPath = Path.Combine(settingsPath, settingsFileName);
|
||||||
|
|
||||||
|
return settingsPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
16
ModpackUpdater.Apps.Manager/Settings/WorkspaceSettings.cs
Normal file
16
ModpackUpdater.Apps.Manager/Settings/WorkspaceSettings.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
456
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml
Normal file
456
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
<Window
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:ModpackUpdater.Apps.Manager.Ui"
|
||||||
|
xmlns:pilz="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||||
|
xmlns:symbols="clr-namespace:Pilz.UI.Symbols;assembly=Pilz.UI"
|
||||||
|
xmlns:mainWindow="clr-namespace:ModpackUpdater.Apps.Manager.Ui.Models.MainWindow"
|
||||||
|
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="ModpackUpdater.Apps.Manager.Ui.MainWindow"
|
||||||
|
Title="Minecraft Modpack Manager"
|
||||||
|
WindowState="Maximized"
|
||||||
|
Loaded="Window_OnLoaded"
|
||||||
|
Closed="Window_OnClosed"
|
||||||
|
KeyDown="Window_OnKeyDown">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
x:Name="GridMain"
|
||||||
|
x:DataType="mainWindow:MainWindowViewModel"
|
||||||
|
RowDefinitions="Auto,*"
|
||||||
|
ColumnDefinitions="Auto,*,500"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6"
|
||||||
|
Margin="3">
|
||||||
|
|
||||||
|
<!-- StackPanel: Workspace -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<!-- Button: Workspace -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonWorkspace"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Workspace}"
|
||||||
|
Background="Transparent">
|
||||||
|
|
||||||
|
<pilz:ImageButton.Flyout>
|
||||||
|
<MenuFlyout>
|
||||||
|
<MenuFlyout.Items>
|
||||||
|
<MenuItem x:Name="MenuItemWorkspacePreferences" Header="{x:Static langRes:GeneralLangRes.WorkspacePreferences}" Click="MenuItemWorkspacePreferences_OnClick"/>
|
||||||
|
<MenuItem x:Name="MenuItemSaveWorkspace" Header="{x:Static langRes:GeneralLangRes.SaveWorkspace}" HotKey="Ctrl+S" Click="MenuItemSaveWorkspace_OnClick"/>
|
||||||
|
<Separator/>
|
||||||
|
<MenuItem x:Name="MenuItemNewWorkspace" Header="{x:Static langRes:GeneralLangRes.NewWorkspace}"/>
|
||||||
|
<Separator/>
|
||||||
|
<MenuItem x:Name="MenuItemRecentWorkspaces" Header="{x:Static langRes:GeneralLangRes.RecentWorkspaces}"/>
|
||||||
|
</MenuFlyout.Items>
|
||||||
|
</MenuFlyout>
|
||||||
|
</pilz:ImageButton.Flyout>
|
||||||
|
</pilz:ImageButton>
|
||||||
|
|
||||||
|
<!-- Button: Update -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonUpdate"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Update}"
|
||||||
|
Background="Transparent">
|
||||||
|
|
||||||
|
<pilz:ImageButton.Flyout>
|
||||||
|
<MenuFlyout>
|
||||||
|
<MenuFlyout.Items>
|
||||||
|
<MenuItem x:Name="MenuItemCreateUpdate" Header="{x:Static langRes:GeneralLangRes.CreateUpdate}" Click="MenuItemCreateUpdate_OnClick"/>
|
||||||
|
<MenuItem x:Name="MenuItemRemoveUpdate" Header="{x:Static langRes:GeneralLangRes.RemoveUpdate}" Click="MenuItemRemoveUpdate_OnClick"/>
|
||||||
|
</MenuFlyout.Items>
|
||||||
|
</MenuFlyout>
|
||||||
|
</pilz:ImageButton.Flyout>
|
||||||
|
</pilz:ImageButton>
|
||||||
|
|
||||||
|
<!-- Button: Tools -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonTools"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Tools}"
|
||||||
|
Background="Transparent"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- TreeView: Workspace -->
|
||||||
|
<ScrollViewer
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
VerticalScrollBarVisibility="Auto">
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<TreeView
|
||||||
|
ItemsSource="{Binding CurrentTreeNodes}"
|
||||||
|
SelectedItem="{Binding SelectedTreeNode}">
|
||||||
|
|
||||||
|
<TreeView.ItemTemplate>
|
||||||
|
<TreeDataTemplate
|
||||||
|
ItemsSource="{Binding Nodes}">
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||||
|
<Image
|
||||||
|
Source="{Binding Image}"
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageSmallSize}"/>
|
||||||
|
<TextBlock Text="{Binding DisplayText}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</TreeDataTemplate>
|
||||||
|
</TreeView.ItemTemplate>
|
||||||
|
</TreeView>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<!-- Panel: List header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
Spacing="6"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
|
||||||
|
<!-- Panel: Menu -->
|
||||||
|
<ContentControl
|
||||||
|
Content="{Binding SelectedTreeNode}">
|
||||||
|
|
||||||
|
<ContentControl.DataTemplates>
|
||||||
|
<DataTemplate
|
||||||
|
DataType="mainWindow:ActionSetTreeNode">
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<!-- Button: Add action -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonAddAction"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Add}"
|
||||||
|
ImageSource="{x:Static local:MainWindow.ButtonImageAddAction}"
|
||||||
|
Background="Transparent"
|
||||||
|
Click="ButtonAddAction_OnClick"/>
|
||||||
|
|
||||||
|
<!-- Button: Remove action -->
|
||||||
|
<pilz:ImageButton
|
||||||
|
x:Name="ButtonRemoveAction"
|
||||||
|
Text="{x:Static langRes:GeneralLangRes.Remove}"
|
||||||
|
ImageSource="{x:Static local:MainWindow.ButtonImageRemoveAction}"
|
||||||
|
Background="Transparent"
|
||||||
|
Click="ButtonRemoveAction_OnClick"/>
|
||||||
|
|
||||||
|
<!-- TextBox: Version -->
|
||||||
|
<TextBox
|
||||||
|
Margin="3, 0, 3, 0"
|
||||||
|
Width="100"
|
||||||
|
Text="{Binding Version}"/>
|
||||||
|
|
||||||
|
<!-- CheckBox: Is public -->
|
||||||
|
<CheckBox
|
||||||
|
Margin="3, 0, 3, 0"
|
||||||
|
Content="{x:Static langRes:GeneralLangRes.Public}"
|
||||||
|
IsChecked="{Binding IsPublic}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate
|
||||||
|
DataType="mainWindow:MainWindowTreeNode"/>
|
||||||
|
</ContentControl.DataTemplates>
|
||||||
|
</ContentControl>
|
||||||
|
|
||||||
|
<!-- ProgressBar: Status -->
|
||||||
|
<ProgressBar
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Maximum="{Binding Progress.MaxValue}"
|
||||||
|
Value="{Binding Progress.Value}"
|
||||||
|
ShowProgressText="{Binding Progress.ShowText}"
|
||||||
|
IsIndeterminate="{Binding Progress.IsGeneric}"
|
||||||
|
IsVisible="{Binding Progress.IsVisible}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- DataGrid -->
|
||||||
|
<DataGrid
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
x:Name="DataGridActions"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ItemsSource="{Binding CurrentGridRows}"
|
||||||
|
SelectedItem="{Binding SelectedGridRow}">
|
||||||
|
|
||||||
|
<DataGrid.ContextMenu>
|
||||||
|
<ContextMenu x:Name="ContextMenuActions"/>
|
||||||
|
</DataGrid.ContextMenu>
|
||||||
|
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.Id}"
|
||||||
|
Binding="{Binding InheritedId}"/>
|
||||||
|
|
||||||
|
<DataGridTextColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.Side}"
|
||||||
|
Binding="{Binding InheritedSide}"/>
|
||||||
|
|
||||||
|
<DataGridTextColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.UpdateType}"
|
||||||
|
Binding="{Binding InheritedUpdateType}"
|
||||||
|
IsVisible="{Binding IsUpdate}"/>
|
||||||
|
|
||||||
|
<DataGridTextColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.SourceType}"
|
||||||
|
Binding="{Binding InheritedSourceType}"/>
|
||||||
|
|
||||||
|
<DataGridTextColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.DestinationPath}"
|
||||||
|
Binding="{Binding InheritedDestPath}"/>
|
||||||
|
|
||||||
|
<DataGridTemplateColumn
|
||||||
|
Header="{x:Static langRes:GeneralLangRes.State}">
|
||||||
|
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageSmallSize}"
|
||||||
|
Source="{Binding StateImage}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
|
<!-- Action editor -->
|
||||||
|
<ScrollViewer
|
||||||
|
x:Name="ScrollViewerInstallAction"
|
||||||
|
Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
DataContext="{Binding SelectedGridRow}"
|
||||||
|
VerticalScrollBarVisibility="Auto">
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<!-- Update -->
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="150,*"
|
||||||
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6"
|
||||||
|
IsVisible="{Binding IsUpdate}">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<Image x:Name="ImageUpdate" Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
<TextBlock Text="{x:Static langRes:GeneralLangRes.Update}" FontSize="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Inherit from -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.InheritFrom}" Target="TextBoxUpdateActionInheritFrom"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
x:Name="TextBoxUpdateActionInheritFrom"
|
||||||
|
Text="{Binding InheritFrom}"/>
|
||||||
|
|
||||||
|
<!-- Update type -->
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.UpdateType}" Target="ComboBoxUpdateActionSourceType"/>
|
||||||
|
<ComboBox
|
||||||
|
Grid.Row="2" Grid.Column="1"
|
||||||
|
x:Name="ComboBoxUpdateActionSourceType"
|
||||||
|
ItemsSource="{x:Static mainWindow:MainWindowGridRow.UpdateActionTypes}"
|
||||||
|
DisplayMemberBinding="{Binding Value}"
|
||||||
|
SelectedValueBinding="{Binding Key}"
|
||||||
|
SelectedValue="{Binding UpdateType}"/>
|
||||||
|
|
||||||
|
<!-- Source path -->
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourcePath}" Target="TextBoxInstallActionSourcePath"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="3" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionSourcePath"
|
||||||
|
Text="{Binding SrcPath}"/>
|
||||||
|
|
||||||
|
<!-- Is Directory -->
|
||||||
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||||
|
x:Name="CheckBoxUpdateActionIsDir"
|
||||||
|
Content="{x:Static langRes:GeneralLangRes.IsDirectory}"
|
||||||
|
IsChecked="{Binding IsDirectory}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- General -->
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="150,*"
|
||||||
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="ImageGeneral"
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
<TextBlock Text="{x:Static langRes:GeneralLangRes.General}" FontSize="20"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Id -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Id}" Target="TextBoxInstallActionId"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionId"
|
||||||
|
Text="{Binding Id}"/>
|
||||||
|
|
||||||
|
<!-- Name -->
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Name}" Target="TextBoxInstallActionName"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="2" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionName"
|
||||||
|
Text="{Binding Name}"/>
|
||||||
|
|
||||||
|
<!-- Side -->
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Side}" Target="ComboBoxInstallActionSide"/>
|
||||||
|
<ComboBox
|
||||||
|
Grid.Row="3" Grid.Column="1"
|
||||||
|
x:Name="ComboBoxInstallActionSide"
|
||||||
|
ItemsSource="{x:Static mainWindow:MainWindowGridRow.Sides}"
|
||||||
|
DisplayMemberBinding="{Binding Value}"
|
||||||
|
SelectedValueBinding="{Binding Key}"
|
||||||
|
SelectedValue="{Binding Side}"/>
|
||||||
|
|
||||||
|
<!-- Is Extra -->
|
||||||
|
<CheckBox
|
||||||
|
Grid.Row="4" Grid.Column="1"
|
||||||
|
x:Name="CheckBoxInstallActionIsExtra"
|
||||||
|
Content="{x:Static langRes:GeneralLangRes.IsExtra}"
|
||||||
|
IsChecked="{Binding IsExtra}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Destination -->
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="150,*"
|
||||||
|
RowDefinitions="Auto,Auto"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="ImageDestination"
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
<TextBlock Text="{x:Static langRes:GeneralLangRes.Destination}" FontSize="20"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Destination path -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.DestinationPath}" Target="TextBoxInstallDestPath"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallDestPath"
|
||||||
|
Text="{Binding DestPath}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Source -->
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="150,*"
|
||||||
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="ImageSource"
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
<TextBlock Text="{x:Static langRes:GeneralLangRes.Source}" FontSize="20"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Source types -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceType}" Target="CheckBoxInstallActionSourceType"/>
|
||||||
|
<ComboBox
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
x:Name="CheckBoxInstallActionSourceType"
|
||||||
|
ItemsSource="{x:Static mainWindow:MainWindowGridRow.SourceTypes}"
|
||||||
|
DisplayMemberBinding="{Binding Value}"
|
||||||
|
SelectedValueBinding="{Binding Key}"
|
||||||
|
SelectedValue="{Binding SourceType}"/>
|
||||||
|
|
||||||
|
<!-- Is Zip -->
|
||||||
|
<CheckBox Grid.Row="2" Grid.Column="1"
|
||||||
|
x:Name="CheckBoxInstallActionIsZip"
|
||||||
|
Content="{x:Static langRes:GeneralLangRes.IsZipArchive}"
|
||||||
|
IsChecked="{Binding IsZip}"/>
|
||||||
|
|
||||||
|
<!-- Source owner -->
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceOwner}" Target="TextBoxInstallActionSourceOwner"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="3" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionSourceOwner"
|
||||||
|
Text="{Binding SourceOwner}"/>
|
||||||
|
|
||||||
|
<!-- Source name -->
|
||||||
|
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceName}" Target="TextBoxInstallActionSourceName"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="4" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionSourceName"
|
||||||
|
Text="{Binding SourceName}"/>
|
||||||
|
|
||||||
|
<!-- Source RegEx -->
|
||||||
|
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceRegex}" Target="TextBoxInstallActionSourceRegEx"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="5" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionSourceRegEx"
|
||||||
|
Text="{Binding SourceRegex}"/>
|
||||||
|
|
||||||
|
<!-- Source url -->
|
||||||
|
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.SourceUrl}" Target="TextBoxInstallActionSourceUrl"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="6" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionSourceUrl" Text="{Binding SourceUrl}"/>
|
||||||
|
|
||||||
|
<!-- Zip archive path -->
|
||||||
|
<Label Grid.Row="7" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.ZipArchivePath}" Target="TextBoxInstallActionZipArchivePath"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="7" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionZipArchivePath"
|
||||||
|
Text="{Binding SourceUrl}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Metadata -->
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="150,*"
|
||||||
|
RowDefinitions="Auto,Auto"
|
||||||
|
RowSpacing="6"
|
||||||
|
ColumnSpacing="6"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<StackPanel
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
x:Name="ImageMetadata"
|
||||||
|
Width="{x:Static symbols:SymbolGlobals.DefaultImageMediumSize}"/>
|
||||||
|
<TextBlock Text="{x:Static langRes:GeneralLangRes.Metadata}" FontSize="20"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Website -->
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static langRes:GeneralLangRes.Website}" Target="TextBoxInstallActionWebsite"/>
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
x:Name="TextBoxInstallActionWebsite"
|
||||||
|
Text="{Binding Website}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
267
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml.cs
Normal file
267
ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml.cs
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Input;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.Settings;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
using Pilz.Extensions;
|
||||||
|
using Pilz.Features;
|
||||||
|
using Pilz.UI.AvaloniaUI.Features;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui;
|
||||||
|
|
||||||
|
public partial class MainWindow : Window, IMainApi
|
||||||
|
{
|
||||||
|
public static IImage? ButtonImageAddAction => AppGlobals.Symbols.GetImageSource(AppSymbols.add);
|
||||||
|
public static IImage? ButtonImageRemoveAction => AppGlobals.Symbols.GetImageSource(AppSymbols.remove);
|
||||||
|
|
||||||
|
private WorkspaceFeature? curWs;
|
||||||
|
|
||||||
|
public MainWindowViewModel Model { get; } = new();
|
||||||
|
Window IMainApi.MainWindow => this;
|
||||||
|
public IMainApi MainApi => this;
|
||||||
|
public bool HasClosed { get; private set; }
|
||||||
|
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Title = $"{Title} (v{Assembly.GetExecutingAssembly().GetAppVersion().ToShortString()})";
|
||||||
|
|
||||||
|
GridMain.DataContext = Model;
|
||||||
|
|
||||||
|
ButtonWorkspace.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.workspace);
|
||||||
|
MenuItemWorkspacePreferences.Icon = AppGlobals.Symbols.GetImage(AppSymbols.settings, SymbolSize.Small);
|
||||||
|
MenuItemSaveWorkspace.Icon = AppGlobals.Symbols.GetImage(AppSymbols.save, SymbolSize.Small);
|
||||||
|
MenuItemNewWorkspace.Icon = AppGlobals.Symbols.GetImage(AppSymbols.new_window, SymbolSize.Small);
|
||||||
|
MenuItemRecentWorkspaces.Icon = AppGlobals.Symbols.GetImage(AppSymbols.time_machine, SymbolSize.Small);
|
||||||
|
ButtonUpdate.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.update_done);
|
||||||
|
ButtonTools.ImageSource = AppGlobals.Symbols.GetImageSource(AppSymbols.tools);
|
||||||
|
MenuItemCreateUpdate.Icon = AppGlobals.Symbols.GetImage(AppSymbols.add, SymbolSize.Small);
|
||||||
|
MenuItemRemoveUpdate.Icon = AppGlobals.Symbols.GetImage(AppSymbols.remove, SymbolSize.Small);
|
||||||
|
ImageUpdate.Source = AppGlobals.Symbols.GetImageSource(AppSymbols.update_done);
|
||||||
|
ImageMetadata.Source = AppGlobals.Symbols.GetImageSource(AppSymbols.show_property);
|
||||||
|
ImageGeneral.Source = AppGlobals.Symbols.GetImageSource(AppSymbols.normal_screen);
|
||||||
|
ImageSource.Source = AppGlobals.Symbols.GetImageSource(AppSymbols.input);
|
||||||
|
ImageDestination.Source = AppGlobals.Symbols.GetImageSource(AppSymbols.output);
|
||||||
|
|
||||||
|
PluginFeatureController.Instance.Features.Get(FeatureTypes.Workspace).Ordered().InsertItemsTo(MenuItemNewWorkspace.Items,
|
||||||
|
customClickHandler: MenuItemNewWorkspaceItem_Click,
|
||||||
|
insertPrioSplitters: true);
|
||||||
|
|
||||||
|
PluginFeatureController.Instance.Features.Get(FeatureTypes.ActionsContextMenu).Ordered().InsertItemsTo(ContextMenuActions.Items,
|
||||||
|
customClickHandler: MenuItemActionItem_Click,
|
||||||
|
insertPrioSplitters: true);
|
||||||
|
|
||||||
|
var menuFlyoutTools = new MenuFlyout();
|
||||||
|
ButtonTools.Flyout = menuFlyoutTools;
|
||||||
|
PluginFeatureController.Instance.Functions.Get(FeatureTypes.Tools).InsertItemsTo(menuFlyoutTools.Items,
|
||||||
|
customClickHandler: MenuItemToolsItem_Click,
|
||||||
|
insertPrioSplitters: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadNewWorkspace(IWorkspace? workspace, WorkspaceFeature feature)
|
||||||
|
{
|
||||||
|
if (workspace is null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!await workspace.Load())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (workspace != Model.CurrentWorkspace)
|
||||||
|
{
|
||||||
|
Model.CurrentWorkspace = workspace;
|
||||||
|
curWs = feature;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddToRecentFiles(workspace);
|
||||||
|
LoadRecentWorkspaces();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task SaveWorkspace()
|
||||||
|
{
|
||||||
|
if (Model.CurrentWorkspace is not { } ws)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Model.Progress.Start();
|
||||||
|
await ws.Save();
|
||||||
|
Model.Progress.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadRecentWorkspaces()
|
||||||
|
{
|
||||||
|
var settings = Program.Settings.Get<WorkspaceSettings>();
|
||||||
|
MenuItemRecentWorkspaces.Items.Clear();
|
||||||
|
|
||||||
|
settings.Workspaces.ForEach(config =>
|
||||||
|
{
|
||||||
|
if (PluginFeatureController.Instance.Features.Get(FeatureTypes.Workspace).OfType<WorkspaceFeature>().FirstOrDefault(n => n.Identifier == config.ProviderId) is not WorkspaceFeature feature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var item = new MenuItem
|
||||||
|
{
|
||||||
|
Header = config.DisplayText,
|
||||||
|
Icon = feature.Icon,
|
||||||
|
DataContext = new MainWindowRecentFilesItem(config, feature),
|
||||||
|
};
|
||||||
|
item.Click += MenuItemRecentWorkspaceItem_Click;
|
||||||
|
MenuItemRecentWorkspaces.Items.Add(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static 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 void Window_OnLoaded(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var updater = new AppUpdates(Program.UpdateUrl, this);
|
||||||
|
updater.OnDownloadProgramUpdate += (o, args) => Model.Progress.Start();
|
||||||
|
await updater.UpdateApp();
|
||||||
|
Model.Progress.Stop();
|
||||||
|
|
||||||
|
LoadRecentWorkspaces();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_OnClosed(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
HasClosed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Window_OnKeyDown(object? sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyModifiers == KeyModifiers.Control && e.Key == Key.Space)
|
||||||
|
await SaveWorkspace();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemNewWorkspaceItem_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is not MenuItem item || item.Tag is not WorkspaceFeature feature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var context = new WorkspaceContext(MainApi, null);
|
||||||
|
await feature.Configure(context);
|
||||||
|
if (!context.Canceled)
|
||||||
|
await LoadNewWorkspace(context.Workspace, feature);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemWorkspacePreferences_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (curWs is null || Model.CurrentWorkspace is null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var context = new WorkspaceContext(MainApi, Model.CurrentWorkspace);
|
||||||
|
await curWs.Configure(context);
|
||||||
|
if (!context.Canceled)
|
||||||
|
await LoadNewWorkspace(context.Workspace, curWs);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemSaveWorkspace_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
await SaveWorkspace();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemRecentWorkspaceItem_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is MenuItem item && item.DataContext is MainWindowRecentFilesItem tag && tag.Feature.CreateFromConfig(tag.Config) is IWorkspace workspace)
|
||||||
|
await LoadNewWorkspace(workspace, tag.Feature);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemToolsItem_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is MenuItem item && item.Tag is PluginFunction func)
|
||||||
|
await func.ExecuteAsync(new MainApiParameters(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void MenuItemActionItem_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is MenuItem item && item.Tag is PluginFunction func)
|
||||||
|
await func.ExecuteAsync(new MainApiParameters(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MenuItemCreateUpdate_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Model.CurrentWorkspace?.UpdateInfos is null
|
||||||
|
|| Model.CurrentTreeNodes?.ElementAtOrDefault(1) is not { } nodeUpdates)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var update = new UpdateInfo
|
||||||
|
{
|
||||||
|
Version = new(),
|
||||||
|
};
|
||||||
|
Model.CurrentWorkspace.UpdateInfos.Updates.Insert(0, update);
|
||||||
|
nodeUpdates.Nodes.Insert(0, new ActionSetTreeNode(update));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MenuItemRemoveUpdate_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Model.CurrentWorkspace?.UpdateInfos is null
|
||||||
|
|| Model.CurrentTreeNodes?.ElementAtOrDefault(1) is not { } nodeUpdates
|
||||||
|
|| Model.SelectedTreeNode is not ActionSetTreeNode nodeUpdate
|
||||||
|
|| nodeUpdate.Infos is not UpdateInfo update)
|
||||||
|
return;
|
||||||
|
|
||||||
|
nodeUpdates.Nodes.Remove(nodeUpdate);
|
||||||
|
Model.CurrentWorkspace.UpdateInfos.Updates.Remove(update);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonAddAction_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Model.CurrentWorkspace?.InstallInfos is not { } rootInfos
|
||||||
|
|| Model.SelectedTreeNode is not ActionSetTreeNode nodeUpdate
|
||||||
|
|| Model.CurrentGridRows is not { } rows)
|
||||||
|
return;
|
||||||
|
|
||||||
|
InstallAction action;
|
||||||
|
|
||||||
|
switch (nodeUpdate.Infos)
|
||||||
|
{
|
||||||
|
case UpdateInfo updateInfos:
|
||||||
|
updateInfos.Actions.Add((UpdateAction)(action = new UpdateAction()));
|
||||||
|
break;
|
||||||
|
case InstallInfos installInfos:
|
||||||
|
installInfos.Actions.Add(action = new InstallAction());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
rows.Add(new MainWindowGridRow(action, rootInfos));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonRemoveAction_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Model.SelectedGridRow is not { } row
|
||||||
|
|| Model.SelectedTreeNode is not ActionSetTreeNode nodeUpdate
|
||||||
|
|| Model.CurrentGridRows is not { } rows)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (nodeUpdate.Infos)
|
||||||
|
{
|
||||||
|
case UpdateInfo updateInfos:
|
||||||
|
if (row.Action is UpdateAction action)
|
||||||
|
updateInfos.Actions.Remove(action);
|
||||||
|
break;
|
||||||
|
case InstallInfos installInfos:
|
||||||
|
installInfos.Actions.Remove(row.Action);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
rows.Remove(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using ModpackUpdater.Apps.Manager.Utils;
|
||||||
|
using PropertyChanged;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
|
||||||
|
public class MainWindowGridRow(InstallAction action, IActionSet baseActions) : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
public static Dictionary<SourceType, string> SourceTypes { get; } = Enum.GetValues<SourceType>().ToDictionary(n => n, n => SourceTypeLangRes.ResourceManager.GetString( Enum.GetName(n)!)!);
|
||||||
|
public static Dictionary<Side, string> Sides { get; } = Enum.GetValues<Side>().ToDictionary(n => n, n => SideLangRes.ResourceManager.GetString(Enum.GetName(n)!)!);
|
||||||
|
public static Dictionary<UpdateActionType, string> UpdateActionTypes { get; } = Enum.GetValues<UpdateActionType>().ToDictionary(n => n, n => UpdateActionTypeLangRes.ResourceManager.GetString(Enum.GetName(n)!)!);
|
||||||
|
|
||||||
|
public InstallAction Action => action;
|
||||||
|
private InstallAction? Base => action is UpdateAction ua ? baseActions.Actions.FirstOrDefault(n => n.Id == ua.InheritFrom) : null;
|
||||||
|
private InstallAction Inherited => Base ?? action;
|
||||||
|
|
||||||
|
public bool IsUpdate => action is UpdateAction;
|
||||||
|
public IImage? StateImage { get; set; }
|
||||||
|
|
||||||
|
[DependsOn(nameof(Id), nameof(InheritFrom))]
|
||||||
|
public string? InheritedId => action is UpdateAction ua && !string.IsNullOrWhiteSpace(ua.InheritFrom) ? ua.InheritFrom : action.Id;
|
||||||
|
[DependsOn(nameof(Side), nameof(InheritedId), nameof(Id))]
|
||||||
|
public string InheritedSide => Sides[Inherited.Side];
|
||||||
|
[DependsOn(nameof(UpdateType), nameof(InheritedId), nameof(Id))]
|
||||||
|
public string InheritedUpdateType => action is UpdateAction ua ? UpdateActionTypes[ua.Type] : string.Empty;
|
||||||
|
[DependsOn(nameof(SourceType), nameof(InheritedId), nameof(Id))]
|
||||||
|
public string InheritedSourceType => SourceTypes[Inherited.SourceType];
|
||||||
|
[DependsOn(nameof(DestPath), nameof(InheritedId), nameof(Id))]
|
||||||
|
public string? InheritedDestPath => Inherited.DestPath;
|
||||||
|
|
||||||
|
public string? Id
|
||||||
|
{
|
||||||
|
get => action.Id;
|
||||||
|
set => action.Id = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? Name
|
||||||
|
{
|
||||||
|
get => action.Name;
|
||||||
|
set => action.Name = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? Website
|
||||||
|
{
|
||||||
|
get => action.Website;
|
||||||
|
set => action.Website = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsZip
|
||||||
|
{
|
||||||
|
get => action.IsZip;
|
||||||
|
set => action.IsZip = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? ZipPath
|
||||||
|
{
|
||||||
|
get => action.ZipPath;
|
||||||
|
set => action.ZipPath = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? DestPath
|
||||||
|
{
|
||||||
|
get => action.DestPath;
|
||||||
|
set => action.DestPath = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SourceUrl
|
||||||
|
{
|
||||||
|
get => action.SourceUrl;
|
||||||
|
set => action.SourceUrl = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SourceType SourceType
|
||||||
|
{
|
||||||
|
get => action.SourceType;
|
||||||
|
set => action.SourceType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SourceOwner
|
||||||
|
{
|
||||||
|
get => action.SourceOwner;
|
||||||
|
set => action.SourceOwner = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SourceName
|
||||||
|
{
|
||||||
|
get => action.SourceName;
|
||||||
|
set => action.SourceName = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SourceRegex
|
||||||
|
{
|
||||||
|
get => action.SourceRegex;
|
||||||
|
set => action.SourceRegex = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SourceTag
|
||||||
|
{
|
||||||
|
get => action.SourceTag;
|
||||||
|
set => action.SourceTag = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Side Side
|
||||||
|
{
|
||||||
|
get => action.Side;
|
||||||
|
set => action.Side = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsExtra
|
||||||
|
{
|
||||||
|
get => action.IsExtra;
|
||||||
|
set => action.IsExtra = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateActionType UpdateType
|
||||||
|
{
|
||||||
|
get => action is UpdateAction ua ? ua.Type : default;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (action is UpdateAction ua)
|
||||||
|
ua.Type = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? SrcPath
|
||||||
|
{
|
||||||
|
get => (action as UpdateAction)?.SrcPath;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (action is UpdateAction ua)
|
||||||
|
ua.SrcPath = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsDirectory
|
||||||
|
{
|
||||||
|
get => action is UpdateAction ua && ua.IsDirectory;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (action is UpdateAction ua)
|
||||||
|
ua.IsDirectory = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? InheritFrom
|
||||||
|
{
|
||||||
|
get => (action as UpdateAction)?.InheritFrom;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (action is UpdateAction ua)
|
||||||
|
ua.InheritFrom = value?.Trim().Nullify();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
|
||||||
|
public record class MainWindowRecentFilesItem(WorkspaceConfig Config, WorkspaceFeature Feature);
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using PropertyChanged;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
|
||||||
|
public abstract class MainWindowTreeNode : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
public abstract string DisplayText { get; }
|
||||||
|
public virtual IImage? Image { get; set; }
|
||||||
|
public ObservableCollection<MainWindowTreeNode> Nodes { get; init; } = [];
|
||||||
|
|
||||||
|
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
|
||||||
|
{
|
||||||
|
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
|
||||||
|
field = value;
|
||||||
|
OnPropertyChanged(propertyName);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SimpleMainWindowTreeNode(string text) : MainWindowTreeNode
|
||||||
|
{
|
||||||
|
public override string DisplayText => text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ActionSetTreeNode(IActionSetInfos infos) : MainWindowTreeNode
|
||||||
|
{
|
||||||
|
private string editVersion = infos.Version?.ToString() ?? string.Empty;
|
||||||
|
|
||||||
|
public override string DisplayText => infos.Version?.ToString() ?? string.Empty;
|
||||||
|
public IActionSetInfos Infos => infos;
|
||||||
|
public override IImage? Image => AppGlobals.Symbols.GetImageSource(infos.IsPublic ? AppSymbols.eye : AppSymbols.invisible);
|
||||||
|
|
||||||
|
[AlsoNotifyFor(nameof(DisplayText))]
|
||||||
|
public string Version
|
||||||
|
{
|
||||||
|
get => editVersion;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
infos.Version = System.Version.TryParse(value, out var v) ? v : new();
|
||||||
|
editVersion = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[AlsoNotifyFor(nameof(Image))]
|
||||||
|
public bool IsPublic
|
||||||
|
{
|
||||||
|
get => infos.IsPublic;
|
||||||
|
set => infos.IsPublic = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using PropertyChanged;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||||
|
|
||||||
|
public class MainWindowViewModel : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
private ObservableCollection<MainWindowTreeNode>? currentTreeNodes;
|
||||||
|
private ObservableCollection<MainWindowGridRow>? currentGridRows;
|
||||||
|
private MainWindowTreeNode? selectedTreeNode;
|
||||||
|
private IWorkspace? currentWorkspace;
|
||||||
|
|
||||||
|
public bool IsUpdate => selectedTreeNode is ActionSetTreeNode node && node.Infos is UpdateInfo;
|
||||||
|
public ProgressInfos Progress { get; } = new();
|
||||||
|
public MainWindowGridRow? SelectedGridRow { get; set; }
|
||||||
|
|
||||||
|
[AlsoNotifyFor(nameof(CurrentTreeNodes))]
|
||||||
|
public IWorkspace? CurrentWorkspace
|
||||||
|
{
|
||||||
|
get => currentWorkspace;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
currentTreeNodes = null;
|
||||||
|
currentWorkspace = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableCollection<MainWindowTreeNode>? CurrentTreeNodes
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (currentTreeNodes == null && currentWorkspace?.InstallInfos != null && currentWorkspace?.UpdateInfos != null)
|
||||||
|
currentTreeNodes =
|
||||||
|
[
|
||||||
|
new ActionSetTreeNode(currentWorkspace.InstallInfos),
|
||||||
|
new SimpleMainWindowTreeNode(GeneralLangRes.Updates)
|
||||||
|
{
|
||||||
|
Image = AppGlobals.Symbols.GetImageSource(AppSymbols.update_done),
|
||||||
|
Nodes = [.. currentWorkspace.UpdateInfos.Updates.Select(n => new ActionSetTreeNode(n))],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return currentTreeNodes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[AlsoNotifyFor(nameof(CurrentGridRows))]
|
||||||
|
public MainWindowTreeNode? SelectedTreeNode
|
||||||
|
{
|
||||||
|
get => selectedTreeNode;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
currentGridRows = null;
|
||||||
|
selectedTreeNode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableCollection<MainWindowGridRow>? CurrentGridRows
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (currentGridRows == null && CurrentWorkspace?.InstallInfos != null && selectedTreeNode is ActionSetTreeNode node)
|
||||||
|
currentGridRows = [.. node.Infos.Actions.Select(n => new MainWindowGridRow(n, CurrentWorkspace.InstallInfos))];
|
||||||
|
return currentGridRows;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
48
ModpackUpdater.Apps.Manager/Ui/Models/ProgressInfos.cs
Normal file
48
ModpackUpdater.Apps.Manager/Ui/Models/ProgressInfos.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models;
|
||||||
|
|
||||||
|
public class ProgressInfos : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
public bool IsVisible { get; set; }
|
||||||
|
public bool IsGeneric { get; set; }
|
||||||
|
public bool ShowText { get; set; }
|
||||||
|
public double MaxValue { get; set; }
|
||||||
|
public double Value { get; set; }
|
||||||
|
|
||||||
|
public void Start(int maxValue)
|
||||||
|
{
|
||||||
|
IsGeneric = false;
|
||||||
|
Value = 0;
|
||||||
|
MaxValue = maxValue;
|
||||||
|
ShowText = true;
|
||||||
|
IsVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
ShowText = false;
|
||||||
|
IsGeneric = true;
|
||||||
|
IsVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Set(int value)
|
||||||
|
{
|
||||||
|
if (!IsGeneric)
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Increment()
|
||||||
|
{
|
||||||
|
if (!IsGeneric)
|
||||||
|
Value += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
IsVisible = false;
|
||||||
|
IsGeneric = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
|
||||||
|
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin) : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
public int NewVersion { get; set; }
|
||||||
|
public bool Visible { get; set; } = true;
|
||||||
|
|
||||||
|
public IEnumerable<string> DisplayVersions { get; } = AvailableVersions.Select(n =>
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(n.Value) || n.Value.Equals(n.Key, StringComparison.InvariantCulture))
|
||||||
|
return n.Key;
|
||||||
|
return $"{n.Value} ({n.Value})";
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
|
||||||
|
public record ModUpdates(IList<ModUpdateInfo> List);
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using PropertyChanged;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
|
||||||
|
public class UpdatesCollectorViewModel : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
|
|
||||||
|
public ProgressInfos Progress { get; } = new();
|
||||||
|
public string? SearchText { get; set; }
|
||||||
|
public ObservableCollection<ModUpdateInfo> Updates { get; } = [];
|
||||||
|
}
|
||||||
96
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorView.axaml
Normal file
96
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorView.axaml
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<dialogs:AvaloniaFlyoutBase
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:dialogs="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||||
|
xmlns:updatesCollectorViewMode="clr-namespace:ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode"
|
||||||
|
xmlns:langRes="clr-namespace:ModpackUpdater.Apps.Manager.LangRes"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignWidth="600"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
Width="800"
|
||||||
|
Height="600"
|
||||||
|
x:Class="ModpackUpdater.Apps.Manager.Ui.UpdatesCollectorView"
|
||||||
|
x:DataType="updatesCollectorViewMode:UpdatesCollectorViewModel"
|
||||||
|
Loaded="Me_OnLoaded">
|
||||||
|
|
||||||
|
<!-- Main -->
|
||||||
|
<dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
<Grid
|
||||||
|
RowDefinitions="Auto,*"
|
||||||
|
RowSpacing="6"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
|
||||||
|
<!-- TextBox: Search -->
|
||||||
|
<TextBox
|
||||||
|
Grid.Row="0"
|
||||||
|
Watermark="Search"
|
||||||
|
Text="{Binding SearchText}"
|
||||||
|
TextChanged="TextBoxSearch_OnTextChanged"/>
|
||||||
|
|
||||||
|
<!-- ScrollViewer: Updates -->
|
||||||
|
<ScrollViewer
|
||||||
|
Grid.Row="1">
|
||||||
|
|
||||||
|
<ItemsControl
|
||||||
|
ItemsSource="{Binding Updates}">
|
||||||
|
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="20*,20*,20*,Auto"
|
||||||
|
ColumnSpacing="6"
|
||||||
|
RowSpacing="6"
|
||||||
|
Margin="3"
|
||||||
|
IsVisible="{Binding Visible}">
|
||||||
|
|
||||||
|
<!-- Label: Name -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="{Binding Origin.Name}"/>
|
||||||
|
|
||||||
|
<!-- Label: Version (old) -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="{Binding Origin.SourceTag}"/>
|
||||||
|
|
||||||
|
<!-- ComboBox: Version (new) -->
|
||||||
|
<ComboBox
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Grid.Column="2"
|
||||||
|
ItemsSource="{Binding DisplayVersions}"
|
||||||
|
SelectedIndex="{Binding NewVersion}"/>
|
||||||
|
|
||||||
|
<!-- Button: RemoveUpdate -->
|
||||||
|
<dialogs:ImageButton
|
||||||
|
Grid.Column="3"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Content="{x:Static langRes:GeneralLangRes.Remove}"
|
||||||
|
Click="ButtonRemoveUpdate_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</dialogs:AvaloniaFlyoutBase.MainContent>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<dialogs:AvaloniaFlyoutBase.FooterContent>
|
||||||
|
|
||||||
|
<!-- ProgressBar: Status -->
|
||||||
|
<ProgressBar
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Maximum="{Binding Progress.MaxValue}"
|
||||||
|
Value="{Binding Progress.Value}"
|
||||||
|
ShowProgressText="{Binding Progress.ShowText}"
|
||||||
|
IsIndeterminate="{Binding Progress.IsGeneric}"
|
||||||
|
IsVisible="{Binding Progress.IsVisible}"/>
|
||||||
|
</dialogs:AvaloniaFlyoutBase.FooterContent>
|
||||||
|
</dialogs:AvaloniaFlyoutBase>
|
||||||
72
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorView.axaml.cs
Normal file
72
ModpackUpdater.Apps.Manager/Ui/UpdatesCollectorView.axaml.cs
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||||
|
using ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||||
|
using ModpackUpdater.Manager;
|
||||||
|
using Pilz.UI.AvaloniaUI.Dialogs;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Ui;
|
||||||
|
|
||||||
|
public partial class UpdatesCollectorView : AvaloniaFlyoutBase
|
||||||
|
{
|
||||||
|
private readonly IWorkspace workspace;
|
||||||
|
private readonly ModpackFactory factory = new();
|
||||||
|
private readonly InstallAction[] actions;
|
||||||
|
|
||||||
|
public UpdatesCollectorViewModel Model { get; } = new();
|
||||||
|
|
||||||
|
public UpdatesCollectorView(IWorkspace workspace, params InstallAction[] actions)
|
||||||
|
{
|
||||||
|
this.workspace = workspace;
|
||||||
|
this.actions = actions;
|
||||||
|
DataContext = Model;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task FindUpdates()
|
||||||
|
{
|
||||||
|
Model.Progress.Start(actions.Length);
|
||||||
|
|
||||||
|
foreach (var action in actions)
|
||||||
|
{
|
||||||
|
var updates = await factory.FindUpdates(action, workspace.ModpackConfig?.MinecraftVersion, workspace.ModpackConfig?.ModLoader ?? ModLoader.Any);
|
||||||
|
|
||||||
|
Model.Progress.Increment();
|
||||||
|
|
||||||
|
if (updates == null || updates.Length == 0 || updates[0].Value == action.SourceTag)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Model.Updates.Add(new(updates, action));
|
||||||
|
|
||||||
|
if (IsClosed)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Model.Progress.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override object GetResult()
|
||||||
|
{
|
||||||
|
return new ModUpdates(Model.Updates);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Me_OnLoaded(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
await FindUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBoxSearch_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var searchString = Model.SearchText?.Trim().ToLowerInvariant();
|
||||||
|
var hasNoSearch = string.IsNullOrWhiteSpace(searchString);
|
||||||
|
|
||||||
|
foreach (var item in Model.Updates)
|
||||||
|
item.Visible = hasNoSearch || (item.Origin.Name != null && item.Origin.Name.Contains(searchString!, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonRemoveUpdate_Click(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Button button && button.DataContext is ModUpdateInfo update)
|
||||||
|
Model.Updates.Remove(update);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user