some more work
This commit is contained in:
@@ -26,6 +26,7 @@ internal class Options
|
|||||||
{ "u|uai", "Allow an update directly after install. This only has effect if there is no existing installation.", uai => UpdateOptions.AllowUpdaterAfterInstall = uai != null},
|
{ "u|uai", "Allow an update directly after install. This only has effect if there is no existing installation.", uai => UpdateOptions.AllowUpdaterAfterInstall = uai != null},
|
||||||
{ "noupdate", "Skip the update check.", noupdate => UpdateOptions.NoUpdate = noupdate != null},
|
{ "noupdate", "Skip the update check.", noupdate => UpdateOptions.NoUpdate = noupdate != null},
|
||||||
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = m != null},
|
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = m != null},
|
||||||
|
{ "i|nonpublic", "Include non public (currently hidden) updates.", i => UpdateOptions.IncludeNonPublic = i != null},
|
||||||
{ "k|key=", "An key for retriving extra files on updates.", k => UpdateOptions.ExtrasKey = k},
|
{ "k|key=", "An key for retriving extra files on updates.", k => UpdateOptions.ExtrasKey = k},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ public interface IMainApi
|
|||||||
{
|
{
|
||||||
public IWorkspace? CurWorkspace { get; }
|
public IWorkspace? CurWorkspace { get; }
|
||||||
public IActionSetInfos? CurActionSet { get; }
|
public IActionSetInfos? CurActionSet { get; }
|
||||||
|
public Form MainWindow { get; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using ModpackUpdater.Apps.Manager.Api.Plugins.Params;
|
||||||
|
using ModpackUpdater.Apps.Manager.LangRes;
|
||||||
|
using Pilz.Plugins.Advanced;
|
||||||
|
using Pilz.UI.Symbols;
|
||||||
|
using Pilz.UI.Telerik.Dialogs;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Tools;
|
||||||
|
|
||||||
|
internal class UpdatesCollectorFeature : PluginFunction
|
||||||
|
{
|
||||||
|
public UpdatesCollectorFeature() : base(FeatureTypes.Tools, "origin.updatescollector", FeatureNamesLangRes.UpdatesCollectorFeature)
|
||||||
|
{
|
||||||
|
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.search, SymbolSize.Small);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
|
||||||
|
{
|
||||||
|
if (@params is MainApiParameters p)
|
||||||
|
new UpdatesCollectorUi().Show(p.Api.MainWindow);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
231
ModpackUpdater.Apps.Manager/Features/Tools/UpdatesCollectorUi.Designer.cs
generated
Normal file
231
ModpackUpdater.Apps.Manager/Features/Tools/UpdatesCollectorUi.Designer.cs
generated
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Tools;
|
||||||
|
|
||||||
|
partial class UpdatesCollectorUi
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
var listViewDetailColumn1 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 0", "Name");
|
||||||
|
var listViewDetailColumn2 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 1", "Current version");
|
||||||
|
var listViewDetailColumn3 = new Telerik.WinControls.UI.ListViewDetailColumn("Column 2", "New version");
|
||||||
|
var resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdatesCollectorUi));
|
||||||
|
tableLayoutPanel1 = new TableLayoutPanel();
|
||||||
|
radSplitContainer1 = new Telerik.WinControls.UI.RadSplitContainer();
|
||||||
|
splitPanel1 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
|
splitPanel2 = new Telerik.WinControls.UI.SplitPanel();
|
||||||
|
tableLayoutPanel3 = new TableLayoutPanel();
|
||||||
|
tableLayoutPanel2 = new TableLayoutPanel();
|
||||||
|
radButton_Continue = new Telerik.WinControls.UI.RadButton();
|
||||||
|
radListView_Updates = new Telerik.WinControls.UI.RadListView();
|
||||||
|
radListControl_VersionTags = new Telerik.WinControls.UI.RadListControl();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radSplitContainer1).BeginInit();
|
||||||
|
radSplitContainer1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel1).BeginInit();
|
||||||
|
splitPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel2).BeginInit();
|
||||||
|
splitPanel2.SuspendLayout();
|
||||||
|
tableLayoutPanel3.SuspendLayout();
|
||||||
|
tableLayoutPanel2.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radButton_Continue).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radListView_Updates).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radListControl_VersionTags).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.AutoSize = true;
|
||||||
|
tableLayoutPanel1.ColumnCount = 2;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle());
|
||||||
|
tableLayoutPanel1.Controls.Add(radButton_Continue, 1, 0);
|
||||||
|
tableLayoutPanel1.Dock = DockStyle.Bottom;
|
||||||
|
tableLayoutPanel1.Location = new Point(0, 420);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 1;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
||||||
|
tableLayoutPanel1.Size = new Size(800, 30);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// radSplitContainer1
|
||||||
|
//
|
||||||
|
radSplitContainer1.Controls.Add(splitPanel1);
|
||||||
|
radSplitContainer1.Controls.Add(splitPanel2);
|
||||||
|
radSplitContainer1.Dock = DockStyle.Fill;
|
||||||
|
radSplitContainer1.Location = new Point(0, 0);
|
||||||
|
radSplitContainer1.Name = "radSplitContainer1";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
radSplitContainer1.RootElement.MinSize = new Size(25, 25);
|
||||||
|
radSplitContainer1.Size = new Size(800, 420);
|
||||||
|
radSplitContainer1.TabIndex = 1;
|
||||||
|
radSplitContainer1.TabStop = false;
|
||||||
|
//
|
||||||
|
// splitPanel1
|
||||||
|
//
|
||||||
|
splitPanel1.Controls.Add(tableLayoutPanel2);
|
||||||
|
splitPanel1.Location = new Point(0, 0);
|
||||||
|
splitPanel1.Name = "splitPanel1";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
splitPanel1.RootElement.MinSize = new Size(25, 25);
|
||||||
|
splitPanel1.Size = new Size(516, 420);
|
||||||
|
splitPanel1.SizeInfo.AutoSizeScale = new SizeF(0.148241222F, 0F);
|
||||||
|
splitPanel1.SizeInfo.SplitterCorrection = new Size(118, 0);
|
||||||
|
splitPanel1.TabIndex = 0;
|
||||||
|
splitPanel1.TabStop = false;
|
||||||
|
splitPanel1.Text = "splitPanel1";
|
||||||
|
//
|
||||||
|
// splitPanel2
|
||||||
|
//
|
||||||
|
splitPanel2.Controls.Add(tableLayoutPanel3);
|
||||||
|
splitPanel2.Location = new Point(520, 0);
|
||||||
|
splitPanel2.Name = "splitPanel2";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
splitPanel2.RootElement.MinSize = new Size(25, 25);
|
||||||
|
splitPanel2.Size = new Size(280, 420);
|
||||||
|
splitPanel2.SizeInfo.AutoSizeScale = new SizeF(-0.148241192F, 0F);
|
||||||
|
splitPanel2.SizeInfo.SplitterCorrection = new Size(-118, 0);
|
||||||
|
splitPanel2.TabIndex = 1;
|
||||||
|
splitPanel2.TabStop = false;
|
||||||
|
splitPanel2.Text = "splitPanel2";
|
||||||
|
//
|
||||||
|
// tableLayoutPanel3
|
||||||
|
//
|
||||||
|
tableLayoutPanel3.ColumnCount = 1;
|
||||||
|
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel3.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||||
|
tableLayoutPanel3.Controls.Add(radListControl_VersionTags, 0, 0);
|
||||||
|
tableLayoutPanel3.Dock = DockStyle.Fill;
|
||||||
|
tableLayoutPanel3.Location = new Point(0, 0);
|
||||||
|
tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||||
|
tableLayoutPanel3.RowCount = 1;
|
||||||
|
tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||||
|
tableLayoutPanel3.Size = new Size(280, 420);
|
||||||
|
tableLayoutPanel3.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel2
|
||||||
|
//
|
||||||
|
tableLayoutPanel2.ColumnCount = 1;
|
||||||
|
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 20F));
|
||||||
|
tableLayoutPanel2.Controls.Add(radListView_Updates, 0, 0);
|
||||||
|
tableLayoutPanel2.Dock = DockStyle.Fill;
|
||||||
|
tableLayoutPanel2.Location = new Point(0, 0);
|
||||||
|
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||||
|
tableLayoutPanel2.RowCount = 1;
|
||||||
|
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||||
|
tableLayoutPanel2.Size = new Size(516, 420);
|
||||||
|
tableLayoutPanel2.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// radButton_Continue
|
||||||
|
//
|
||||||
|
radButton_Continue.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
radButton_Continue.DialogResult = DialogResult.OK;
|
||||||
|
radButton_Continue.ImageAlignment = ContentAlignment.MiddleRight;
|
||||||
|
radButton_Continue.Location = new Point(647, 3);
|
||||||
|
radButton_Continue.Name = "radButton_Continue";
|
||||||
|
radButton_Continue.Size = new Size(150, 24);
|
||||||
|
radButton_Continue.TabIndex = 0;
|
||||||
|
radButton_Continue.Text = "Continue";
|
||||||
|
radButton_Continue.TextAlignment = ContentAlignment.MiddleLeft;
|
||||||
|
radButton_Continue.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
|
//
|
||||||
|
// radListView_Updates
|
||||||
|
//
|
||||||
|
radListView_Updates.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
listViewDetailColumn1.HeaderText = "Name";
|
||||||
|
listViewDetailColumn2.HeaderText = "Current version";
|
||||||
|
listViewDetailColumn2.Width = 120F;
|
||||||
|
listViewDetailColumn3.HeaderText = "New version";
|
||||||
|
listViewDetailColumn3.Width = 120F;
|
||||||
|
radListView_Updates.Columns.AddRange(new Telerik.WinControls.UI.ListViewDetailColumn[] { listViewDetailColumn1, listViewDetailColumn2, listViewDetailColumn3 });
|
||||||
|
radListView_Updates.ItemSpacing = -1;
|
||||||
|
radListView_Updates.Location = new Point(3, 3);
|
||||||
|
radListView_Updates.Name = "radListView_Updates";
|
||||||
|
radListView_Updates.Size = new Size(510, 414);
|
||||||
|
radListView_Updates.TabIndex = 0;
|
||||||
|
radListView_Updates.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
|
||||||
|
radListView_Updates.SelectedItemChanged += RadListView_Updates_SelectedItemChanged;
|
||||||
|
//
|
||||||
|
// radListControl_VersionTags
|
||||||
|
//
|
||||||
|
radListControl_VersionTags.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
radListControl_VersionTags.ItemHeight = 24;
|
||||||
|
radListControl_VersionTags.Location = new Point(3, 3);
|
||||||
|
radListControl_VersionTags.Name = "radListControl_VersionTags";
|
||||||
|
radListControl_VersionTags.Size = new Size(274, 414);
|
||||||
|
radListControl_VersionTags.TabIndex = 0;
|
||||||
|
radListControl_VersionTags.SelectedValueChanged += RadListControl_VersionTags_SelectedValueChanged;
|
||||||
|
//
|
||||||
|
// UpdatesCollectorUi
|
||||||
|
//
|
||||||
|
AutoScaleBaseSize = new Size(7, 15);
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(radSplitContainer1);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||||
|
Name = "UpdatesCollectorUi";
|
||||||
|
Text = "Find updates";
|
||||||
|
Shown += UpdatesCollectorUi_Shown;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)radSplitContainer1).EndInit();
|
||||||
|
radSplitContainer1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel1).EndInit();
|
||||||
|
splitPanel1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)splitPanel2).EndInit();
|
||||||
|
splitPanel2.ResumeLayout(false);
|
||||||
|
tableLayoutPanel3.ResumeLayout(false);
|
||||||
|
tableLayoutPanel2.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)radButton_Continue).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radListView_Updates).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radListControl_VersionTags).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)this).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private Telerik.WinControls.UI.RadButton radButton_Continue;
|
||||||
|
private Telerik.WinControls.UI.RadSplitContainer radSplitContainer1;
|
||||||
|
private Telerik.WinControls.UI.SplitPanel splitPanel1;
|
||||||
|
private TableLayoutPanel tableLayoutPanel2;
|
||||||
|
private Telerik.WinControls.UI.SplitPanel splitPanel2;
|
||||||
|
private TableLayoutPanel tableLayoutPanel3;
|
||||||
|
private Telerik.WinControls.UI.RadListView radListView_Updates;
|
||||||
|
private Telerik.WinControls.UI.RadListControl radListControl_VersionTags;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using ModpackUpdater.Manager;
|
||||||
|
using Telerik.WinControls.UI;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Apps.Manager.Features.Tools;
|
||||||
|
|
||||||
|
public partial class UpdatesCollectorUi : RadForm
|
||||||
|
{
|
||||||
|
private readonly ModpackFactory factory = new();
|
||||||
|
|
||||||
|
public UpdatesCollectorUi()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdatesCollectorUi_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RadListView_Updates_SelectedItemChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RadListControl_VersionTags_SelectedValueChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
1787
ModpackUpdater.Apps.Manager/Features/Tools/UpdatesCollectorUi.resx
Normal file
1787
ModpackUpdater.Apps.Manager/Features/Tools/UpdatesCollectorUi.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ internal class GitLabRepoWorkspaceFeature : WorkspaceFeature, IPluginFeatureProv
|
|||||||
{
|
{
|
||||||
public static GitLabRepoWorkspaceFeature Instance { get; } = new();
|
public static GitLabRepoWorkspaceFeature Instance { get; } = new();
|
||||||
|
|
||||||
public GitLabRepoWorkspaceFeature() : base("origin.gitlab", "GitLab repository")
|
public GitLabRepoWorkspaceFeature() : base("origin.gitlab", FeatureNamesLangRes.GitLabWorkspace)
|
||||||
{
|
{
|
||||||
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.gitlab, SymbolSize.Small);
|
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.gitlab, SymbolSize.Small);
|
||||||
}
|
}
|
||||||
|
|||||||
81
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.Designer.cs
generated
Normal file
81
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.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.Manager.LangRes {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class FeatureNamesLangRes {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal FeatureNamesLangRes() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.FeatureNamesLangRes", typeof(FeatureNamesLangRes).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die GitLab workspace ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string GitLabWorkspace {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GitLabWorkspace", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sucht eine lokalisierte Zeichenfolge, die Find updates ähnelt.
|
||||||
|
/// </summary>
|
||||||
|
internal static string UpdatesCollectorFeature {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdatesCollectorFeature", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
126
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.resx
Normal file
126
ModpackUpdater.Apps.Manager/LangRes/FeatureNamesLangRes.resx
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<?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="GitLabWorkspace" xml:space="preserve">
|
||||||
|
<value>GitLab workspace</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdatesCollectorFeature" xml:space="preserve">
|
||||||
|
<value>Find updates</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -34,6 +34,11 @@
|
|||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>ActionsListLangRes.resx</DependentUpon>
|
<DependentUpon>ActionsListLangRes.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="LangRes\FeatureNamesLangRes.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>FeatureNamesLangRes.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
|
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@@ -56,6 +61,10 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>ActionsListLangRes.Designer.cs</LastGenOutput>
|
<LastGenOutput>ActionsListLangRes.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="LangRes\FeatureNamesLangRes.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>FeatureNamesLangRes.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ public partial class MainForm : RadForm, IMainApi
|
|||||||
{
|
{
|
||||||
private WorkspaceTag? wsInfo;
|
private WorkspaceTag? wsInfo;
|
||||||
|
|
||||||
|
Form IMainApi.MainWindow => this;
|
||||||
|
|
||||||
IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace;
|
IWorkspace? IMainApi.CurWorkspace => wsInfo?.Workspace;
|
||||||
|
|
||||||
public IActionSetInfos? CurActionSet => radListControl_Updates.SelectedValue as IActionSetInfos;
|
public IActionSetInfos? CurActionSet => radListControl_Updates.SelectedValue as IActionSetInfos;
|
||||||
@@ -152,7 +154,7 @@ public partial class MainForm : RadForm, IMainApi
|
|||||||
|
|
||||||
private void UpdateUpdateItem(RadListDataItem item)
|
private void UpdateUpdateItem(RadListDataItem item)
|
||||||
{
|
{
|
||||||
if (item.Tag is IActionSetInfos infos)
|
if (item.Value is IActionSetInfos infos)
|
||||||
UpdateUpdateItem(item, infos);
|
UpdateUpdateItem(item, infos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +169,8 @@ public partial class MainForm : RadForm, IMainApi
|
|||||||
item.Text = string.Format(GeneralLangRes.Node_Install, infos.Version.ToString());
|
item.Text = string.Format(GeneralLangRes.Node_Install, infos.Version.ToString());
|
||||||
else
|
else
|
||||||
item.Text = infos.Version.ToString();
|
item.Text = infos.Version.ToString();
|
||||||
|
|
||||||
|
item.SvgImage = AppGlobals.Symbols.GetSvgImage(infos.IsPublic ? AppSymbols.eye : AppSymbols.invisible, SymbolSize.Small);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadActionSet(IActionSetInfos infos)
|
private void LoadActionSet(IActionSetInfos infos)
|
||||||
@@ -487,7 +491,7 @@ public partial class MainForm : RadForm, IMainApi
|
|||||||
private void RadMenuItem_EditUpdate_Click(object sender, EventArgs e)
|
private void RadMenuItem_EditUpdate_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (radListControl_Updates.SelectedItem?.Value is IActionSetInfos infos
|
if (radListControl_Updates.SelectedItem?.Value is IActionSetInfos infos
|
||||||
&& RadDialogBase.Show(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
|
&& RadDialogBase.ShowDialog(new UpdatePropertiesEditorFlyout(infos), TitlesLangRes.EditUpdate, AppGlobals.Symbols.GetSvgImage(AppSymbols.edit, SymbolSize.Small)).IsValid())
|
||||||
UpdateUpdateItem(radListControl_Updates.SelectedItem);
|
UpdateUpdateItem(radListControl_Updates.SelectedItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,11 @@ partial class UpdatePropertiesEditorFlyout
|
|||||||
tableLayoutPanel1 = new TableLayoutPanel();
|
tableLayoutPanel1 = new TableLayoutPanel();
|
||||||
radLabel1 = new Telerik.WinControls.UI.RadLabel();
|
radLabel1 = new Telerik.WinControls.UI.RadLabel();
|
||||||
radTextBox_Version = new Telerik.WinControls.UI.RadTextBox();
|
radTextBox_Version = new Telerik.WinControls.UI.RadTextBox();
|
||||||
|
radCheckBox_IsPublic = new Telerik.WinControls.UI.RadCheckBox();
|
||||||
tableLayoutPanel1.SuspendLayout();
|
tableLayoutPanel1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radLabel1).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)radTextBox_Version).BeginInit();
|
((System.ComponentModel.ISupportInitialize)radTextBox_Version).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// tableLayoutPanel1
|
// tableLayoutPanel1
|
||||||
@@ -44,14 +46,17 @@ partial class UpdatePropertiesEditorFlyout
|
|||||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
|
||||||
tableLayoutPanel1.Controls.Add(radLabel1, 0, 0);
|
tableLayoutPanel1.Controls.Add(radLabel1, 0, 0);
|
||||||
tableLayoutPanel1.Controls.Add(radTextBox_Version, 0, 1);
|
tableLayoutPanel1.Controls.Add(radTextBox_Version, 0, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(radCheckBox_IsPublic, 0, 3);
|
||||||
tableLayoutPanel1.Dock = DockStyle.Fill;
|
tableLayoutPanel1.Dock = DockStyle.Fill;
|
||||||
tableLayoutPanel1.Location = new Point(0, 30);
|
tableLayoutPanel1.Location = new Point(0, 30);
|
||||||
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
tableLayoutPanel1.RowCount = 3;
|
tableLayoutPanel1.RowCount = 4;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
||||||
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
||||||
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
tableLayoutPanel1.RowStyles.Add(new RowStyle());
|
||||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||||
tableLayoutPanel1.Size = new Size(300, 58);
|
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
|
||||||
|
tableLayoutPanel1.Size = new Size(300, 84);
|
||||||
tableLayoutPanel1.TabIndex = 4;
|
tableLayoutPanel1.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// radLabel1
|
// radLabel1
|
||||||
@@ -71,6 +76,14 @@ partial class UpdatePropertiesEditorFlyout
|
|||||||
radTextBox_Version.Size = new Size(294, 24);
|
radTextBox_Version.Size = new Size(294, 24);
|
||||||
radTextBox_Version.TabIndex = 1;
|
radTextBox_Version.TabIndex = 1;
|
||||||
//
|
//
|
||||||
|
// radCheckBox_IsPublic
|
||||||
|
//
|
||||||
|
radCheckBox_IsPublic.Location = new Point(3, 61);
|
||||||
|
radCheckBox_IsPublic.Name = "radCheckBox_IsPublic";
|
||||||
|
radCheckBox_IsPublic.Size = new Size(76, 20);
|
||||||
|
radCheckBox_IsPublic.TabIndex = 3;
|
||||||
|
radCheckBox_IsPublic.Text = "Is public";
|
||||||
|
//
|
||||||
// UpdatePropertiesEditorFlyout
|
// UpdatePropertiesEditorFlyout
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
@@ -81,12 +94,13 @@ partial class UpdatePropertiesEditorFlyout
|
|||||||
Controls.Add(tableLayoutPanel1);
|
Controls.Add(tableLayoutPanel1);
|
||||||
MinimumSize = new Size(300, 0);
|
MinimumSize = new Size(300, 0);
|
||||||
Name = "UpdatePropertiesEditorFlyout";
|
Name = "UpdatePropertiesEditorFlyout";
|
||||||
Size = new Size(300, 118);
|
Size = new Size(300, 144);
|
||||||
Controls.SetChildIndex(tableLayoutPanel1, 0);
|
Controls.SetChildIndex(tableLayoutPanel1, 0);
|
||||||
tableLayoutPanel1.ResumeLayout(false);
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
tableLayoutPanel1.PerformLayout();
|
tableLayoutPanel1.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
|
((System.ComponentModel.ISupportInitialize)radLabel1).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)radTextBox_Version).EndInit();
|
((System.ComponentModel.ISupportInitialize)radTextBox_Version).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)radCheckBox_IsPublic).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -96,4 +110,5 @@ partial class UpdatePropertiesEditorFlyout
|
|||||||
private TableLayoutPanel tableLayoutPanel1;
|
private TableLayoutPanel tableLayoutPanel1;
|
||||||
private Telerik.WinControls.UI.RadLabel radLabel1;
|
private Telerik.WinControls.UI.RadLabel radLabel1;
|
||||||
private Telerik.WinControls.UI.RadTextBox radTextBox_Version;
|
private Telerik.WinControls.UI.RadTextBox radTextBox_Version;
|
||||||
|
private Telerik.WinControls.UI.RadCheckBox radCheckBox_IsPublic;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public partial class UpdatePropertiesEditorFlyout : RadFlyoutBase, ILoadContent
|
|||||||
public void LoadContent()
|
public void LoadContent()
|
||||||
{
|
{
|
||||||
radTextBox_Version.Text = infos.Version.ToString();
|
radTextBox_Version.Text = infos.Version.ToString();
|
||||||
|
radCheckBox_IsPublic.Checked = infos.IsPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool ValidateOK()
|
protected override bool ValidateOK()
|
||||||
@@ -24,6 +25,7 @@ public partial class UpdatePropertiesEditorFlyout : RadFlyoutBase, ILoadContent
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
infos.Version = version;
|
infos.Version = version;
|
||||||
|
infos.IsPublic = radCheckBox_IsPublic.Checked;
|
||||||
|
|
||||||
return base.ValidateOK();
|
return base.ValidateOK();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,4 +29,7 @@ public enum AppSymbols
|
|||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
remove,
|
remove,
|
||||||
|
search,
|
||||||
|
eye,
|
||||||
|
invisible,
|
||||||
}
|
}
|
||||||
|
|||||||
1
ModpackUpdater.Apps/Symbols/eye.svg
Normal file
1
ModpackUpdater.Apps/Symbols/eye.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><radialGradient id="q52hzhdzvMMZA5gZkbbYUa" cx="24.134" cy="19.042" r="21.223" gradientTransform="matrix(1.05 0 0 1.0625 -1.2 -1.563)" gradientUnits="userSpaceOnUse"><stop offset=".55" stop-color="#e4e4e6"/><stop offset=".73" stop-color="#e1e2e4"/><stop offset=".854" stop-color="#d8dadc"/><stop offset=".961" stop-color="#c9cdcf"/><stop offset="1" stop-color="#c1c6c9"/></radialGradient><ellipse cx="24" cy="24" fill="url(#q52hzhdzvMMZA5gZkbbYUa)" rx="21" ry="17"/><linearGradient id="q52hzhdzvMMZA5gZkbbYUb" x1="15.089" x2="33.163" y1="12.089" y2="30.163" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><circle cx="24" cy="21" r="14" fill="url(#q52hzhdzvMMZA5gZkbbYUb)"/><radialGradient id="q52hzhdzvMMZA5gZkbbYUc" cx="19.876" cy="10.758" r="18.169" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4b4b4b"/><stop offset=".531" stop-color="#393939"/><stop offset="1" stop-color="#252525"/></radialGradient><circle cx="24" cy="21" r="7" fill="url(#q52hzhdzvMMZA5gZkbbYUc)"/><circle cx="19" cy="16" r="2" fill="#fff"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
1
ModpackUpdater.Apps/Symbols/invisible.svg
Normal file
1
ModpackUpdater.Apps/Symbols/invisible.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><radialGradient id="tx8Zca041q9EWw3FdAYMda" cx="-7.914" cy="526.782" r="21.223" gradientTransform="matrix(1.05 0 0 -1.0625 32.45 578.375)" gradientUnits="userSpaceOnUse"><stop offset=".55" stop-color="#e4e4e6"/><stop offset=".73" stop-color="#e1e2e4"/><stop offset=".854" stop-color="#d8dadc"/><stop offset=".961" stop-color="#c9cdcf"/><stop offset="1" stop-color="#c1c6c9"/></radialGradient><ellipse cx="24" cy="24" fill="url(#tx8Zca041q9EWw3FdAYMda)" rx="21" ry="17"/><linearGradient id="tx8Zca041q9EWw3FdAYMdb" x1="15.089" x2="33.163" y1="513.911" y2="495.837" gradientTransform="matrix(1 0 0 -1 0 526)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#32bdef"/><stop offset="1" stop-color="#1ea2e4"/></linearGradient><circle cx="24" cy="21" r="14" fill="url(#tx8Zca041q9EWw3FdAYMdb)"/><radialGradient id="tx8Zca041q9EWw3FdAYMdc" cx="19.876" cy="515.242" r="18.169" gradientTransform="matrix(1 0 0 -1 0 526)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4b4b4b"/><stop offset=".531" stop-color="#393939"/><stop offset="1" stop-color="#252525"/></radialGradient><circle cx="24" cy="21" r="7" fill="url(#tx8Zca041q9EWw3FdAYMdc)"/><circle cx="19" cy="16" r="2" fill="#fff"/><path fill="#e52030" d="M44.888,42.734L5.266,3.112c-0.149-0.149-0.39-0.149-0.539,0L3.112,4.728c-0.149,0.149-0.149,0.39,0,0.539l39.622,39.622c0.149,0.149,0.39,0.149,0.539,0l1.616-1.616C45.037,43.124,45.037,42.882,44.888,42.734z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
1
ModpackUpdater.Apps/Symbols/search.svg
Normal file
1
ModpackUpdater.Apps/Symbols/search.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#199be2" d="M35.983,32.448l-3.536,3.536l7.87,7.87c0.195,0.195,0.512,0.195,0.707,0l2.828-2.828c0.195-0.195,0.195-0.512,0-0.707L35.983,32.448z"/><radialGradient id="KGt2acGa95QyN2j07oBX6a" cx="20.024" cy="20.096" r="19.604" gradientUnits="userSpaceOnUse"><stop offset=".693" stop-color="#006185"/><stop offset=".921" stop-color="#35c1f1"/></radialGradient><polygon fill="url(#KGt2acGa95QyN2j07oBX6a)" points="31.601,28.065 28.065,31.601 32.448,35.983 35.983,32.448"/><linearGradient id="KGt2acGa95QyN2j07oBX6b" x1="8.911" x2="31.339" y1="8.911" y2="31.339" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a3ffff"/><stop offset=".223" stop-color="#9dfbff"/><stop offset=".53" stop-color="#8bf1ff"/><stop offset=".885" stop-color="#6ee0ff"/><stop offset="1" stop-color="#63daff"/></linearGradient><circle cx="20" cy="20" r="16" fill="url(#KGt2acGa95QyN2j07oBX6b)"/></svg>
|
||||||
|
After Width: | Height: | Size: 952 B |
82
ModpackUpdater.Manager/ModpackFactory.cs
Normal file
82
ModpackUpdater.Manager/ModpackFactory.cs
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
using Modrinth;
|
||||||
|
using Octokit;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace ModpackUpdater.Manager;
|
||||||
|
|
||||||
|
public class ModpackFactory
|
||||||
|
{
|
||||||
|
private readonly GitHubClient github = new(new ProductHeaderValue("MinecraftModpackUpdater"));
|
||||||
|
private readonly CurseForge.APIClient.ApiClient curseForge = new("b67bd218-e011-4963-ac8a-ffd025e1091f", "pilzinsel64@gmx.de");
|
||||||
|
private readonly ModrinthClient modrinth = new(new ModrinthClientConfig
|
||||||
|
{
|
||||||
|
ModrinthToken = "mrp_zUlDSET5actMUdTU3FK242TXgvlWgaErSSEFuegNG7thLgkC50IiK2NCGOzW",
|
||||||
|
UserAgent = "Pilz.ModpackUpater",
|
||||||
|
});
|
||||||
|
|
||||||
|
~ModpackFactory()
|
||||||
|
{
|
||||||
|
curseForge.Dispose();
|
||||||
|
modrinth.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string> ResolveSourceUrl(InstallAction action)
|
||||||
|
{
|
||||||
|
if (action.SourceType == SourceType.GitHub)
|
||||||
|
{
|
||||||
|
var repo = await github.Repository.Get(action.SourceOwner, action.SourceName);
|
||||||
|
var release = await github.Repository.Release.Get(repo.Id, action.SourceTag);
|
||||||
|
var assets = await github.Repository.Release.GetAllAssets(repo.Id, release.Id);
|
||||||
|
|
||||||
|
if (assets.LastOrDefault(asset => Regex.IsMatch(asset.Name, action.SourceRegex)) is ReleaseAsset asset)
|
||||||
|
return asset.BrowserDownloadUrl;
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.GitLab)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("To be implemented soon.");
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.CurseForge)
|
||||||
|
{
|
||||||
|
var res = await curseForge.GetModFileDownloadUrlAsync(Convert.ToInt32(action.SourceName), Convert.ToInt32(action.SourceTag));
|
||||||
|
if (!string.IsNullOrWhiteSpace(res.Data))
|
||||||
|
return res.Data;
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.Modrinth)
|
||||||
|
{
|
||||||
|
var res = await modrinth.VersionFile.GetVersionByHashAsync(action.SourceTag);
|
||||||
|
var file = res.Files.Length == 1 ? res.Files[0] : res.Files.FirstOrDefault(n => Regex.IsMatch(n.FileName, action.SourceRegex));
|
||||||
|
if (file != null)
|
||||||
|
return file.Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
return action.SourceUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<KeyValuePair<string, string>[]> FindUpdates(InstallAction action, ModLoader modLoader = ModLoader.Any, string? gameVersion = null)
|
||||||
|
{
|
||||||
|
if (action.SourceType == SourceType.GitHub)
|
||||||
|
{
|
||||||
|
var repo = await github.Repository.Get(action.SourceOwner, action.SourceName);
|
||||||
|
var releases = await github.Repository.Release.GetAll(repo.Id);
|
||||||
|
|
||||||
|
return releases.Select(r => new KeyValuePair<string, string>(r.Name, r.TagName)).ToArray();
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.GitLab)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("To be implemented soon.");
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.CurseForge)
|
||||||
|
{
|
||||||
|
var res = await curseForge.GetModFilesAsync(Convert.ToInt32(action.SourceName), gameVersion: "1.7.10", modLoaderType: CurseForge.APIClient.Models.Mods.ModLoaderType.Forge);
|
||||||
|
if (res.Data != null)
|
||||||
|
return res.Data.Select(n => new KeyValuePair<string, string>(n.DisplayName, n.Id.ToString())).ToArray();
|
||||||
|
}
|
||||||
|
else if (action.SourceType == SourceType.Modrinth)
|
||||||
|
{
|
||||||
|
var res = await modrinth.Version.GetProjectVersionListAsync(action.SourceName);
|
||||||
|
return res.Select(v => new KeyValuePair<string, string>($"{v.VersionNumber} {v.ProjectVersionType} {v.Name}", v.Id)).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
using Modrinth;
|
using Newtonsoft.Json;
|
||||||
using Modrinth.Extensions;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Octokit;
|
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using FileMode = System.IO.FileMode;
|
using FileMode = System.IO.FileMode;
|
||||||
|
|
||||||
namespace ModpackUpdater.Manager;
|
namespace ModpackUpdater.Manager;
|
||||||
@@ -24,19 +20,11 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
public delegate void CheckingProgressUpdatedEventHandler(int toCheck, int processed);
|
public delegate void CheckingProgressUpdatedEventHandler(int toCheck, int processed);
|
||||||
|
|
||||||
private readonly HttpClient http = new();
|
private readonly HttpClient http = new();
|
||||||
private readonly GitHubClient github = new(new ProductHeaderValue("MinecraftModpackUpdater"));
|
private readonly ModpackFactory factory = new();
|
||||||
private readonly CurseForge.APIClient.ApiClient curseForge = new("b67bd218-e011-4963-ac8a-ffd025e1091f", "pilzinsel64@gmx.de");
|
|
||||||
private readonly ModrinthClient modrinth = new(new ModrinthClientConfig
|
|
||||||
{
|
|
||||||
ModrinthToken = "mrp_zUlDSET5actMUdTU3FK242TXgvlWgaErSSEFuegNG7thLgkC50IiK2NCGOzW",
|
|
||||||
UserAgent = "Pilz.ModpackUpater",
|
|
||||||
});
|
|
||||||
|
|
||||||
~ModpackInstaller()
|
~ModpackInstaller()
|
||||||
{
|
{
|
||||||
http.Dispose();
|
http.Dispose();
|
||||||
curseForge.Dispose();
|
|
||||||
modrinth.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<UpdateInfos> DownloadUpdateInfos()
|
private async Task<UpdateInfos> DownloadUpdateInfos()
|
||||||
@@ -75,7 +63,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
// Check install actions
|
// Check install actions
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
if (installInfos is not null && installInfos.Actions.Count != 0)
|
if (installInfos is not null && installInfos.IsPublic && installInfos.Actions.Count != 0)
|
||||||
{
|
{
|
||||||
var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || options.IncludeExtras));
|
var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || options.IncludeExtras));
|
||||||
if (actions.Any())
|
if (actions.Any())
|
||||||
@@ -97,7 +85,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
|
|
||||||
if (updateInfos is not null && updateInfos.Updates.Count != 0)
|
if (updateInfos is not null && updateInfos.Updates.Count != 0)
|
||||||
{
|
{
|
||||||
var updatesOrderes = updateInfos.Updates.OrderByDescending(n => n.Version);
|
var updatesOrderes = updateInfos.Updates.Where(n => n.IsPublic || options.IncludeNonPublic).OrderByDescending(n => n.Version);
|
||||||
result.LatestVersion = updatesOrderes.First().Version;
|
result.LatestVersion = updatesOrderes.First().Version;
|
||||||
if (exists)
|
if (exists)
|
||||||
result.CurrentVersion = modpackInfo.Version;
|
result.CurrentVersion = modpackInfo.Version;
|
||||||
@@ -153,7 +141,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
foreach (InstallAction iaction in checkResult.Actions)
|
foreach (InstallAction iaction in checkResult.Actions)
|
||||||
{
|
{
|
||||||
var destFilePath = Path.Combine(modpackInfo.LocaLPath, iaction.DestPath);
|
var destFilePath = Path.Combine(modpackInfo.LocaLPath, iaction.DestPath);
|
||||||
var sourceUrl = await ResolveSourceUrl(iaction);
|
var sourceUrl = await factory.ResolveSourceUrl(iaction);
|
||||||
|
|
||||||
if (iaction is UpdateAction uaction)
|
if (iaction is UpdateAction uaction)
|
||||||
{
|
{
|
||||||
@@ -269,36 +257,4 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
|
|||||||
Extensions.CopyDirectory(zipSrc, destFilePath, true);
|
Extensions.CopyDirectory(zipSrc, destFilePath, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<string> ResolveSourceUrl(InstallAction action)
|
|
||||||
{
|
|
||||||
if (action.SourceType == SourceType.GitHub)
|
|
||||||
{
|
|
||||||
var repo = await github.Repository.Get(action.SourceOwner, action.SourceName);
|
|
||||||
var release = await github.Repository.Release.Get(repo.Id, action.SourceTag);
|
|
||||||
var assets = await github.Repository.Release.GetAllAssets(repo.Id, release.Id);
|
|
||||||
|
|
||||||
if (assets.LastOrDefault(asset => Regex.IsMatch(asset.Name, action.SourceRegex)) is ReleaseAsset asset)
|
|
||||||
return asset.BrowserDownloadUrl;
|
|
||||||
}
|
|
||||||
else if (action.SourceType == SourceType.GitLab)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException("To be implemented soon.");
|
|
||||||
}
|
|
||||||
else if (action.SourceType == SourceType.CurseForge)
|
|
||||||
{
|
|
||||||
var res = await curseForge.GetModFileDownloadUrlAsync(Convert.ToInt32(action.SourceName), Convert.ToInt32(action.SourceTag));
|
|
||||||
if (!string.IsNullOrWhiteSpace(res.Data))
|
|
||||||
return res.Data;
|
|
||||||
}
|
|
||||||
else if (action.SourceType == SourceType.Modrinth)
|
|
||||||
{
|
|
||||||
var res = await modrinth.VersionFile.GetVersionByHashAsync(action.SourceTag);
|
|
||||||
var file = res.Files.Length == 1 ? res.Files[0] : res.Files.FirstOrDefault(n => Regex.IsMatch(n.FileName, action.SourceRegex));
|
|
||||||
if (file != null)
|
|
||||||
return file.Url;
|
|
||||||
}
|
|
||||||
|
|
||||||
return action.SourceUrl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
|
<Nullable>annotations</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
public class UpdateCheckOptions
|
public class UpdateCheckOptions
|
||||||
{
|
{
|
||||||
public bool IgnoreMaintenance { get; set; }
|
public bool IgnoreMaintenance { get; set; }
|
||||||
|
public bool IncludeNonPublic { get; set; }
|
||||||
public bool AllowUpdaterAfterInstall { get; set; } = true;
|
public bool AllowUpdaterAfterInstall { get; set; } = true;
|
||||||
public Side Side { get; set; } = Side.Client;
|
public Side Side { get; set; } = Side.Client;
|
||||||
public bool IncludeExtras { get; set; }
|
public bool IncludeExtras { get; set; }
|
||||||
|
|||||||
@@ -4,5 +4,7 @@ public interface IActionSetInfos
|
|||||||
{
|
{
|
||||||
Version Version { get; set; }
|
Version Version { get; set; }
|
||||||
|
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
|
||||||
IEnumerable<InstallAction> Actions { get; }
|
IEnumerable<InstallAction> Actions { get; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace ModpackUpdater;
|
namespace ModpackUpdater;
|
||||||
|
|
||||||
public class InstallInfos : IActionSetInfos
|
public class InstallInfos : IActionSetInfos
|
||||||
{
|
{
|
||||||
[JsonConverter(typeof(VersionConverter))]
|
[JsonConverter(typeof(Newtonsoft.Json.Converters.VersionConverter))]
|
||||||
public Version Version { get; set; }
|
public Version Version { get; set; }
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
|
public bool IsPublic { get; set; } = true;
|
||||||
|
|
||||||
public List<InstallAction> Actions { get; } = [];
|
public List<InstallAction> Actions { get; } = [];
|
||||||
|
|
||||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions;
|
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions;
|
||||||
|
|||||||
12
ModpackUpdater/ModLoader.cs
Normal file
12
ModpackUpdater/ModLoader.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
namespace ModpackUpdater;
|
||||||
|
|
||||||
|
public enum ModLoader
|
||||||
|
{
|
||||||
|
Any,
|
||||||
|
Forge,
|
||||||
|
Cauldron,
|
||||||
|
LiteLoader,
|
||||||
|
Fabric,
|
||||||
|
Quilt,
|
||||||
|
NeoForge,
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ public class UpdateAction : InstallAction
|
|||||||
{
|
{
|
||||||
[DefaultValue(UpdateActionType.Update)]
|
[DefaultValue(UpdateActionType.Update)]
|
||||||
[JsonConverter(typeof(StringEnumConverter))]
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
public UpdateActionType Type { get; set; }
|
public UpdateActionType Type { get; set; } = UpdateActionType.Update;
|
||||||
|
|
||||||
[DefaultValue(null)]
|
[DefaultValue(null)]
|
||||||
public string SrcPath { get; set; }
|
public string SrcPath { get; set; }
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace ModpackUpdater;
|
namespace ModpackUpdater;
|
||||||
|
|
||||||
public class UpdateInfo : IActionSetInfos
|
public class UpdateInfo : IActionSetInfos
|
||||||
{
|
{
|
||||||
[JsonConverter(typeof(VersionConverter))]
|
[JsonConverter(typeof(Newtonsoft.Json.Converters.VersionConverter))]
|
||||||
public Version Version { get; set; }
|
public Version Version { get; set; }
|
||||||
|
|
||||||
|
[DefaultValue(true)]
|
||||||
|
public bool IsPublic { get; set; } = true;
|
||||||
|
|
||||||
public List<UpdateAction> Actions { get; } = [];
|
public List<UpdateAction> Actions { get; } = [];
|
||||||
|
|
||||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions.Cast<InstallAction>();
|
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions.Cast<InstallAction>();
|
||||||
|
|||||||
Reference in New Issue
Block a user