make list
This commit is contained in:
1
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
1
ModpackUpdater.Apps.Manager/Form1.Designer.cs
generated
@@ -119,6 +119,7 @@ partial class Form1
|
||||
radTreeView_Updates.Name = "radTreeView_Updates";
|
||||
radTreeView_Updates.Size = new Size(240, 416);
|
||||
radTreeView_Updates.TabIndex = 0;
|
||||
radTreeView_Updates.SelectedNodeChanged += RadTreeView_Updates_SelectedNodeChanged;
|
||||
//
|
||||
// splitPanel2
|
||||
//
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ModpackUpdater.Apps.Manager;
|
||||
public partial class Form1 : RadForm, IMainApi
|
||||
{
|
||||
private IWorkspace? workspace;
|
||||
|
||||
|
||||
public IWorkspace? Workspace => workspace;
|
||||
|
||||
private record RecentFileItemTag(WorkspaceConfig Config, WorkspaceFeature Feature);
|
||||
@@ -71,7 +71,7 @@ public partial class Form1 : RadForm, IMainApi
|
||||
private void AddToRecentFiles(IWorkspace workspace)
|
||||
{
|
||||
var settings = Program.Settings.Get<WorkspaceSettings>();
|
||||
|
||||
|
||||
settings.Workspaces.Remove(workspace.Config);
|
||||
settings.Workspaces.Insert(0, workspace.Config);
|
||||
|
||||
@@ -130,9 +130,143 @@ public partial class Form1 : RadForm, IMainApi
|
||||
radWaitingBar_Updates.StopWaiting();
|
||||
}
|
||||
|
||||
private void LoadActionSet()
|
||||
private void LoadActionSet(IActionSetInfos infos)
|
||||
{
|
||||
// ...
|
||||
radGridView_Actions.BeginUpdate();
|
||||
radGridView_Actions.Rows.Clear();
|
||||
radGridView_Actions.Columns.Clear();
|
||||
|
||||
// Add columns
|
||||
radGridView_Actions.Columns.AddRange([
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "name",
|
||||
HeaderText = ActionsListLangRes.Col_Name,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "inherit",
|
||||
HeaderText = ActionsListLangRes.Col_InheritFrom,
|
||||
Width = 150,
|
||||
IsVisible = infos is UpdateInfo,
|
||||
},
|
||||
new GridViewComboBoxColumn
|
||||
{
|
||||
Name = "utype",
|
||||
HeaderText = ActionsListLangRes.Col_UpdateType,
|
||||
Width = 150,
|
||||
IsVisible = infos is UpdateInfo,
|
||||
},
|
||||
new GridViewCheckBoxColumn
|
||||
{
|
||||
Name = "iszip",
|
||||
HeaderText = ActionsListLangRes.Col_IsZip,
|
||||
Width = 50,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "zippath",
|
||||
HeaderText = ActionsListLangRes.Col_ZipPath,
|
||||
Width = 250,
|
||||
},
|
||||
new GridViewCheckBoxColumn
|
||||
{
|
||||
Name = "isdir",
|
||||
HeaderText = ActionsListLangRes.Col_IsDir,
|
||||
Width = 50,
|
||||
IsVisible = infos is UpdateInfo,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srcpath",
|
||||
HeaderText = ActionsListLangRes.Col_SrcPath,
|
||||
Width = 250,
|
||||
IsVisible = infos is UpdateInfo,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "destpath",
|
||||
HeaderText = ActionsListLangRes.Col_DestPath,
|
||||
Width = 250,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srcurl",
|
||||
HeaderText = ActionsListLangRes.Col_SrcUrl,
|
||||
Width = 250,
|
||||
},
|
||||
new GridViewComboBoxColumn
|
||||
{
|
||||
Name = "srctype",
|
||||
HeaderText = ActionsListLangRes.Col_SrcType,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srcowner",
|
||||
HeaderText = ActionsListLangRes.Col_SrcOwner,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srcname",
|
||||
HeaderText = ActionsListLangRes.Col_SrcName,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srcregex",
|
||||
HeaderText = ActionsListLangRes.Col_SrcRegEx,
|
||||
Width = 200,
|
||||
},
|
||||
new GridViewTextBoxColumn
|
||||
{
|
||||
Name = "srctag",
|
||||
HeaderText = ActionsListLangRes.Col_SrcTag,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewComboBoxColumn
|
||||
{
|
||||
Name = "side",
|
||||
HeaderText = ActionsListLangRes.Col_Side,
|
||||
Width = 150,
|
||||
},
|
||||
new GridViewCheckBoxColumn
|
||||
{
|
||||
Name = "isextra",
|
||||
HeaderText = ActionsListLangRes.Col_IsExtra,
|
||||
Width = 50,
|
||||
},
|
||||
]);
|
||||
|
||||
// Add rows
|
||||
foreach (var action in infos.Actions)
|
||||
{
|
||||
var row = radGridView_Actions.Rows.AddNew();
|
||||
row.Tag = action;
|
||||
row.Cells["name"].Value = action.Name;
|
||||
row.Cells["iszip"].Value = action.IsZip;
|
||||
row.Cells["zippath"].Value = action.ZipPath;
|
||||
row.Cells["destpath"].Value = action.DestPath;
|
||||
row.Cells["srcurl"].Value = action.SourceUrl;
|
||||
row.Cells["srcowner"].Value = action.SourceOwner;
|
||||
row.Cells["srcname"].Value = action.SourceName;
|
||||
row.Cells["srcregex"].Value = action.SourceRegex;
|
||||
row.Cells["srctag"].Value = action.SourceTag;
|
||||
row.Cells["side"].Value = action.Side;
|
||||
row.Cells["isextra"].Value = action.IsExtra;
|
||||
|
||||
if (action is UpdateAction uaction)
|
||||
{
|
||||
row.Cells["inherit"].Value = uaction.InheritFrom; // TODO: Find inherit action and put it in here!
|
||||
row.Cells["utype"].Value = uaction.Type;
|
||||
row.Cells["srcpath"].Value = uaction.SrcPath;
|
||||
row.Cells["isdir"].Value = uaction.IsDirectory;
|
||||
}
|
||||
}
|
||||
|
||||
radGridView_Actions.EndUpdate();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
@@ -157,4 +291,10 @@ public partial class Form1 : RadForm, IMainApi
|
||||
if (sender is RadMenuItem item && item.Tag is PluginFunction func)
|
||||
func.Execute(new MainApiParameters(this));
|
||||
}
|
||||
|
||||
private void RadTreeView_Updates_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
|
||||
{
|
||||
if (e.Node?.Tag is IActionSetInfos infos)
|
||||
LoadActionSet(infos);
|
||||
}
|
||||
}
|
||||
|
||||
207
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.Designer.cs
generated
Normal file
207
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.Designer.cs
generated
Normal file
@@ -0,0 +1,207 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.LangRes {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ActionsListLangRes {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal ActionsListLangRes() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModpackUpdater.Apps.Manager.LangRes.ActionsListLangRes", typeof(ActionsListLangRes).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Destination path ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_DestPath {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_DestPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Inherit from ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_InheritFrom {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_InheritFrom", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Is directory ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_IsDir {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_IsDir", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Is Extra ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_IsExtra {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_IsExtra", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Is ZIP ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_IsZip {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_IsZip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Name ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Side ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_Side {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_Side", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source name ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcName {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source owner ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcOwner {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcOwner", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source path ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcPath {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source RegEx ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcRegEx {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcRegEx", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source tag ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcTag {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcTag", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source type ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcType {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Source URL ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_SrcUrl {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_SrcUrl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Update type ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_UpdateType {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_UpdateType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ZIP archive path ähnelt.
|
||||
/// </summary>
|
||||
internal static string Col_ZipPath {
|
||||
get {
|
||||
return ResourceManager.GetString("Col_ZipPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
168
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.resx
Normal file
168
ModpackUpdater.Apps.Manager/LangRes/ActionsListLangRes.resx
Normal file
@@ -0,0 +1,168 @@
|
||||
<?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_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_ZipPath" xml:space="preserve">
|
||||
<value>ZIP archive path</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -29,6 +29,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="LangRes\ActionsListLangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>ActionsListLangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -42,6 +47,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="LangRes\ActionsListLangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ActionsListLangRes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||
|
||||
8
ModpackUpdater/IActionSetInfos.cs
Normal file
8
ModpackUpdater/IActionSetInfos.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public interface IActionSetInfos
|
||||
{
|
||||
Version Version { get; }
|
||||
|
||||
IEnumerable<InstallAction> Actions { get; }
|
||||
}
|
||||
@@ -1,33 +1,44 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class InstallAction
|
||||
{
|
||||
[DefaultValue(null)]
|
||||
public string Name { get; set; }
|
||||
|
||||
public string InheritFrom { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool IsZip { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string ZipPath { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string DestPath { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SourceUrl { get; set; }
|
||||
|
||||
[DefaultValue(SourceType.DirectLink)]
|
||||
public SourceType SourceType { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SourceOwner { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SourceName { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SourceRegex { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SourceTag { get; set; }
|
||||
|
||||
[DefaultValue(Side.Both)]
|
||||
public Side Side { get; set; } = Side.Both;
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool IsExtra { get; set; }
|
||||
|
||||
[JsonProperty, Obsolete]
|
||||
|
||||
@@ -3,12 +3,15 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class InstallInfos
|
||||
public class InstallInfos : IActionSetInfos
|
||||
{
|
||||
[JsonConverter(typeof(VersionConverter))]
|
||||
public Version Version { get; set; }
|
||||
|
||||
public List<InstallAction> Actions { get; } = [];
|
||||
|
||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions;
|
||||
|
||||
public static InstallInfos Parse(string content)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<InstallInfos>(content);
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class UpdateAction : InstallAction
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
[DefaultValue(UpdateActionType.Update)]
|
||||
public UpdateActionType Type { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string SrcPath { get; set; }
|
||||
|
||||
[DefaultValue(false)]
|
||||
public bool IsDirectory { get; set; }
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string InheritFrom { get; set; }
|
||||
}
|
||||
@@ -3,9 +3,12 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class UpdateInfo
|
||||
public class UpdateInfo : IActionSetInfos
|
||||
{
|
||||
[JsonConverter(typeof(VersionConverter))]
|
||||
public Version Version { get; set; }
|
||||
public List<UpdateAction> Actions { get; private set; } = [];
|
||||
|
||||
public List<UpdateAction> Actions { get; } = [];
|
||||
|
||||
IEnumerable<InstallAction> IActionSetInfos.Actions => Actions.Cast<InstallAction>();
|
||||
}
|
||||
Reference in New Issue
Block a user