diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj
index 84386bf19a..3993d3ada0 100644
--- a/Core/CKAN-core.csproj
+++ b/Core/CKAN-core.csproj
@@ -48,6 +48,7 @@
+
diff --git a/Core/Extensions/I18nExtensions.cs b/Core/Extensions/I18nExtensions.cs
new file mode 100644
index 0000000000..78943b94ca
--- /dev/null
+++ b/Core/Extensions/I18nExtensions.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using System.ComponentModel.DataAnnotations;
+
+namespace CKAN.Extensions
+{
+ public static class I18nExtensions
+ {
+
+ public static string Localize(this Enum val)
+ => val.GetType()
+ .GetMember(val.ToString())
+ .FirstOrDefault()?
+ .GetCustomAttribute()
+ .GetDescription();
+
+ }
+}
diff --git a/Core/Utilities.cs b/Core/Utilities.cs
index db9d49998d..e7e81b371e 100644
--- a/Core/Utilities.cs
+++ b/Core/Utilities.cs
@@ -2,6 +2,7 @@
using System.IO;
using System.Diagnostics;
using System.Transactions;
+
using ChinhDo.Transactions.FileManager;
using log4net;
diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj
index 1877684bcb..faf1d91df0 100644
--- a/GUI/CKAN-GUI.csproj
+++ b/GUI/CKAN-GUI.csproj
@@ -48,6 +48,7 @@
+
@@ -200,11 +201,29 @@
HintTextBox.cs
-
+
UserControl
-
- AllModVersions.cs
+
+ Versions.cs
+
+
+ UserControl
+
+
+ Metadata.cs
+
+
+ UserControl
+
+
+ Relationships.cs
+
+
+ UserControl
+
+
+ Contents.cs
UserControl
@@ -689,9 +708,6 @@
..\..\Dialogs\ErrorDialog.cs
-
- HintTextBox.cs
-
GameCommandLineOptionsDialog.cs
@@ -756,32 +772,41 @@
..\..\Main\Main.cs
-
- AllModVersions.cs
+
+ Versions.cs
+
+
+ Metadata.cs
+
+
+ Relationships.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ Contents.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
-
- ..\..\Controls\AllModVersions.cs
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
+
+
+ ..\..\Controls\ModInfoTabs\Versions.cs
ModInfo.cs
@@ -882,27 +907,100 @@
..\..\Controls\ModInfo.cs
-
- ..\..\Controls\ModInfo.cs
-
-
+
..\..\Controls\ModInfo.cs
-
+
..\..\Controls\ModInfo.cs
..\..\Controls\ModInfo.cs
-
+
..\..\Controls\ModInfo.cs
..\..\Controls\ModInfo.cs
-
+
..\..\Controls\ModInfo.cs
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+ ..\..\Controls\ModInfoTabs\Metadata.cs
+
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Relationships.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
+
+ ..\..\Controls\ModInfoTabs\Contents.cs
+
ManageGameInstancesDialog.cs
diff --git a/GUI/Controls/ModInfo.Designer.cs b/GUI/Controls/ModInfo.Designer.cs
index fa2471fd5a..3990686cff 100644
--- a/GUI/Controls/ModInfo.Designer.cs
+++ b/GUI/Controls/ModInfo.Designer.cs
@@ -30,139 +30,41 @@ private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(ModInfo));
- this.ToolTip = new System.Windows.Forms.ToolTip();
- this.ModInfoTabControl = new ThemedTabControl();
- this.MetadataTabPage = new System.Windows.Forms.TabPage();
- this.splitContainer2 = new System.Windows.Forms.SplitContainer();
- this.MetaDataUpperLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
+ this.ModInfoTable = new System.Windows.Forms.TableLayoutPanel();
this.MetadataModuleNameTextBox = new TransparentTextBox();
this.MetadataTagsLabelsPanel = new System.Windows.Forms.FlowLayoutPanel();
this.MetadataModuleAbstractLabel = new System.Windows.Forms.Label();
this.MetadataModuleDescriptionTextBox = new TransparentTextBox();
- this.MetaDataLowerLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
- this.IdentifierLabel = new System.Windows.Forms.Label();
- this.MetadataIdentifierTextBox = new TransparentTextBox();
- this.ReplacementLabel = new System.Windows.Forms.Label();
- this.ReplacementTextBox = new TransparentTextBox();
- this.GameCompatibilityLabel = new System.Windows.Forms.Label();
- this.ReleaseLabel = new System.Windows.Forms.Label();
- this.AuthorLabel = new System.Windows.Forms.Label();
- this.LicenseLabel = new System.Windows.Forms.Label();
- this.MetadataModuleVersionTextBox = new TransparentTextBox();
- this.MetadataModuleLicenseTextBox = new TransparentTextBox();
- this.MetadataModuleAuthorTextBox = new TransparentTextBox();
- this.VersionLabel = new System.Windows.Forms.Label();
- this.MetadataModuleReleaseStatusTextBox = new TransparentTextBox();
- this.MetadataModuleGameCompatibilityTextBox = new TransparentTextBox();
+ this.ModInfoTabControl = new ThemedTabControl();
+ this.MetadataTabPage = new System.Windows.Forms.TabPage();
+ this.Metadata = new CKAN.GUI.Metadata();
this.RelationshipTabPage = new System.Windows.Forms.TabPage();
- this.DependsGraphTree = new System.Windows.Forms.TreeView();
- this.LegendDependsImage = new System.Windows.Forms.PictureBox();
- this.LegendRecommendsImage = new System.Windows.Forms.PictureBox();
- this.LegendSuggestsImage = new System.Windows.Forms.PictureBox();
- this.LegendSupportsImage = new System.Windows.Forms.PictureBox();
- this.LegendConflictsImage = new System.Windows.Forms.PictureBox();
- this.LegendDependsLabel = new System.Windows.Forms.Label();
- this.LegendRecommendsLabel = new System.Windows.Forms.Label();
- this.LegendSuggestsLabel = new System.Windows.Forms.Label();
- this.LegendSupportsLabel = new System.Windows.Forms.Label();
- this.LegendConflictsLabel = new System.Windows.Forms.Label();
- this.ReverseRelationshipsCheckbox = new System.Windows.Forms.CheckBox();
+ this.Relationships = new CKAN.GUI.Relationships();
this.ContentTabPage = new System.Windows.Forms.TabPage();
- this.ContentsPreviewTree = new System.Windows.Forms.TreeView();
- this.ContentsDownloadButton = new System.Windows.Forms.Button();
- this.ContentsOpenButton = new System.Windows.Forms.Button();
- this.NotCachedLabel = new System.Windows.Forms.Label();
- this.AllModVersionsTabPage = new System.Windows.Forms.TabPage();
- this.AllModVersions = new CKAN.GUI.AllModVersions();
- this.ModInfoTabControl.SuspendLayout();
- this.MetadataTabPage.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
- this.splitContainer2.Panel1.SuspendLayout();
- this.splitContainer2.Panel2.SuspendLayout();
- this.splitContainer2.SuspendLayout();
- this.MetaDataUpperLayoutPanel.SuspendLayout();
- this.MetaDataLowerLayoutPanel.SuspendLayout();
- this.RelationshipTabPage.SuspendLayout();
- this.ContentTabPage.SuspendLayout();
- this.AllModVersions.SuspendLayout();
- this.AllModVersionsTabPage.SuspendLayout();
+ this.Contents = new CKAN.GUI.Contents();
+ this.VersionsTabPage = new System.Windows.Forms.TabPage();
+ this.Versions = new CKAN.GUI.Versions();
this.SuspendLayout();
//
- // ToolTip
- //
- this.ToolTip.AutoPopDelay = 10000;
- this.ToolTip.InitialDelay = 250;
- this.ToolTip.ReshowDelay = 250;
- this.ToolTip.ShowAlways = true;
- //
- // ModInfoTabControl
- //
- this.ModInfoTabControl.Appearance = System.Windows.Forms.TabAppearance.Normal;
- this.ModInfoTabControl.BackColor = System.Drawing.SystemColors.Control;
- this.ModInfoTabControl.Multiline = true;
- this.ModInfoTabControl.Controls.Add(this.MetadataTabPage);
- this.ModInfoTabControl.Controls.Add(this.RelationshipTabPage);
- this.ModInfoTabControl.Controls.Add(this.ContentTabPage);
- this.ModInfoTabControl.Controls.Add(this.AllModVersionsTabPage);
- this.ModInfoTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ModInfoTabControl.Location = new System.Drawing.Point(0, 0);
- this.ModInfoTabControl.Name = "ModInfoTabControl";
- this.ModInfoTabControl.Size = new System.Drawing.Size(362, 531);
- this.ModInfoTabControl.TabIndex = 1;
- this.ModInfoTabControl.SelectedIndexChanged += new System.EventHandler(this.ModInfoTabControl_SelectedIndexChanged);
- //
- // MetadataTabPage
- //
- this.MetadataTabPage.BackColor = System.Drawing.SystemColors.Control;
- this.MetadataTabPage.Controls.Add(this.MetaDataLowerLayoutPanel);
- this.MetadataTabPage.Location = new System.Drawing.Point(4, 25);
- this.MetadataTabPage.Name = "MetadataTabPage";
- this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3);
- this.MetadataTabPage.Size = new System.Drawing.Size(354, 502);
- this.MetadataTabPage.TabIndex = 0;
- resources.ApplyResources(this.MetadataTabPage, "MetadataTabPage");
- //
- // splitContainer2
- //
- this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
- this.splitContainer2.Location = new System.Drawing.Point(3, 3);
- this.splitContainer2.Name = "splitContainer2";
- this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
- //
- // splitContainer2.Panel1
- //
- this.splitContainer2.Panel1.Controls.Add(this.MetaDataUpperLayoutPanel);
- this.splitContainer2.Panel1MinSize = 75;
- //
- // splitContainer2.Panel2
- //
- this.splitContainer2.Panel2.Controls.Add(this.ModInfoTabControl);
- this.splitContainer2.Panel2MinSize = 225;
- this.splitContainer2.Size = new System.Drawing.Size(348, 496);
- this.splitContainer2.SplitterWidth = 10;
- this.splitContainer2.SplitterDistance = 235;
- this.splitContainer2.TabIndex = 0;
- //
- // MetaDataUpperLayoutPanel
- //
- this.MetaDataUpperLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.MetaDataUpperLayoutPanel.ColumnCount = 1;
- this.MetaDataUpperLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataModuleNameTextBox, 0, 0);
- this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataTagsLabelsPanel, 0, 1);
- this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataModuleAbstractLabel, 0, 2);
- this.MetaDataUpperLayoutPanel.Controls.Add(this.MetadataModuleDescriptionTextBox, 0, 3);
- this.MetaDataUpperLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetaDataUpperLayoutPanel.Location = new System.Drawing.Point(0, 0);
- this.MetaDataUpperLayoutPanel.Name = "MetaDataUpperLayoutPanel";
- this.MetaDataUpperLayoutPanel.RowCount = 4;
- this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 20F));
- this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
- this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 30F));
- this.MetaDataUpperLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
- this.MetaDataUpperLayoutPanel.Size = new System.Drawing.Size(346, 283);
- this.MetaDataUpperLayoutPanel.TabIndex = 0;
+ // ModInfoTable
+ //
+ this.ModInfoTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.ModInfoTable.ColumnCount = 1;
+ this.ModInfoTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.ModInfoTable.Controls.Add(this.MetadataModuleNameTextBox, 0, 0);
+ this.ModInfoTable.Controls.Add(this.MetadataTagsLabelsPanel, 0, 1);
+ this.ModInfoTable.Controls.Add(this.MetadataModuleAbstractLabel, 0, 2);
+ this.ModInfoTable.Controls.Add(this.MetadataModuleDescriptionTextBox, 0, 3);
+ this.ModInfoTable.Controls.Add(this.ModInfoTabControl, 0, 4);
+ this.ModInfoTable.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ModInfoTable.Name = "ModInfoTable";
+ this.ModInfoTable.RowCount = 5;
+ this.ModInfoTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 20F));
+ this.ModInfoTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
+ this.ModInfoTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 30F));
+ this.ModInfoTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 20F));
+ this.ModInfoTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 20F));
+ this.ModInfoTable.TabIndex = 0;
//
// MetadataModuleNameTextBox
//
@@ -170,22 +72,22 @@ private void InitializeComponent()
this.MetadataModuleNameTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MetadataModuleNameTextBox.Location = new System.Drawing.Point(3, 0);
this.MetadataModuleNameTextBox.Name = "MetadataModuleNameTextBox";
- this.MetadataModuleNameTextBox.Size = new System.Drawing.Size(340, 46);
- this.MetadataModuleNameTextBox.TabIndex = 0;
+ this.MetadataModuleNameTextBox.Size = new System.Drawing.Size(494, 46);
+ this.MetadataModuleNameTextBox.TabIndex = 1;
this.MetadataModuleNameTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.MetadataModuleNameTextBox.ReadOnly = true;
- this.MetadataModuleNameTextBox.BackColor = MetaDataUpperLayoutPanel.BackColor;
+ this.MetadataModuleNameTextBox.BackColor = ModInfoTable.BackColor;
this.MetadataModuleNameTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
this.MetadataModuleNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
resources.ApplyResources(this.MetadataModuleNameTextBox, "MetadataModuleNameTextBox");
- //
+ //
// MetadataTagsLabelsPanel
- //
+ //
this.MetadataTagsLabelsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.MetadataTagsLabelsPanel.Padding = new System.Windows.Forms.Padding(0);
this.MetadataTagsLabelsPanel.Location = new System.Drawing.Point(0, 0);
this.MetadataTagsLabelsPanel.Name = "MetadataTagsLabelsPanel";
- this.MetadataTagsLabelsPanel.Size = new System.Drawing.Size(340, 12);
+ this.MetadataTagsLabelsPanel.Size = new System.Drawing.Size(500, 20);
//
// MetadataModuleAbstractLabel
//
@@ -193,9 +95,9 @@ private void InitializeComponent()
this.MetadataModuleAbstractLabel.ForeColor = System.Drawing.SystemColors.ControlText;
this.MetadataModuleAbstractLabel.Location = new System.Drawing.Point(3, 49);
this.MetadataModuleAbstractLabel.Name = "MetadataModuleAbstractLabel";
- this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(340, 61);
+ this.MetadataModuleAbstractLabel.Size = new System.Drawing.Size(494, 61);
this.MetadataModuleAbstractLabel.AutoSize = true;
- this.MetadataModuleAbstractLabel.TabIndex = 27;
+ this.MetadataModuleAbstractLabel.TabIndex = 2;
this.MetadataModuleAbstractLabel.Text = "";
//
// MetadataModuleDescriptionTextBox
@@ -203,520 +105,130 @@ private void InitializeComponent()
this.MetadataModuleDescriptionTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.MetadataModuleDescriptionTextBox.Location = new System.Drawing.Point(3, 129);
this.MetadataModuleDescriptionTextBox.Name = "MetadataModuleDescriptionLabel";
- this.MetadataModuleDescriptionTextBox.Size = new System.Drawing.Size(340, 121);
- this.MetadataModuleDescriptionTextBox.TabIndex = 28;
+ this.MetadataModuleDescriptionTextBox.Size = new System.Drawing.Size(494, 121);
+ this.MetadataModuleDescriptionTextBox.TabIndex = 3;
this.MetadataModuleDescriptionTextBox.Text = "";
this.MetadataModuleDescriptionTextBox.ReadOnly = true;
- this.MetadataModuleDescriptionTextBox.BackColor = MetaDataUpperLayoutPanel.BackColor;
+ this.MetadataModuleDescriptionTextBox.BackColor = ModInfoTable.BackColor;
this.MetadataModuleDescriptionTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
this.MetadataModuleDescriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.MetadataModuleDescriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
//
- // MetaDataLowerLayoutPanel
- //
- this.MetaDataLowerLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.MetaDataLowerLayoutPanel.ColumnCount = 2;
- this.MetaDataLowerLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
- this.MetaDataLowerLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
- this.MetaDataLowerLayoutPanel.Controls.Add(this.VersionLabel, 0, 0);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.LicenseLabel, 0, 1);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.AuthorLabel, 0, 2);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.ReleaseLabel, 0, 3);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.GameCompatibilityLabel, 0, 4);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.IdentifierLabel, 0, 5);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.ReplacementLabel, 0, 6);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleVersionTextBox, 1, 0);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleLicenseTextBox, 1, 1);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleAuthorTextBox, 1, 2);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleReleaseStatusTextBox, 1, 3);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataModuleGameCompatibilityTextBox, 1, 4);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.MetadataIdentifierTextBox, 1, 5);
- this.MetaDataLowerLayoutPanel.Controls.Add(this.ReplacementTextBox, 1, 6);
- this.MetaDataLowerLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetaDataLowerLayoutPanel.Location = new System.Drawing.Point(0, 0);
- this.MetaDataLowerLayoutPanel.Name = "MetaDataLowerLayoutPanel";
- this.MetaDataLowerLayoutPanel.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0);
- this.MetaDataLowerLayoutPanel.RowCount = 7;
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.MetaDataLowerLayoutPanel.Size = new System.Drawing.Size(346, 255);
- this.MetaDataLowerLayoutPanel.AutoSize = true;
- this.MetaDataLowerLayoutPanel.AutoScroll = true;
- this.MetaDataLowerLayoutPanel.AutoScrollMinSize = new System.Drawing.Size(MetaDataLowerLayoutPanel.Width, MetaDataLowerLayoutPanel.Height + 20);
- this.MetaDataLowerLayoutPanel.VerticalScroll.Enabled = true;
- this.MetaDataLowerLayoutPanel.HorizontalScroll.Enabled = true;
- this.MetaDataLowerLayoutPanel.TabIndex = 0;
- //
- // IdentifierLabel
- //
- this.IdentifierLabel.AutoSize = true;
- this.IdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.IdentifierLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.IdentifierLabel.Location = new System.Drawing.Point(3, 210);
- this.IdentifierLabel.Name = "IdentifierLabel";
- this.IdentifierLabel.Size = new System.Drawing.Size(84, 20);
- this.IdentifierLabel.TabIndex = 28;
- resources.ApplyResources(this.IdentifierLabel, "IdentifierLabel");
- //
- // MetadataIdentifierTextBox
- //
- this.MetadataIdentifierTextBox.AutoSize = true;
- this.MetadataIdentifierTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataIdentifierTextBox.Location = new System.Drawing.Point(93, 210);
- this.MetadataIdentifierTextBox.Name = "MetadataIdentifierTextBox";
- this.MetadataIdentifierTextBox.Size = new System.Drawing.Size(250, 20);
- this.MetadataIdentifierTextBox.TabIndex = 27;
- this.MetadataIdentifierTextBox.ReadOnly = true;
- this.MetadataIdentifierTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataIdentifierTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataIdentifierTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataIdentifierTextBox, "MetadataIdentifierTextBox");
- //
- // ReplacementLabel
- //
- this.ReplacementLabel.AutoSize = true;
- this.ReplacementLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ReplacementLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ReplacementLabel.Location = new System.Drawing.Point(3, 240);
- this.ReplacementLabel.Name = "ReplacementLabel";
- this.ReplacementLabel.Size = new System.Drawing.Size(84, 20);
- this.ReplacementLabel.TabIndex = 28;
- resources.ApplyResources(this.ReplacementLabel, "ReplacementLabel");
- //
- // ReplacementTextBox
- //
- this.ReplacementTextBox.AutoSize = true;
- this.ReplacementTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ReplacementTextBox.Location = new System.Drawing.Point(93, 240);
- this.ReplacementTextBox.Name = "ReplacementTextBox";
- this.ReplacementTextBox.Size = new System.Drawing.Size(250, 20);
- this.ReplacementTextBox.TabIndex = 27;
- this.ReplacementTextBox.ReadOnly = true;
- this.ReplacementTextBox.BackColor = MetadataTabPage.BackColor;
- this.ReplacementTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.ReplacementTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.ReplacementTextBox, "ReplacementTextBox");
- //
- // GameCompatibilityLabel
- //
- this.GameCompatibilityLabel.AutoSize = true;
- this.GameCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.GameCompatibilityLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.GameCompatibilityLabel.Location = new System.Drawing.Point(3, 180);
- this.GameCompatibilityLabel.Name = "GameCompatibilityLabel";
- this.GameCompatibilityLabel.Size = new System.Drawing.Size(84, 30);
- this.GameCompatibilityLabel.TabIndex = 13;
- resources.ApplyResources(this.GameCompatibilityLabel, "GameCompatibilityLabel");
- //
- // ReleaseLabel
- //
- this.ReleaseLabel.AutoSize = true;
- this.ReleaseLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ReleaseLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ReleaseLabel.Location = new System.Drawing.Point(3, 150);
- this.ReleaseLabel.Name = "ReleaseLabel";
- this.ReleaseLabel.Size = new System.Drawing.Size(84, 30);
- this.ReleaseLabel.TabIndex = 12;
- resources.ApplyResources(this.ReleaseLabel, "ReleaseLabel");
- //
- // AuthorLabel
- //
- this.AuthorLabel.AutoSize = true;
- this.AuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.AuthorLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.AuthorLabel.Location = new System.Drawing.Point(3, 60);
- this.AuthorLabel.Name = "AuthorLabel";
- this.AuthorLabel.Size = new System.Drawing.Size(84, 30);
- this.AuthorLabel.TabIndex = 5;
- resources.ApplyResources(this.AuthorLabel, "AuthorLabel");
- //
- // LicenseLabel
- //
- this.LicenseLabel.AutoSize = true;
- this.LicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.LicenseLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.LicenseLabel.Location = new System.Drawing.Point(3, 30);
- this.LicenseLabel.Name = "LicenseLabel";
- this.LicenseLabel.Size = new System.Drawing.Size(84, 30);
- this.LicenseLabel.TabIndex = 3;
- resources.ApplyResources(this.LicenseLabel, "LicenseLabel");
- //
- // MetadataModuleVersionTextBox
- //
- this.MetadataModuleVersionTextBox.AutoSize = true;
- this.MetadataModuleVersionTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataModuleVersionTextBox.Location = new System.Drawing.Point(93, 0);
- this.MetadataModuleVersionTextBox.Name = "MetadataModuleVersionTextBox";
- this.MetadataModuleVersionTextBox.Size = new System.Drawing.Size(250, 30);
- this.MetadataModuleVersionTextBox.TabIndex = 2;
- this.MetadataModuleVersionTextBox.ReadOnly = true;
- this.MetadataModuleVersionTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataModuleVersionTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataModuleVersionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataModuleVersionTextBox, "MetadataModuleVersionTextBox");
- //
- // MetadataModuleLicenseTextBox
- //
- this.MetadataModuleLicenseTextBox.AutoSize = true;
- this.MetadataModuleLicenseTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataModuleLicenseTextBox.Location = new System.Drawing.Point(93, 30);
- this.MetadataModuleLicenseTextBox.Name = "MetadataModuleLicenseTextBox";
- this.MetadataModuleLicenseTextBox.Size = new System.Drawing.Size(250, 30);
- this.MetadataModuleLicenseTextBox.TabIndex = 4;
- this.MetadataModuleLicenseTextBox.ReadOnly = true;
- this.MetadataModuleLicenseTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataModuleLicenseTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataModuleLicenseTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataModuleLicenseTextBox, "MetadataModuleLicenseTextBox");
- //
- // MetadataModuleAuthorTextBox
- //
- this.MetadataModuleAuthorTextBox.AutoSize = true;
- this.MetadataModuleAuthorTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataModuleAuthorTextBox.Location = new System.Drawing.Point(93, 60);
- this.MetadataModuleAuthorTextBox.Name = "MetadataModuleAuthorTextBox";
- this.MetadataModuleAuthorTextBox.Size = new System.Drawing.Size(250, 30);
- this.MetadataModuleAuthorTextBox.TabIndex = 6;
- this.MetadataModuleAuthorTextBox.ReadOnly = true;
- this.MetadataModuleAuthorTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataModuleAuthorTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataModuleAuthorTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataModuleAuthorTextBox, "MetadataModuleAuthorTextBox");
- //
- // VersionLabel
+ // ModInfoTabControl
//
- this.VersionLabel.AutoSize = true;
- this.VersionLabel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.VersionLabel.ForeColor = System.Drawing.SystemColors.GrayText;
- this.VersionLabel.Location = new System.Drawing.Point(3, 0);
- this.VersionLabel.Name = "VersionLabel";
- this.VersionLabel.Size = new System.Drawing.Size(84, 30);
- this.VersionLabel.TabIndex = 1;
- resources.ApplyResources(this.VersionLabel, "VersionLabel");
+ this.ModInfoTabControl.Appearance = System.Windows.Forms.TabAppearance.Normal;
+ this.ModInfoTabControl.BackColor = System.Drawing.SystemColors.Control;
+ this.ModInfoTabControl.Multiline = true;
+ this.ModInfoTabControl.Controls.Add(this.MetadataTabPage);
+ this.ModInfoTabControl.Controls.Add(this.RelationshipTabPage);
+ this.ModInfoTabControl.Controls.Add(this.ContentTabPage);
+ this.ModInfoTabControl.Controls.Add(this.VersionsTabPage);
+ this.ModInfoTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ModInfoTabControl.Margin = new System.Windows.Forms.Padding(0);
+ this.ModInfoTabControl.Name = "ModInfoTabControl";
+ this.ModInfoTabControl.TabIndex = 4;
+ this.ModInfoTabControl.ImageList = new System.Windows.Forms.ImageList(this.components)
+ {
+ // ImageList's default makes icons look like garbage
+ ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
+ };
+ this.ModInfoTabControl.ImageList.Images.Add("Stop", global::CKAN.GUI.Properties.Resources.stop);
+ this.ModInfoTabControl.SelectedIndexChanged += new System.EventHandler(this.ModInfoTabControl_SelectedIndexChanged);
//
- // MetadataModuleReleaseStatusTextBox
+ // MetadataTabPage
//
- this.MetadataModuleReleaseStatusTextBox.AutoSize = true;
- this.MetadataModuleReleaseStatusTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataModuleReleaseStatusTextBox.Location = new System.Drawing.Point(93, 150);
- this.MetadataModuleReleaseStatusTextBox.Name = "MetadataModuleReleaseStatusTextBox";
- this.MetadataModuleReleaseStatusTextBox.Size = new System.Drawing.Size(250, 30);
- this.MetadataModuleReleaseStatusTextBox.TabIndex = 11;
- this.MetadataModuleReleaseStatusTextBox.ReadOnly = true;
- this.MetadataModuleReleaseStatusTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataModuleReleaseStatusTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataModuleReleaseStatusTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataModuleReleaseStatusTextBox, "MetadataModuleReleaseStatusTextBox");
+ this.MetadataTabPage.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataTabPage.Controls.Add(this.Metadata);
+ this.MetadataTabPage.Name = "MetadataTabPage";
+ this.MetadataTabPage.Padding = new System.Windows.Forms.Padding(3);
+ this.MetadataTabPage.TabIndex = 5;
+ resources.ApplyResources(this.MetadataTabPage, "MetadataTabPage");
//
- // MetadataModuleGameCompatibilityTextBox
+ // Metadata
//
- this.MetadataModuleGameCompatibilityTextBox.AutoSize = true;
- this.MetadataModuleGameCompatibilityTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MetadataModuleGameCompatibilityTextBox.Location = new System.Drawing.Point(93, 180);
- this.MetadataModuleGameCompatibilityTextBox.Name = "MetadataModuleGameCompatibilityTextBox";
- this.MetadataModuleGameCompatibilityTextBox.Size = new System.Drawing.Size(250, 30);
- this.MetadataModuleGameCompatibilityTextBox.TabIndex = 14;
- this.MetadataModuleGameCompatibilityTextBox.ReadOnly = true;
- this.MetadataModuleGameCompatibilityTextBox.BackColor = MetadataTabPage.BackColor;
- this.MetadataModuleGameCompatibilityTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
- this.MetadataModuleGameCompatibilityTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
- resources.ApplyResources(this.MetadataModuleGameCompatibilityTextBox, "MetadataModuleGameCompatibilityTextBox");
+ this.Metadata.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.Metadata.Margin = new System.Windows.Forms.Padding(2);
+ this.Metadata.Name = "Metadata";
+ this.Metadata.TabIndex = 6;
//
// RelationshipTabPage
//
this.RelationshipTabPage.BackColor = System.Drawing.SystemColors.Control;
- this.RelationshipTabPage.Controls.Add(this.DependsGraphTree);
- this.RelationshipTabPage.Controls.Add(this.LegendDependsImage);
- this.RelationshipTabPage.Controls.Add(this.LegendRecommendsImage);
- this.RelationshipTabPage.Controls.Add(this.LegendSuggestsImage);
- this.RelationshipTabPage.Controls.Add(this.LegendSupportsImage);
- this.RelationshipTabPage.Controls.Add(this.LegendConflictsImage);
- this.RelationshipTabPage.Controls.Add(this.LegendDependsLabel);
- this.RelationshipTabPage.Controls.Add(this.LegendRecommendsLabel);
- this.RelationshipTabPage.Controls.Add(this.LegendSuggestsLabel);
- this.RelationshipTabPage.Controls.Add(this.LegendSupportsLabel);
- this.RelationshipTabPage.Controls.Add(this.LegendConflictsLabel);
- this.RelationshipTabPage.Controls.Add(this.ReverseRelationshipsCheckbox);
- this.RelationshipTabPage.Location = new System.Drawing.Point(4, 25);
+ this.RelationshipTabPage.Controls.Add(this.Relationships);
this.RelationshipTabPage.Name = "RelationshipTabPage";
this.RelationshipTabPage.Padding = new System.Windows.Forms.Padding(3);
- this.RelationshipTabPage.Size = new System.Drawing.Size(354, 502);
- this.RelationshipTabPage.TabIndex = 1;
+ this.RelationshipTabPage.Size = new System.Drawing.Size(494, 300);
+ this.RelationshipTabPage.TabIndex = 7;
resources.ApplyResources(this.RelationshipTabPage, "RelationshipTabPage");
//
- // DependsGraphTree
- //
- this.DependsGraphTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.DependsGraphTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.DependsGraphTree.Location = new System.Drawing.Point(3, 96);
- this.DependsGraphTree.Name = "DependsGraphTree";
- this.DependsGraphTree.Size = new System.Drawing.Size(345, 380);
- this.DependsGraphTree.TabIndex = 0;
- this.DependsGraphTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DependsGraphTree_NodeMouseDoubleClick);
- this.DependsGraphTree.ShowNodeToolTips = true;
- this.DependsGraphTree.ImageList = new System.Windows.Forms.ImageList()
- {
- // ImageList's default makes icons look like garbage
- ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
- };
- this.DependsGraphTree.ImageList.Images.Add("Root", global::CKAN.GUI.Properties.Resources.ksp);
- this.DependsGraphTree.ImageList.Images.Add("Depends", global::CKAN.GUI.Properties.Resources.star);
- this.DependsGraphTree.ImageList.Images.Add("Recommends", global::CKAN.GUI.Properties.Resources.thumbup);
- this.DependsGraphTree.ImageList.Images.Add("Suggests", global::CKAN.GUI.Properties.Resources.info);
- this.DependsGraphTree.ImageList.Images.Add("Supports", global::CKAN.GUI.Properties.Resources.smile);
- this.DependsGraphTree.ImageList.Images.Add("Conflicts", global::CKAN.GUI.Properties.Resources.alert);
- //
- // LegendDependsImage
- //
- this.LegendDependsImage.BackColor = System.Drawing.SystemColors.Window;
- this.LegendDependsImage.Image = global::CKAN.GUI.Properties.Resources.star;
- this.LegendDependsImage.Location = new System.Drawing.Point(6, 3);
- this.LegendDependsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.LegendDependsImage.ClientSize = new System.Drawing.Size(14, 14);
- //
- // LegendRecommendsImage
- //
- this.LegendRecommendsImage.BackColor = System.Drawing.SystemColors.Window;
- this.LegendRecommendsImage.Image = global::CKAN.GUI.Properties.Resources.thumbup;
- this.LegendRecommendsImage.Location = new System.Drawing.Point(6, 21);
- this.LegendRecommendsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.LegendRecommendsImage.ClientSize = new System.Drawing.Size(14, 14);
- //
- // LegendSuggestsImage
- //
- this.LegendSuggestsImage.BackColor = System.Drawing.SystemColors.Window;
- this.LegendSuggestsImage.Image = global::CKAN.GUI.Properties.Resources.info;
- this.LegendSuggestsImage.Location = new System.Drawing.Point(6, 39);
- this.LegendSuggestsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.LegendSuggestsImage.ClientSize = new System.Drawing.Size(14, 14);
+ // Relationships
//
- // LegendSupportsImage
- //
- this.LegendSupportsImage.BackColor = System.Drawing.SystemColors.Window;
- this.LegendSupportsImage.Image = global::CKAN.GUI.Properties.Resources.smile;
- this.LegendSupportsImage.Location = new System.Drawing.Point(6, 57);
- this.LegendSupportsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.LegendSupportsImage.ClientSize = new System.Drawing.Size(14, 14);
- //
- // LegendConflictsImage
- //
- this.LegendConflictsImage.BackColor = System.Drawing.SystemColors.Window;
- this.LegendConflictsImage.Image = global::CKAN.GUI.Properties.Resources.alert;
- this.LegendConflictsImage.Location = new System.Drawing.Point(6, 75);
- this.LegendConflictsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.LegendConflictsImage.ClientSize = new System.Drawing.Size(14, 14);
- //
- // LegendDependsLabel
- //
- this.LegendDependsLabel.AutoSize = true;
- this.LegendDependsLabel.Location = new System.Drawing.Point(24, 3);
- resources.ApplyResources(this.LegendDependsLabel, "LegendDependsLabel");
- //
- // LegendRecommendsLabel
- //
- this.LegendRecommendsLabel.AutoSize = true;
- this.LegendRecommendsLabel.Location = new System.Drawing.Point(24, 21);
- resources.ApplyResources(this.LegendRecommendsLabel, "LegendRecommendsLabel");
- //
- // LegendSuggestsLabel
- //
- this.LegendSuggestsLabel.AutoSize = true;
- this.LegendSuggestsLabel.Location = new System.Drawing.Point(24, 39);
- resources.ApplyResources(this.LegendSuggestsLabel, "LegendSuggestsLabel");
- //
- // LegendSupportsLabel
- //
- this.LegendSupportsLabel.AutoSize = true;
- this.LegendSupportsLabel.Location = new System.Drawing.Point(24, 57);
- resources.ApplyResources(this.LegendSupportsLabel, "LegendSupportsLabel");
- //
- // LegendConflictsLabel
- //
- this.LegendConflictsLabel.AutoSize = true;
- this.LegendConflictsLabel.Location = new System.Drawing.Point(24, 75);
- resources.ApplyResources(this.LegendConflictsLabel, "LegendConflictsLabel");
- //
- // ReverseRelationshipsCheckbox
- //
- this.ReverseRelationshipsCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.ReverseRelationshipsCheckbox.AutoSize = true;
- this.ReverseRelationshipsCheckbox.AutoCheck = false;
- this.ReverseRelationshipsCheckbox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.ReverseRelationshipsCheckbox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.ReverseRelationshipsCheckbox.Name = "ReverseRelationshipsCheckbox";
- this.ReverseRelationshipsCheckbox.Location = new System.Drawing.Point(4, 474);
- this.ReverseRelationshipsCheckbox.Size = new System.Drawing.Size(346, 24);
- this.ReverseRelationshipsCheckbox.Click += new System.EventHandler(this.ReverseRelationshipsCheckbox_Click);
- this.ReverseRelationshipsCheckbox.CheckedChanged += new System.EventHandler(this.ReverseRelationshipsCheckbox_CheckedChanged);
- resources.ApplyResources(this.ReverseRelationshipsCheckbox, "ReverseRelationshipsCheckbox");
+ this.Relationships.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.Relationships.Margin = new System.Windows.Forms.Padding(2);
+ this.Relationships.Name = "Relationships";
+ this.Relationships.Size = new System.Drawing.Size(494, 300);
+ this.Relationships.TabIndex = 8;
//
// ContentTabPage
//
this.ContentTabPage.BackColor = System.Drawing.SystemColors.Control;
- this.ContentTabPage.Controls.Add(this.ContentsPreviewTree);
- this.ContentTabPage.Controls.Add(this.ContentsDownloadButton);
- this.ContentTabPage.Controls.Add(this.ContentsOpenButton);
- this.ContentTabPage.Controls.Add(this.NotCachedLabel);
- this.ContentTabPage.Location = new System.Drawing.Point(4, 25);
+ this.ContentTabPage.Controls.Add(this.Contents);
this.ContentTabPage.Name = "ContentTabPage";
this.ContentTabPage.Padding = new System.Windows.Forms.Padding(3);
- this.ContentTabPage.Size = new System.Drawing.Size(354, 502);
- this.ContentTabPage.TabIndex = 2;
+ this.ContentTabPage.TabIndex = 9;
resources.ApplyResources(this.ContentTabPage, "ContentTabPage");
//
- // ContentsPreviewTree
+ // Contents
//
- this.ContentsPreviewTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.ContentsPreviewTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.ContentsPreviewTree.ImageList = new System.Windows.Forms.ImageList()
- {
- // ImageList's default makes icons look like garbage
- ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
- };
- this.ContentsPreviewTree.ImageList.Images.Add("folderZip", global::CKAN.GUI.Properties.Resources.folderZip);
- this.ContentsPreviewTree.ImageList.Images.Add("folder", global::CKAN.GUI.Properties.Resources.folder);
- this.ContentsPreviewTree.ImageList.Images.Add("file", global::CKAN.GUI.Properties.Resources.file);
- this.ContentsPreviewTree.ShowPlusMinus = true;
- this.ContentsPreviewTree.ShowRootLines = false;
- this.ContentsPreviewTree.Location = new System.Drawing.Point(6, 65);
- this.ContentsPreviewTree.Name = "ContentsPreviewTree";
- this.ContentsPreviewTree.Size = new System.Drawing.Size(342, 434);
- this.ContentsPreviewTree.TabIndex = 2;
- this.ContentsPreviewTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ContentsPreviewTree_NodeMouseDoubleClick);
- //
- // ContentsDownloadButton
- //
- this.ContentsDownloadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.ContentsDownloadButton.Location = new System.Drawing.Point(6, 36);
- this.ContentsDownloadButton.Name = "ContentsDownloadButton";
- this.ContentsDownloadButton.Size = new System.Drawing.Size(103, 23);
- this.ContentsDownloadButton.TabIndex = 1;
- this.ContentsDownloadButton.UseVisualStyleBackColor = true;
- this.ContentsDownloadButton.Click += new System.EventHandler(this.ContentsDownloadButton_Click);
- resources.ApplyResources(this.ContentsDownloadButton, "ContentsDownloadButton");
- //
- // ContentsOpenButton
+ this.Contents.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.Contents.Margin = new System.Windows.Forms.Padding(2);
+ this.Contents.Name = "Contents";
+ this.Contents.TabIndex = 10;
//
- this.ContentsOpenButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.ContentsOpenButton.Location = new System.Drawing.Point(115, 36);
- this.ContentsOpenButton.Name = "ContentsOpenButton";
- this.ContentsOpenButton.Size = new System.Drawing.Size(103, 23);
- this.ContentsOpenButton.TabIndex = 1;
- this.ContentsOpenButton.UseVisualStyleBackColor = true;
- this.ContentsOpenButton.Click += new System.EventHandler(this.ContentsOpenButton_Click);
- resources.ApplyResources(this.ContentsOpenButton, "ContentsOpenButton");
+ // VersionsTabPage
//
- // NotCachedLabel
+ this.VersionsTabPage.BackColor = System.Drawing.SystemColors.Control;
+ this.VersionsTabPage.Controls.Add(this.Versions);
+ this.VersionsTabPage.Margin = new System.Windows.Forms.Padding(3);
+ this.VersionsTabPage.Name = "VersionsTabPage";
+ this.VersionsTabPage.TabIndex = 11;
+ resources.ApplyResources(this.VersionsTabPage, "VersionsTabPage");
//
- this.NotCachedLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.NotCachedLabel.Location = new System.Drawing.Point(6, 3);
- this.NotCachedLabel.Name = "NotCachedLabel";
- this.NotCachedLabel.Size = new System.Drawing.Size(342, 434);
- this.NotCachedLabel.TabIndex = 0;
- resources.ApplyResources(this.NotCachedLabel, "NotCachedLabel");
+ // Versions
//
- // AllModVersionsTabPage
- //
- this.AllModVersionsTabPage.BackColor = System.Drawing.SystemColors.Control;
- this.AllModVersionsTabPage.Controls.Add(this.AllModVersions);
- this.AllModVersionsTabPage.Location = new System.Drawing.Point(4, 25);
- this.AllModVersionsTabPage.Margin = new System.Windows.Forms.Padding(2);
- this.AllModVersionsTabPage.Name = "AllModVersionsTabPage";
- this.AllModVersionsTabPage.Size = new System.Drawing.Size(354, 502);
- this.AllModVersionsTabPage.TabIndex = 1;
- resources.ApplyResources(this.AllModVersionsTabPage, "AllModVersionsTabPage");
- //
- // AllModVersions
- //
- this.AllModVersions.Dock = System.Windows.Forms.DockStyle.Fill;
- this.AllModVersions.Location = new System.Drawing.Point(0, 0);
- this.AllModVersions.Margin = new System.Windows.Forms.Padding(2);
- this.AllModVersions.Name = "AllModVersions";
- this.AllModVersions.Size = new System.Drawing.Size(354, 502);
- this.AllModVersions.TabIndex = 0;
+ this.Versions.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.Versions.Margin = new System.Windows.Forms.Padding(2);
+ this.Versions.Name = "Versions";
+ this.Versions.TabIndex = 12;
//
// ModInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.splitContainer2);
+ this.Controls.Add(this.ModInfoTable);
this.Name = "ModInfo";
- this.Size = new System.Drawing.Size(362, 531);
+ this.Padding = new System.Windows.Forms.Padding(0);
+ this.Size = new System.Drawing.Size(500, 500);
resources.ApplyResources(this, "$this");
- this.ModInfoTabControl.ResumeLayout(false);
- this.MetadataTabPage.ResumeLayout(false);
- this.splitContainer2.Panel1.ResumeLayout(false);
- this.splitContainer2.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
- this.splitContainer2.ResumeLayout(false);
- this.MetaDataUpperLayoutPanel.ResumeLayout(false);
- this.MetaDataLowerLayoutPanel.ResumeLayout(false);
- this.MetaDataLowerLayoutPanel.PerformLayout();
- this.RelationshipTabPage.ResumeLayout(false);
- this.ContentTabPage.ResumeLayout(false);
- this.AllModVersions.ResumeLayout(false);
- this.AllModVersionsTabPage.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
- private System.Windows.Forms.ToolTip ToolTip;
- private System.Windows.Forms.TabControl ModInfoTabControl;
- private System.Windows.Forms.TabPage MetadataTabPage;
- private System.Windows.Forms.SplitContainer splitContainer2;
- private System.Windows.Forms.TableLayoutPanel MetaDataUpperLayoutPanel;
+ private System.Windows.Forms.TableLayoutPanel ModInfoTable;
private TransparentTextBox MetadataModuleNameTextBox;
private System.Windows.Forms.FlowLayoutPanel MetadataTagsLabelsPanel;
private System.Windows.Forms.Label MetadataModuleAbstractLabel;
private TransparentTextBox MetadataModuleDescriptionTextBox;
- private System.Windows.Forms.TableLayoutPanel MetaDataLowerLayoutPanel;
- private System.Windows.Forms.Label IdentifierLabel;
- private TransparentTextBox MetadataIdentifierTextBox;
- private System.Windows.Forms.Label ReplacementLabel;
- private TransparentTextBox ReplacementTextBox;
- private System.Windows.Forms.Label GameCompatibilityLabel;
- private System.Windows.Forms.Label ReleaseLabel;
- private System.Windows.Forms.Label AuthorLabel;
- private System.Windows.Forms.Label LicenseLabel;
- private TransparentTextBox MetadataModuleVersionTextBox;
- private TransparentTextBox MetadataModuleLicenseTextBox;
- private TransparentTextBox MetadataModuleAuthorTextBox;
- private System.Windows.Forms.Label VersionLabel;
- private TransparentTextBox MetadataModuleReleaseStatusTextBox;
- private TransparentTextBox MetadataModuleGameCompatibilityTextBox;
+ private System.Windows.Forms.TabControl ModInfoTabControl;
+ private System.Windows.Forms.TabPage MetadataTabPage;
+ private CKAN.GUI.Metadata Metadata;
private System.Windows.Forms.TabPage RelationshipTabPage;
- private System.Windows.Forms.TreeView DependsGraphTree;
- private System.Windows.Forms.PictureBox LegendDependsImage;
- private System.Windows.Forms.PictureBox LegendRecommendsImage;
- private System.Windows.Forms.PictureBox LegendSuggestsImage;
- private System.Windows.Forms.PictureBox LegendSupportsImage;
- private System.Windows.Forms.PictureBox LegendConflictsImage;
- private System.Windows.Forms.Label LegendDependsLabel;
- private System.Windows.Forms.Label LegendRecommendsLabel;
- private System.Windows.Forms.Label LegendSuggestsLabel;
- private System.Windows.Forms.Label LegendSupportsLabel;
- private System.Windows.Forms.Label LegendConflictsLabel;
- private System.Windows.Forms.CheckBox ReverseRelationshipsCheckbox;
+ private CKAN.GUI.Relationships Relationships;
private System.Windows.Forms.TabPage ContentTabPage;
- private System.Windows.Forms.TreeView ContentsPreviewTree;
- private System.Windows.Forms.Button ContentsDownloadButton;
- private System.Windows.Forms.Button ContentsOpenButton;
- private System.Windows.Forms.Label NotCachedLabel;
- private System.Windows.Forms.TabPage AllModVersionsTabPage;
- private CKAN.GUI.AllModVersions AllModVersions;
+ private CKAN.GUI.Contents Contents;
+ private System.Windows.Forms.TabPage VersionsTabPage;
+ private CKAN.GUI.Versions Versions;
}
}
diff --git a/GUI/Controls/ModInfo.cs b/GUI/Controls/ModInfo.cs
index 55a0107d5c..c91a7754d9 100644
--- a/GUI/Controls/ModInfo.cs
+++ b/GUI/Controls/ModInfo.cs
@@ -11,29 +11,12 @@
namespace CKAN.GUI
{
- public enum RelationshipType
- {
- Depends = 0,
- Recommends = 1,
- Suggests = 2,
- Supports = 3,
- Conflicts = 4
- }
-
public partial class ModInfo : UserControl
{
- private GUIMod selectedModule;
- private CkanModule currentModContentsModule;
- private readonly int staticRowCount;
-
public ModInfo()
{
InitializeComponent();
- staticRowCount = MetaDataLowerLayoutPanel.RowCount;
-
- ToolTip.SetToolTip(ReverseRelationshipsCheckbox, Properties.Resources.ModInfoToolTipReverseRelationships);
-
- DependsGraphTree.BeforeExpand += BeforeExpand;
+ Contents.OnDownloadClick += gmod => OnDownloadClick?.Invoke(gmod);
}
public GUIMod SelectedModule
@@ -43,6 +26,7 @@ public GUIMod SelectedModule
var module = value?.ToModule();
if (value != selectedModule)
{
+ selectedModule = value;
if (module == null)
{
ModInfoTabControl.Enabled = false;
@@ -50,44 +34,55 @@ public GUIMod SelectedModule
else
{
ModInfoTabControl.Enabled = true;
- if (ReverseRelationshipsCheckbox.CheckState == CheckState.Checked)
- {
- ReverseRelationshipsCheckbox.CheckState = CheckState.Unchecked;
- }
UpdateHeaderInfo(value, manager.CurrentInstance.VersionCriteria());
LoadTab(ModInfoTabControl.SelectedTab.Name, value);
}
- selectedModule = value;
}
}
- get
+ get => selectedModule;
+ }
+
+ public void UpdateModContentsTree(CkanModule module, bool force = false)
+ {
+ Contents.UpdateModContentsTree(module, force);
+ }
+
+ public event Action OnDownloadClick;
+ public event Action OnChangeFilter;
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+ if (!string.IsNullOrEmpty(MetadataModuleDescriptionTextBox?.Text))
{
- return selectedModule;
+ MetadataModuleDescriptionTextBox.Height = DescriptionHeight;
}
}
+ private GUIMod selectedModule;
+
private void LoadTab(string name, GUIMod gm)
{
switch (ModInfoTabControl.SelectedTab.Name)
{
case "MetadataTabPage":
- UpdateModInfo(gm);
+ Metadata.UpdateModInfo(gm);
break;
case "ContentTabPage":
- UpdateModContentsTree(gm.ToModule());
+ Contents.SelectedModule = gm;
break;
case "RelationshipTabPage":
- UpdateModDependencyGraph(gm.ToModule());
+ Relationships.SelectedModule = gm;
break;
- case "AllModVersionsTabPage":
- AllModVersions.SelectedModule = gm;
+ case "VersionsTabPage":
+ Versions.SelectedModule = gm;
if (Platform.IsMono)
{
// Workaround: make sure the ListView headers are drawn
- AllModVersions.ForceRedraw();
+ Versions.ForceRedraw();
}
break;
}
@@ -96,77 +91,20 @@ private void LoadTab(string name, GUIMod gm)
// When switching tabs ensure that the resulting tab is updated.
private void ModInfoTabControl_SelectedIndexChanged(object sender, EventArgs e)
{
- LoadTab(ModInfoTabControl.SelectedTab.Name, selectedModule);
+ LoadTab(ModInfoTabControl.SelectedTab.Name, SelectedModule);
}
- public int ModMetaSplitPosition
- {
- get
- {
- return splitContainer2.SplitterDistance;
- }
- set
- {
- try
- {
- this.splitContainer2.SplitterDistance = value;
- }
- catch
- {
- // SplitContainer is mis-designed to throw exceptions
- // if the min/max limits are exceeded rather than simply obeying them.
- }
- }
- }
+ private GameInstanceManager manager => Main.Instance.manager;
- public event Action OnDownloadClick;
+ private int StringHeight(string text, Font font, int maxWidth)
+ => (int)CreateGraphics().MeasureString(text, font, maxWidth).Height;
- private GameInstanceManager manager
- {
- get
- {
- return Main.Instance.manager;
- }
- }
-
- private void DependsGraphTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- Main.Instance.ManageMods.ResetFilterAndSelectModOnList(e.Node.Name);
- }
-
- private void ContentsPreviewTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- OpenFileBrowser(e.Node);
- }
+ private int TextBoxStringHeight(TextBox tb)
+ => tb.Padding.Vertical + tb.Margin.Vertical
+ + StringHeight(tb.Text, tb.Font,
+ tb.Width - tb.Padding.Horizontal - tb.Margin.Horizontal);
- private void ContentsDownloadButton_Click(object sender, EventArgs e)
- {
- if (OnDownloadClick != null)
- {
- OnDownloadClick(SelectedModule);
- }
- }
-
- private void ContentsOpenButton_Click(object sender, EventArgs e)
- {
- Utilities.ProcessStartURL(manager.Cache.GetCachedFilename(SelectedModule.ToModule()));
- }
-
- private void LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- Util.HandleLinkClicked((sender as LinkLabel).Text, e);
- }
-
- private void LinkLabel_KeyDown(object sender, KeyEventArgs e)
- {
- switch (e.KeyCode)
- {
- case Keys.Apps:
- Util.LinkContextMenu((sender as LinkLabel).Text);
- e.Handled = true;
- break;
- }
- }
+ private int DescriptionHeight => TextBoxStringHeight(MetadataModuleDescriptionTextBox);
private void UpdateHeaderInfo(GUIMod gmod, GameVersionCriteria crit)
{
@@ -178,151 +116,21 @@ private void UpdateHeaderInfo(GUIMod gmod, GameVersionCriteria crit)
MetadataModuleAbstractLabel.Text = module.@abstract.Replace("&", "&&");
MetadataModuleDescriptionTextBox.Text = module.description
?.Replace("\r\n", "\n").Replace("\n", Environment.NewLine);
- MetadataModuleDescriptionTextBox.ScrollBars =
- string.IsNullOrWhiteSpace(module.description)
- ? ScrollBars.None
- : ScrollBars.Vertical;
- // Mono doesn't draw TabPage.ImageIndex, so fake it
- const string fakeStopSign = " ";
- ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(ModInfo));
- resources.ApplyResources(RelationshipTabPage, "RelationshipTabPage");
- resources.ApplyResources(AllModVersionsTabPage, "AllModVersionsTabPage");
- if (gmod.IsIncompatible)
- {
- var pageToAlert = module.IsCompatibleKSP(crit) ? RelationshipTabPage : AllModVersionsTabPage;
- pageToAlert.Text = fakeStopSign + pageToAlert.Text;
- }
- });
- }
+ MetadataModuleDescriptionTextBox.Height = DescriptionHeight;
- private void UpdateModInfo(GUIMod gui_module)
- {
- CkanModule module = gui_module.ToModule();
-
- Util.Invoke(MetadataModuleVersionTextBox, () => MetadataModuleVersionTextBox.Text = gui_module.LatestVersion.ToString());
- Util.Invoke(MetadataModuleLicenseTextBox, () => MetadataModuleLicenseTextBox.Text = string.Join(", ", module.license));
- Util.Invoke(MetadataModuleAuthorTextBox, () => MetadataModuleAuthorTextBox.Text = gui_module.Authors);
- Util.Invoke(MetadataIdentifierTextBox, () => MetadataIdentifierTextBox.Text = module.identifier);
-
- Util.Invoke(MetadataModuleReleaseStatusTextBox, () =>
- {
- if (module.release_status == null)
- {
- ReleaseLabel.Visible = false;
- MetadataModuleReleaseStatusTextBox.Visible = false;
- MetaDataLowerLayoutPanel.LayoutSettings.RowStyles[3].Height = 0;
- }
- else
- {
- ReleaseLabel.Visible = true;
- MetadataModuleReleaseStatusTextBox.Visible = true;
- MetaDataLowerLayoutPanel.LayoutSettings.RowStyles[3].Height = 30;
- MetadataModuleReleaseStatusTextBox.Text = module.release_status.ToString();
- }
- });
- Util.Invoke(MetadataModuleGameCompatibilityTextBox, () => MetadataModuleGameCompatibilityTextBox.Text = gui_module.GameCompatibilityLong);
-
- Util.Invoke(ReplacementTextBox, () =>
- {
- if (module.replaced_by == null)
- {
- ReplacementLabel.Visible = false;
- ReplacementTextBox.Visible = false;
- MetaDataLowerLayoutPanel.LayoutSettings.RowStyles[6].Height = 0;
- }
- else
- {
- ReplacementLabel.Visible = true;
- ReplacementTextBox.Visible = true;
- MetaDataLowerLayoutPanel.LayoutSettings.RowStyles[6].Height = 30;
- ReplacementTextBox.Text = module.replaced_by.ToString();
- }
- });
-
- Util.Invoke(MetaDataLowerLayoutPanel, () =>
- {
- ClearResourceLinks();
- var res = module.resources;
- if (res != null)
+ // Set/reset alert icons to show a user why a mod is incompatible
+ RelationshipTabPage.ImageKey = "";
+ VersionsTabPage.ImageKey = "";
+ if (gmod.IsIncompatible)
{
- AddResourceLink(Properties.Resources.ModInfoHomepageLabel, res.homepage);
- AddResourceLink(Properties.Resources.ModInfoSpaceDockLabel, res.spacedock);
- AddResourceLink(Properties.Resources.ModInfoCurseLabel, res.curse);
- AddResourceLink(Properties.Resources.ModInfoRepositoryLabel, res.repository);
- AddResourceLink(Properties.Resources.ModInfoBugTrackerLabel, res.bugtracker);
- AddResourceLink(Properties.Resources.ModInfoContinuousIntegrationLabel, res.ci);
- AddResourceLink(Properties.Resources.ModInfoLicenseLabel, res.license);
- AddResourceLink(Properties.Resources.ModInfoManualLabel, res.manual);
- AddResourceLink(Properties.Resources.ModInfoMetanetkanLabel, res.metanetkan);
- AddResourceLink(Properties.Resources.ModInfoRemoteAvcLabel, res.remoteAvc);
- AddResourceLink(Properties.Resources.ModInfoStoreLabel, res.store);
- AddResourceLink(Properties.Resources.ModInfoSteamStoreLabel, res.steamstore);
+ var pageToAlert = module.IsCompatibleKSP(crit) ? RelationshipTabPage : VersionsTabPage;
+ pageToAlert.ImageKey = "Stop";
}
});
}
- private void ClearResourceLinks()
- {
- for (int row = MetaDataLowerLayoutPanel.RowCount - 1; row >= staticRowCount; --row)
- {
- RemovePanelControl(MetaDataLowerLayoutPanel, 0, row);
- RemovePanelControl(MetaDataLowerLayoutPanel, 1, row);
- MetaDataLowerLayoutPanel.RowStyles.RemoveAt(row);
- }
- MetaDataLowerLayoutPanel.RowCount = staticRowCount;
- }
-
- private static void RemovePanelControl(TableLayoutPanel panel, int col, int row)
- {
- var ctl = panel.GetControlFromPosition(col, row);
- if (ctl != null)
- {
- panel.Controls.Remove(ctl);
- }
- }
-
- private void AddResourceLink(string label, Uri link)
- {
- if (link != null)
- {
- Label lbl = new Label()
- {
- AutoSize = true,
- Dock = DockStyle.Fill,
- ForeColor = SystemColors.GrayText,
- Text = label,
- };
- LinkLabel llbl = new LinkLabel()
- {
- AutoSize = true,
- TabStop = true,
- Text = link.ToString(),
- };
- llbl.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkLabel_LinkClicked);
- llbl.KeyDown += new KeyEventHandler(LinkLabel_KeyDown);
- int row = MetaDataLowerLayoutPanel.RowCount;
- MetaDataLowerLayoutPanel.Controls.Add(lbl, 0, row);
- MetaDataLowerLayoutPanel.Controls.Add(llbl, 1, row);
- MetaDataLowerLayoutPanel.RowCount = row + 1;
- MetaDataLowerLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
- }
- }
-
- private ModuleLabelList ModuleLabels
- {
- get
- {
- return Main.Instance.ManageMods.mainModList.ModuleLabels;
- }
- }
-
- private ModuleTagList ModuleTags
- {
- get
- {
- return Main.Instance.ManageMods.mainModList.ModuleTags;
- }
- }
+ private ModuleLabelList ModuleLabels => Main.Instance.ManageMods.mainModList.ModuleLabels;
+ private ModuleTagList ModuleTags => Main.Instance.ManageMods.mainModList.ModuleTags;
private void UpdateTagsAndLabels(CkanModule mod)
{
@@ -374,9 +182,6 @@ private LinkLabel TagLabelLink(string name, object tag, LinkLabelLinkClickedEven
return link;
}
- public delegate void ChangeFilter(SavedSearch search);
- public event ChangeFilter OnChangeFilter;
-
private void TagLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var link = sender as LinkLabel;
@@ -389,425 +194,5 @@ private void LabelLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEvent
OnChangeFilter?.Invoke(ModList.FilterToSavedSearch(GUIModFilter.CustomLabel, null, link.Tag as ModuleLabel));
}
- private bool ImMyOwnGrandpa(TreeNode node)
- {
- CkanModule module = node.Tag as CkanModule;
- if (module != null)
- {
- for (TreeNode other = node.Parent; other != null; other = other.Parent)
- {
- if (module == other.Tag)
- {
- return true;
- }
- }
- }
- return false;
- }
-
- private void ReverseRelationshipsCheckbox_Click(object sender, EventArgs e)
- {
- ReverseRelationshipsCheckbox.CheckState =
- ReverseRelationshipsCheckbox.CheckState == CheckState.Unchecked
- // If user holds ctrl or shift, go to "sticky" indeterminate state,
- // else normal checked
-? (Control.ModifierKeys & (Keys.Control | Keys.Shift)) != 0
- ? CheckState.Indeterminate
- : CheckState.Checked
- : CheckState.Unchecked;
- }
-
- private void ReverseRelationshipsCheckbox_CheckedChanged(object sender, EventArgs e)
- {
- UpdateModDependencyGraph(null);
- }
-
- private void UpdateModDependencyGraph(CkanModule module)
- {
- ModInfoTabControl.Tag = module ?? ModInfoTabControl.Tag;
- // Can be costly. For now only update when visible.
- if (ModInfoTabControl.SelectedIndex != RelationshipTabPage.TabIndex)
- {
- return;
- }
- Util.Invoke(DependsGraphTree, () => _UpdateModDependencyGraph(ModInfoTabControl.Tag as CkanModule));
- }
-
- private void _UpdateModDependencyGraph(CkanModule module)
- {
- DependsGraphTree.BeginUpdate();
- DependsGraphTree.BackColor = SystemColors.Window;
- DependsGraphTree.LineColor = SystemColors.WindowText;
- DependsGraphTree.Nodes.Clear();
- IRegistryQuerier registry = RegistryManager.Instance(manager.CurrentInstance).registry;
- TreeNode root = new TreeNode($"{module.name} {module.version}", 0, 0)
- {
- Name = module.identifier,
- Tag = module
- };
- DependsGraphTree.Nodes.Add(root);
- AddChildren(registry, root);
- DependsGraphTree.EndUpdate();
- root.Expand();
- }
-
- private void BeforeExpand(object sender, TreeViewCancelEventArgs args)
- {
- IRegistryQuerier registry = RegistryManager.Instance(manager.CurrentInstance).registry;
- TreeNode node = args.Node;
- const int modsPerUpdate = 10;
-
- // Load in groups to reduce flickering
- UseWaitCursor = true;
- int lastStart = Math.Max(0, node.Nodes.Count - modsPerUpdate);
- for (int start = 0; start <= lastStart; start += modsPerUpdate)
- {
- // Copy start's value to a variable that won't change as we loop
- int threadStart = start;
- int nodesLeft = node.Nodes.Count - start;
- Task.Factory.StartNew(() =>
- ExpandOnePage(
- registry, node, threadStart,
- // If next page is small (last), add it to this one,
- // so the final page will be slower rather than faster
- nodesLeft >= 2 * modsPerUpdate ? modsPerUpdate : nodesLeft));
- }
- }
-
- private void ExpandOnePage(IRegistryQuerier registry, TreeNode parent, int start, int length)
- {
- // Should already have children, since the user is expanding it
- var nodesAndChildren = parent.Nodes.Cast()
- .Skip(start)
- .Take(length)
- // If there are grandchildren, then this child has been loaded before
- .Where(child => child.Nodes.Count == 0
- // If user switched to another mod, stop loading
- && child.TreeView != null)
- .Select(child => new KeyValuePair(
- child,
- GetChildren(registry, child).ToArray()))
- .ToArray();
- // If user switched to another mod, stop loading
- if (parent.TreeView != null)
- {
- // Refresh the UI
- Util.Invoke(this, () =>
- {
- if (nodesAndChildren.Length > 0)
- {
- DependsGraphTree.BeginUpdate();
- foreach (var kvp in nodesAndChildren)
- {
- kvp.Key.Nodes.AddRange(kvp.Value);
- }
- DependsGraphTree.EndUpdate();
- }
- if (start + length >= parent.Nodes.Count)
- {
- // Reset the cursor when the final group finishes
- UseWaitCursor = false;
- }
- });
- }
- }
-
- private static readonly RelationshipType[] kindsOfRelationships = new RelationshipType[]
- {
- RelationshipType.Depends,
- RelationshipType.Recommends,
- RelationshipType.Suggests,
- RelationshipType.Supports,
- RelationshipType.Conflicts
- };
-
- private void AddChildren(IRegistryQuerier registry, TreeNode node)
- {
- var nodes = GetChildren(registry, node).ToArray();
- Util.Invoke(this, () => node.Nodes.AddRange(nodes));
- }
-
- // Load one layer of grandchildren on demand
- private IEnumerable GetChildren(IRegistryQuerier registry, TreeNode node)
- {
- var module = node.Tag as CkanModule;
- var crit = manager.CurrentInstance.VersionCriteria();
- // Skip children of nodes from circular dependencies
- // Tag is null for non-indexed nodes
- return ImMyOwnGrandpa(node) || module == null
- ? Enumerable.Empty()
- : ReverseRelationshipsCheckbox.CheckState == CheckState.Unchecked
- ? ForwardRelationships(registry, node, module, crit)
- : ReverseRelationships(registry, node, module, crit);
- }
-
- private IEnumerable GetModRelationships(CkanModule module, RelationshipType which)
- {
- switch (which)
- {
- case RelationshipType.Depends:
- return module.depends
- ?? Enumerable.Empty();
- case RelationshipType.Recommends:
- return module.recommends
- ?? Enumerable.Empty();
- case RelationshipType.Suggests:
- return module.suggests
- ?? Enumerable.Empty();
- case RelationshipType.Supports:
- return module.supports
- ?? Enumerable.Empty();
- case RelationshipType.Conflicts:
- return module.conflicts
- ?? Enumerable.Empty();
- }
- return Enumerable.Empty();
- }
-
- private IEnumerable ForwardRelationships(IRegistryQuerier registry, TreeNode node, CkanModule module, GameVersionCriteria crit)
- => kindsOfRelationships.SelectMany(relationship =>
- GetModRelationships(module, relationship).Select(dependency =>
- // Look for compatible mods
- findDependencyShallow(registry, dependency, relationship, crit)
- // Then incompatible mods
- ?? findDependencyShallow(registry, dependency, relationship, null)
- // Then give up and note the name without a module
- ?? nonindexedNode(dependency, relationship)));
-
- private TreeNode findDependencyShallow(IRegistryQuerier registry, RelationshipDescriptor relDescr, RelationshipType relationship, GameVersionCriteria crit)
- {
- // Check if this dependency is installed
- if (relDescr.MatchesAny(
- registry.InstalledModules.Select(im => im.Module),
- new HashSet(registry.InstalledDlls),
- // Maybe it's a DLC?
- registry.InstalledDlc,
- out CkanModule matched))
- {
- return matched != null
- ? indexedNode(registry, matched, relationship, crit)
- : nonModuleNode(relDescr, null, relationship);
- }
-
- // Find modules that satisfy this dependency
- List dependencyModules = relDescr.LatestAvailableWithProvides(
- registry, crit,
- // Ignore conflicts with installed mods
- Enumerable.Empty());
- if (dependencyModules.Count == 0)
- {
- // Nothing found, don't return a node
- return null;
- }
- else if (dependencyModules.Count == 1
- && relDescr.ContainsAny(new string[] { dependencyModules[0].identifier }))
- {
- // Only one exact match module, return a simple node
- return indexedNode(registry, dependencyModules[0], relationship, crit);
- }
- else
- {
- // Several found or not same id, return a "provides" node
- return providesNode(relDescr.ToString(), relationship,
- dependencyModules.Select(dep => indexedNode(registry, dep, relationship, crit))
- );
- }
- }
-
- private IEnumerable ReverseRelationships(IRegistryQuerier registry, TreeNode node, CkanModule module, GameVersionCriteria crit)
- {
- var compat = registry.CompatibleModules(crit).ToArray();
- var incompat = registry.IncompatibleModules(crit).ToArray();
- var toFind = new CkanModule[] { module };
- return kindsOfRelationships.SelectMany(relationship =>
- compat.SelectMany(otherMod =>
- GetModRelationships(otherMod, relationship)
- .Where(r => r.MatchesAny(toFind, null, null))
- .Select(r => indexedNode(registry, otherMod, relationship, crit)))
- .Concat(incompat.SelectMany(otherMod =>
- GetModRelationships(otherMod, relationship)
- .Where(r => r.MatchesAny(toFind, null, null))
- .Select(r => indexedNode(registry, otherMod, relationship, crit)))));
- }
-
- private TreeNode providesNode(string identifier, RelationshipType relationship, IEnumerable children)
- {
- int icon = (int)relationship + 1;
- return new TreeNode(string.Format(Properties.Resources.ModInfoVirtual, identifier), icon, icon, children.ToArray())
- {
- Name = identifier,
- ToolTipText = relationship.ToString(),
- ForeColor = SystemColors.GrayText,
- };
- }
-
- private TreeNode indexedNode(IRegistryQuerier registry, CkanModule module, RelationshipType relationship, GameVersionCriteria crit)
- {
- int icon = (int)relationship + 1;
- bool compatible = crit == null ? false
- : registry.IdentifierCompatible(module.identifier, crit);
- string suffix = compatible ? ""
- : $" ({registry.CompatibleGameVersions(manager.CurrentInstance.game, module.identifier)})";
- return new TreeNode($"{module.name} {module.version}{suffix}", icon, icon)
- {
- Name = module.identifier,
- ToolTipText = relationship.ToString(),
- Tag = module,
- ForeColor = compatible ? SystemColors.WindowText : Color.Red,
- };
- }
-
- private TreeNode nonModuleNode(RelationshipDescriptor relDescr, ModuleVersion version, RelationshipType relationship)
- {
- int icon = (int)relationship + 1;
- return new TreeNode($"{relDescr} {version}", icon, icon)
- {
- Name = relDescr.ToString(),
- ToolTipText = relationship.ToString()
- };
- }
-
- private TreeNode nonindexedNode(RelationshipDescriptor relDescr, RelationshipType relationship)
- {
- // Completely nonexistent dependency, e.g. "AJE"
- int icon = (int)relationship + 1;
- return new TreeNode(string.Format(Properties.Resources.ModInfoNotIndexed, relDescr.ToString()), icon, icon)
- {
- Name = relDescr.ToString(),
- ToolTipText = relationship.ToString(),
- ForeColor = Color.Red
- };
- }
-
- public void UpdateModContentsTree(CkanModule module, bool force = false)
- {
- ModInfoTabControl.Tag = module ?? ModInfoTabControl.Tag;
- //Can be costly. For now only update when visible.
- if (ModInfoTabControl.SelectedIndex != ContentTabPage.TabIndex && !force)
- {
- return;
- }
- Util.Invoke(ContentsPreviewTree, () => _UpdateModContentsTree(ModInfoTabControl.Tag as CkanModule, force));
- }
-
- private void _UpdateModContentsTree(CkanModule module, bool force = false)
- {
- ContentsPreviewTree.BackColor = SystemColors.Window;
- ContentsPreviewTree.LineColor = SystemColors.WindowText;
-
- if (Equals(module, currentModContentsModule) && !force)
- {
- return;
- }
- else
- {
- currentModContentsModule = module;
- }
- if (module.IsMetapackage)
- {
- NotCachedLabel.Text = Properties.Resources.ModInfoNoDownload;
- ContentsPreviewTree.Enabled = false;
- ContentsDownloadButton.Enabled = false;
- ContentsOpenButton.Enabled = false;
- ContentsPreviewTree.Nodes.Clear();
- }
- else
- {
- ContentsPreviewTree.Enabled = true;
- ContentsPreviewTree.Nodes.Clear();
- var rootNode = ContentsPreviewTree.Nodes.Add("", module.ToString(), "folderZip", "folderZip");
- if (!Main.Instance.Manager.Cache.IsMaybeCachedZip(module))
- {
- NotCachedLabel.Text = Properties.Resources.ModInfoNotCached;
- ContentsDownloadButton.Enabled = true;
- ContentsOpenButton.Enabled = false;
- ContentsPreviewTree.Enabled = false;
- }
- else
- {
- rootNode.Text = Path.GetFileName(
- Main.Instance.Manager.Cache.GetCachedFilename(module));
- NotCachedLabel.Text = Properties.Resources.ModInfoCached;
- ContentsDownloadButton.Enabled = false;
- ContentsOpenButton.Enabled = true;
- ContentsPreviewTree.Enabled = true;
-
- UseWaitCursor = true;
- Task.Factory.StartNew(() =>
- {
- var paths = new ModuleInstaller(
- manager.CurrentInstance,
- Main.Instance.Manager.Cache,
- Main.Instance.currentUser)
- .GetModuleContentsList(module)
- // Load fully in bg
- .ToArray();
- // Stop if user switched to another mod
- if (rootNode.TreeView != null)
- {
- Util.Invoke(this, () =>
- {
- ContentsPreviewTree.BeginUpdate();
- foreach (string path in paths)
- {
- AddContentPieces(
- rootNode,
- path.Split(new char[] {'/'}));
- }
- rootNode.ExpandAll();
- rootNode.EnsureVisible();
- ContentsPreviewTree.EndUpdate();
- UseWaitCursor = false;
- });
- }
- });
- }
- }
- }
-
- private void AddContentPieces(TreeNode parent, IEnumerable pieces)
- {
- var firstPiece = pieces.FirstOrDefault();
- if (firstPiece != null)
- {
- if (parent.ImageKey == "file")
- {
- parent.SelectedImageKey = parent.ImageKey = "folder";
- }
- // Key/Name needs to be the full relative path for double click to work
- var key = string.IsNullOrEmpty(parent.Name)
- ? firstPiece
- : $"{parent.Name}/{firstPiece}";
- var node = parent.Nodes[key]
- ?? parent.Nodes.Add(key, firstPiece, "file", "file");
- AddContentPieces(node, pieces.Skip(1));
- }
- }
-
- ///
- /// Opens the folder of the double-clicked node
- /// in the file browser of the user's system
- ///
- /// A node of the ContentsPreviewTree
- internal void OpenFileBrowser(TreeNode node)
- {
- string location = manager.CurrentInstance.ToAbsoluteGameDir(node.Name);
-
- if (File.Exists(location))
- {
- // We need the Folder of the file
- // Otherwise the OS would try to open the file in its default application
- location = Path.GetDirectoryName(location);
- }
-
- if (!Directory.Exists(location))
- {
- // User either selected the parent node
- // or he clicked on the tree node of a cached, but not installed mod
- return;
- }
-
- Utilities.ProcessStartURL(location);
- }
}
}
diff --git a/GUI/Controls/ModInfo.resx b/GUI/Controls/ModInfo.resx
index d4f0e76809..2a461941a0 100644
--- a/GUI/Controls/ModInfo.resx
+++ b/GUI/Controls/ModInfo.resx
@@ -118,31 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Metadata
- Mod Name
- Identifier:
- -
- Replaced by:
- -
- Max game ver.:
- Release status:
- Author:
- Licence:
- 0.0.0
- None
- Nobody
- Version:
- Stable
- 0.0.0
Relationships
- Depends
- Recommends
- Suggests
- Supports
- Conflicts
- Reverse relationships
Contents
- Download
- Open ZIP
- This mod is not in the cache, click 'Download' to preview contents
- Versions
+ Versions
diff --git a/GUI/Controls/ModInfoTabs/Contents.Designer.cs b/GUI/Controls/ModInfoTabs/Contents.Designer.cs
new file mode 100644
index 0000000000..fea495efc5
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Contents.Designer.cs
@@ -0,0 +1,114 @@
+namespace CKAN.GUI
+{
+ partial class Contents
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(Contents));
+ this.NotCachedLabel = new System.Windows.Forms.Label();
+ this.ContentsPreviewTree = new System.Windows.Forms.TreeView();
+ this.ContentsDownloadButton = new System.Windows.Forms.Button();
+ this.ContentsOpenButton = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // NotCachedLabel
+ //
+ this.NotCachedLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.NotCachedLabel.Location = new System.Drawing.Point(3, 3);
+ this.NotCachedLabel.Name = "NotCachedLabel";
+ this.NotCachedLabel.Size = new System.Drawing.Size(494, 30);
+ this.NotCachedLabel.TabIndex = 0;
+ resources.ApplyResources(this.NotCachedLabel, "NotCachedLabel");
+ //
+ // ContentsDownloadButton
+ //
+ this.ContentsDownloadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.ContentsDownloadButton.Location = new System.Drawing.Point(6, 36);
+ this.ContentsDownloadButton.Name = "ContentsDownloadButton";
+ this.ContentsDownloadButton.Size = new System.Drawing.Size(103, 23);
+ this.ContentsDownloadButton.TabIndex = 1;
+ this.ContentsDownloadButton.UseVisualStyleBackColor = true;
+ this.ContentsDownloadButton.Click += new System.EventHandler(this.ContentsDownloadButton_Click);
+ resources.ApplyResources(this.ContentsDownloadButton, "ContentsDownloadButton");
+ //
+ // ContentsOpenButton
+ //
+ this.ContentsOpenButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.ContentsOpenButton.Location = new System.Drawing.Point(115, 36);
+ this.ContentsOpenButton.Name = "ContentsOpenButton";
+ this.ContentsOpenButton.Size = new System.Drawing.Size(103, 23);
+ this.ContentsOpenButton.TabIndex = 1;
+ this.ContentsOpenButton.UseVisualStyleBackColor = true;
+ this.ContentsOpenButton.Click += new System.EventHandler(this.ContentsOpenButton_Click);
+ resources.ApplyResources(this.ContentsOpenButton, "ContentsOpenButton");
+ //
+ // ContentsPreviewTree
+ //
+ this.ContentsPreviewTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.ContentsPreviewTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.ContentsPreviewTree.ImageList = new System.Windows.Forms.ImageList(this.components)
+ {
+ // ImageList's default makes icons look like garbage
+ ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
+ };
+ this.ContentsPreviewTree.ImageList.Images.Add("folderZip", global::CKAN.GUI.Properties.Resources.folderZip);
+ this.ContentsPreviewTree.ImageList.Images.Add("folder", global::CKAN.GUI.Properties.Resources.folder);
+ this.ContentsPreviewTree.ImageList.Images.Add("file", global::CKAN.GUI.Properties.Resources.file);
+ this.ContentsPreviewTree.ShowPlusMinus = true;
+ this.ContentsPreviewTree.ShowRootLines = false;
+ this.ContentsPreviewTree.Location = new System.Drawing.Point(3, 65);
+ this.ContentsPreviewTree.Name = "ContentsPreviewTree";
+ this.ContentsPreviewTree.Size = new System.Drawing.Size(494, 431);
+ this.ContentsPreviewTree.TabIndex = 2;
+ this.ContentsPreviewTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.ContentsPreviewTree_NodeMouseDoubleClick);
+ //
+ // Contents
+ //
+ this.Controls.Add(this.ContentsPreviewTree);
+ this.Controls.Add(this.ContentsDownloadButton);
+ this.Controls.Add(this.ContentsOpenButton);
+ this.Controls.Add(this.NotCachedLabel);
+ this.Name = "Contents";
+ this.Size = new System.Drawing.Size(500, 500);
+ resources.ApplyResources(this, "$this");
+ this.ResumeLayout(false);
+ this.PerformLayout();
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label NotCachedLabel;
+ private System.Windows.Forms.Button ContentsDownloadButton;
+ private System.Windows.Forms.Button ContentsOpenButton;
+ private System.Windows.Forms.TreeView ContentsPreviewTree;
+ }
+}
diff --git a/GUI/Controls/ModInfoTabs/Contents.cs b/GUI/Controls/ModInfoTabs/Contents.cs
new file mode 100644
index 0000000000..c1109d0141
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Contents.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace CKAN.GUI
+{
+ public partial class Contents : UserControl
+ {
+ public Contents()
+ {
+ InitializeComponent();
+ }
+
+ public GUIMod SelectedModule
+ {
+ set
+ {
+ var module = value?.ToModule();
+ if (value != selectedModule)
+ {
+ selectedModule = value;
+ UpdateModContentsTree(selectedModule.ToModule());
+ }
+ }
+ get => selectedModule;
+ }
+
+ public void UpdateModContentsTree(CkanModule module, bool force = false)
+ {
+ Util.Invoke(ContentsPreviewTree, () => _UpdateModContentsTree(module, force));
+ }
+
+ public event Action OnDownloadClick;
+
+ private GUIMod selectedModule;
+ private CkanModule currentModContentsModule;
+ private GameInstanceManager manager => Main.Instance.manager;
+
+ private void ContentsPreviewTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ OpenFileBrowser(e.Node);
+ }
+
+ private void ContentsDownloadButton_Click(object sender, EventArgs e)
+ {
+ OnDownloadClick?.Invoke(SelectedModule);
+ }
+
+ private void ContentsOpenButton_Click(object sender, EventArgs e)
+ {
+ Utilities.ProcessStartURL(manager.Cache.GetCachedFilename(SelectedModule.ToModule()));
+ }
+
+ private void _UpdateModContentsTree(CkanModule module, bool force = false)
+ {
+ ContentsPreviewTree.BackColor = SystemColors.Window;
+ ContentsPreviewTree.LineColor = SystemColors.WindowText;
+
+ if (Equals(module, currentModContentsModule) && !force)
+ {
+ return;
+ }
+ else
+ {
+ currentModContentsModule = module;
+ }
+ if (module.IsMetapackage)
+ {
+ NotCachedLabel.Text = Properties.Resources.ModInfoNoDownload;
+ ContentsPreviewTree.Enabled = false;
+ ContentsDownloadButton.Enabled = false;
+ ContentsOpenButton.Enabled = false;
+ ContentsPreviewTree.Nodes.Clear();
+ }
+ else
+ {
+ ContentsPreviewTree.Enabled = true;
+ ContentsPreviewTree.Nodes.Clear();
+ var rootNode = ContentsPreviewTree.Nodes.Add("", module.ToString(), "folderZip", "folderZip");
+ if (!Main.Instance.Manager.Cache.IsMaybeCachedZip(module))
+ {
+ NotCachedLabel.Text = Properties.Resources.ModInfoNotCached;
+ ContentsDownloadButton.Enabled = true;
+ ContentsOpenButton.Enabled = false;
+ ContentsPreviewTree.Enabled = false;
+ }
+ else
+ {
+ rootNode.Text = Path.GetFileName(
+ Main.Instance.Manager.Cache.GetCachedFilename(module));
+ NotCachedLabel.Text = Properties.Resources.ModInfoCached;
+ ContentsDownloadButton.Enabled = false;
+ ContentsOpenButton.Enabled = true;
+ ContentsPreviewTree.Enabled = true;
+
+ UseWaitCursor = true;
+ Task.Factory.StartNew(() =>
+ {
+ var paths = new ModuleInstaller(
+ manager.CurrentInstance,
+ Main.Instance.Manager.Cache,
+ Main.Instance.currentUser)
+ .GetModuleContentsList(module)
+ // Load fully in bg
+ .ToArray();
+ // Stop if user switched to another mod
+ if (rootNode.TreeView != null)
+ {
+ Util.Invoke(this, () =>
+ {
+ ContentsPreviewTree.BeginUpdate();
+ foreach (string path in paths)
+ {
+ AddContentPieces(
+ rootNode,
+ path.Split(new char[] {'/'}));
+ }
+ rootNode.ExpandAll();
+ rootNode.EnsureVisible();
+ ContentsPreviewTree.EndUpdate();
+ UseWaitCursor = false;
+ });
+ }
+ });
+ }
+ }
+ }
+
+ private void AddContentPieces(TreeNode parent, IEnumerable pieces)
+ {
+ var firstPiece = pieces.FirstOrDefault();
+ if (firstPiece != null)
+ {
+ if (parent.ImageKey == "file")
+ {
+ parent.SelectedImageKey = parent.ImageKey = "folder";
+ }
+ // Key/Name needs to be the full relative path for double click to work
+ var key = string.IsNullOrEmpty(parent.Name)
+ ? firstPiece
+ : $"{parent.Name}/{firstPiece}";
+ var node = parent.Nodes[key]
+ ?? parent.Nodes.Add(key, firstPiece, "file", "file");
+ AddContentPieces(node, pieces.Skip(1));
+ }
+ }
+
+ ///
+ /// Opens the folder of the double-clicked node
+ /// in the file browser of the user's system
+ ///
+ /// A node of the ContentsPreviewTree
+ private void OpenFileBrowser(TreeNode node)
+ {
+ string location = manager.CurrentInstance.ToAbsoluteGameDir(node.Name);
+
+ if (File.Exists(location))
+ {
+ // We need the Folder of the file
+ // Otherwise the OS would try to open the file in its default application
+ location = Path.GetDirectoryName(location);
+ }
+
+ if (!Directory.Exists(location))
+ {
+ // User either selected the parent node
+ // or he clicked on the tree node of a cached, but not installed mod
+ return;
+ }
+
+ Utilities.ProcessStartURL(location);
+ }
+ }
+}
diff --git a/GUI/Controls/HintTextBox.resx b/GUI/Controls/ModInfoTabs/Contents.resx
similarity index 88%
rename from GUI/Controls/HintTextBox.resx
rename to GUI/Controls/ModInfoTabs/Contents.resx
index e5858cc294..c9b0cae671 100644
--- a/GUI/Controls/HintTextBox.resx
+++ b/GUI/Controls/ModInfoTabs/Contents.resx
@@ -1,17 +1,17 @@
-
+
-
@@ -117,7 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- False
-
-
\ No newline at end of file
+ Download
+ Open ZIP
+ This mod is not in the cache, click 'Download' to preview contents
+
diff --git a/GUI/Controls/ModInfoTabs/Metadata.Designer.cs b/GUI/Controls/ModInfoTabs/Metadata.Designer.cs
new file mode 100644
index 0000000000..cf7f2c25eb
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Metadata.Designer.cs
@@ -0,0 +1,302 @@
+namespace CKAN.GUI
+{
+ partial class Metadata
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(Metadata));
+ this.MetadataTable = new System.Windows.Forms.TableLayoutPanel();
+ this.IdentifierLabel = new System.Windows.Forms.Label();
+ this.MetadataIdentifierTextBox = new TransparentTextBox();
+ this.ReplacementLabel = new System.Windows.Forms.Label();
+ this.ReplacementTextBox = new TransparentTextBox();
+ this.GameCompatibilityLabel = new System.Windows.Forms.Label();
+ this.ReleaseLabel = new System.Windows.Forms.Label();
+ this.AuthorLabel = new System.Windows.Forms.Label();
+ this.LicenseLabel = new System.Windows.Forms.Label();
+ this.MetadataModuleVersionTextBox = new TransparentTextBox();
+ this.MetadataModuleLicenseTextBox = new TransparentTextBox();
+ this.MetadataModuleAuthorTextBox = new TransparentTextBox();
+ this.VersionLabel = new System.Windows.Forms.Label();
+ this.MetadataModuleReleaseStatusTextBox = new TransparentTextBox();
+ this.MetadataModuleGameCompatibilityTextBox = new TransparentTextBox();
+ this.SuspendLayout();
+ //
+ // MetadataTable
+ //
+ this.MetadataTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.MetadataTable.ColumnCount = 2;
+ this.MetadataTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
+ this.MetadataTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.MetadataTable.Controls.Add(this.VersionLabel, 0, 0);
+ this.MetadataTable.Controls.Add(this.LicenseLabel, 0, 1);
+ this.MetadataTable.Controls.Add(this.AuthorLabel, 0, 2);
+ this.MetadataTable.Controls.Add(this.ReleaseLabel, 0, 3);
+ this.MetadataTable.Controls.Add(this.GameCompatibilityLabel, 0, 4);
+ this.MetadataTable.Controls.Add(this.IdentifierLabel, 0, 5);
+ this.MetadataTable.Controls.Add(this.ReplacementLabel, 0, 6);
+ this.MetadataTable.Controls.Add(this.MetadataModuleVersionTextBox, 1, 0);
+ this.MetadataTable.Controls.Add(this.MetadataModuleLicenseTextBox, 1, 1);
+ this.MetadataTable.Controls.Add(this.MetadataModuleAuthorTextBox, 1, 2);
+ this.MetadataTable.Controls.Add(this.MetadataModuleReleaseStatusTextBox, 1, 3);
+ this.MetadataTable.Controls.Add(this.MetadataModuleGameCompatibilityTextBox, 1, 4);
+ this.MetadataTable.Controls.Add(this.MetadataIdentifierTextBox, 1, 5);
+ this.MetadataTable.Controls.Add(this.ReplacementTextBox, 1, 6);
+ this.MetadataTable.Dock = System.Windows.Forms.DockStyle.Top;
+ this.MetadataTable.Location = new System.Drawing.Point(0, 0);
+ this.MetadataTable.Name = "MetadataTable";
+ this.MetadataTable.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0);
+ this.MetadataTable.RowCount = 7;
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
+ this.MetadataTable.Size = new System.Drawing.Size(346, 255);
+ this.MetadataTable.AutoSize = true;
+ /*
+ //this.MetadataTable.AutoScroll = true;
+ this.MetadataTable.HorizontalScroll.Enabled = false;
+ this.MetadataTable.HorizontalScroll.Visible = false;
+ this.MetadataTable.HorizontalScroll.Minimum = 0;
+ this.MetadataTable.HorizontalScroll.Maximum = 0;
+ this.MetadataTable.VerticalScroll.Enabled = true;
+ this.MetadataTable.VerticalScroll.Visible = true;
+ */
+ this.MetadataTable.TabIndex = 0;
+ //
+ // IdentifierLabel
+ //
+ this.IdentifierLabel.AutoSize = true;
+ this.IdentifierLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.IdentifierLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.IdentifierLabel.Location = new System.Drawing.Point(3, 210);
+ this.IdentifierLabel.Name = "IdentifierLabel";
+ this.IdentifierLabel.Size = new System.Drawing.Size(84, 20);
+ this.IdentifierLabel.TabIndex = 28;
+ resources.ApplyResources(this.IdentifierLabel, "IdentifierLabel");
+ //
+ // MetadataIdentifierTextBox
+ //
+ this.MetadataIdentifierTextBox.AutoSize = true;
+ this.MetadataIdentifierTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataIdentifierTextBox.Location = new System.Drawing.Point(93, 210);
+ this.MetadataIdentifierTextBox.Name = "MetadataIdentifierTextBox";
+ this.MetadataIdentifierTextBox.Size = new System.Drawing.Size(250, 20);
+ this.MetadataIdentifierTextBox.TabIndex = 27;
+ this.MetadataIdentifierTextBox.ReadOnly = true;
+ this.MetadataIdentifierTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataIdentifierTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataIdentifierTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataIdentifierTextBox, "MetadataIdentifierTextBox");
+ //
+ // ReplacementLabel
+ //
+ this.ReplacementLabel.AutoSize = true;
+ this.ReplacementLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ReplacementLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.ReplacementLabel.Location = new System.Drawing.Point(3, 240);
+ this.ReplacementLabel.Name = "ReplacementLabel";
+ this.ReplacementLabel.Size = new System.Drawing.Size(84, 20);
+ this.ReplacementLabel.TabIndex = 28;
+ resources.ApplyResources(this.ReplacementLabel, "ReplacementLabel");
+ //
+ // ReplacementTextBox
+ //
+ this.ReplacementTextBox.AutoSize = true;
+ this.ReplacementTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ReplacementTextBox.Location = new System.Drawing.Point(93, 240);
+ this.ReplacementTextBox.Name = "ReplacementTextBox";
+ this.ReplacementTextBox.Size = new System.Drawing.Size(250, 20);
+ this.ReplacementTextBox.TabIndex = 27;
+ this.ReplacementTextBox.ReadOnly = true;
+ this.ReplacementTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.ReplacementTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.ReplacementTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.ReplacementTextBox, "ReplacementTextBox");
+ //
+ // GameCompatibilityLabel
+ //
+ this.GameCompatibilityLabel.AutoSize = true;
+ this.GameCompatibilityLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.GameCompatibilityLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.GameCompatibilityLabel.Location = new System.Drawing.Point(3, 180);
+ this.GameCompatibilityLabel.Name = "GameCompatibilityLabel";
+ this.GameCompatibilityLabel.Size = new System.Drawing.Size(84, 30);
+ this.GameCompatibilityLabel.TabIndex = 13;
+ resources.ApplyResources(this.GameCompatibilityLabel, "GameCompatibilityLabel");
+ //
+ // ReleaseLabel
+ //
+ this.ReleaseLabel.AutoSize = true;
+ this.ReleaseLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ReleaseLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.ReleaseLabel.Location = new System.Drawing.Point(3, 150);
+ this.ReleaseLabel.Name = "ReleaseLabel";
+ this.ReleaseLabel.Size = new System.Drawing.Size(84, 30);
+ this.ReleaseLabel.TabIndex = 12;
+ resources.ApplyResources(this.ReleaseLabel, "ReleaseLabel");
+ //
+ // AuthorLabel
+ //
+ this.AuthorLabel.AutoSize = true;
+ this.AuthorLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.AuthorLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.AuthorLabel.Location = new System.Drawing.Point(3, 60);
+ this.AuthorLabel.Name = "AuthorLabel";
+ this.AuthorLabel.Size = new System.Drawing.Size(84, 30);
+ this.AuthorLabel.TabIndex = 5;
+ resources.ApplyResources(this.AuthorLabel, "AuthorLabel");
+ //
+ // LicenseLabel
+ //
+ this.LicenseLabel.AutoSize = true;
+ this.LicenseLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.LicenseLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.LicenseLabel.Location = new System.Drawing.Point(3, 30);
+ this.LicenseLabel.Name = "LicenseLabel";
+ this.LicenseLabel.Size = new System.Drawing.Size(84, 30);
+ this.LicenseLabel.TabIndex = 3;
+ resources.ApplyResources(this.LicenseLabel, "LicenseLabel");
+ //
+ // MetadataModuleVersionTextBox
+ //
+ this.MetadataModuleVersionTextBox.AutoSize = true;
+ this.MetadataModuleVersionTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataModuleVersionTextBox.Location = new System.Drawing.Point(93, 0);
+ this.MetadataModuleVersionTextBox.Name = "MetadataModuleVersionTextBox";
+ this.MetadataModuleVersionTextBox.Size = new System.Drawing.Size(250, 30);
+ this.MetadataModuleVersionTextBox.TabIndex = 2;
+ this.MetadataModuleVersionTextBox.ReadOnly = true;
+ this.MetadataModuleVersionTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataModuleVersionTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataModuleVersionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataModuleVersionTextBox, "MetadataModuleVersionTextBox");
+ //
+ // MetadataModuleLicenseTextBox
+ //
+ this.MetadataModuleLicenseTextBox.AutoSize = true;
+ this.MetadataModuleLicenseTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataModuleLicenseTextBox.Location = new System.Drawing.Point(93, 30);
+ this.MetadataModuleLicenseTextBox.Name = "MetadataModuleLicenseTextBox";
+ this.MetadataModuleLicenseTextBox.Size = new System.Drawing.Size(250, 30);
+ this.MetadataModuleLicenseTextBox.TabIndex = 4;
+ this.MetadataModuleLicenseTextBox.ReadOnly = true;
+ this.MetadataModuleLicenseTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataModuleLicenseTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataModuleLicenseTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataModuleLicenseTextBox, "MetadataModuleLicenseTextBox");
+ //
+ // MetadataModuleAuthorTextBox
+ //
+ this.MetadataModuleAuthorTextBox.AutoSize = true;
+ this.MetadataModuleAuthorTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataModuleAuthorTextBox.Location = new System.Drawing.Point(93, 60);
+ this.MetadataModuleAuthorTextBox.Name = "MetadataModuleAuthorTextBox";
+ this.MetadataModuleAuthorTextBox.Size = new System.Drawing.Size(250, 30);
+ this.MetadataModuleAuthorTextBox.TabIndex = 6;
+ this.MetadataModuleAuthorTextBox.ReadOnly = true;
+ this.MetadataModuleAuthorTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataModuleAuthorTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataModuleAuthorTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataModuleAuthorTextBox, "MetadataModuleAuthorTextBox");
+ //
+ // VersionLabel
+ //
+ this.VersionLabel.AutoSize = true;
+ this.VersionLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.VersionLabel.ForeColor = System.Drawing.SystemColors.GrayText;
+ this.VersionLabel.Location = new System.Drawing.Point(3, 0);
+ this.VersionLabel.Name = "VersionLabel";
+ this.VersionLabel.Size = new System.Drawing.Size(84, 30);
+ this.VersionLabel.TabIndex = 1;
+ resources.ApplyResources(this.VersionLabel, "VersionLabel");
+ //
+ // MetadataModuleReleaseStatusTextBox
+ //
+ this.MetadataModuleReleaseStatusTextBox.AutoSize = true;
+ this.MetadataModuleReleaseStatusTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataModuleReleaseStatusTextBox.Location = new System.Drawing.Point(93, 150);
+ this.MetadataModuleReleaseStatusTextBox.Name = "MetadataModuleReleaseStatusTextBox";
+ this.MetadataModuleReleaseStatusTextBox.Size = new System.Drawing.Size(250, 30);
+ this.MetadataModuleReleaseStatusTextBox.TabIndex = 11;
+ this.MetadataModuleReleaseStatusTextBox.ReadOnly = true;
+ this.MetadataModuleReleaseStatusTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataModuleReleaseStatusTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataModuleReleaseStatusTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataModuleReleaseStatusTextBox, "MetadataModuleReleaseStatusTextBox");
+ //
+ // MetadataModuleGameCompatibilityTextBox
+ //
+ this.MetadataModuleGameCompatibilityTextBox.AutoSize = true;
+ this.MetadataModuleGameCompatibilityTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.MetadataModuleGameCompatibilityTextBox.Location = new System.Drawing.Point(93, 180);
+ this.MetadataModuleGameCompatibilityTextBox.Name = "MetadataModuleGameCompatibilityTextBox";
+ this.MetadataModuleGameCompatibilityTextBox.Size = new System.Drawing.Size(250, 30);
+ this.MetadataModuleGameCompatibilityTextBox.TabIndex = 14;
+ this.MetadataModuleGameCompatibilityTextBox.ReadOnly = true;
+ this.MetadataModuleGameCompatibilityTextBox.BackColor = System.Drawing.SystemColors.Control;
+ this.MetadataModuleGameCompatibilityTextBox.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.MetadataModuleGameCompatibilityTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ resources.ApplyResources(this.MetadataModuleGameCompatibilityTextBox, "MetadataModuleGameCompatibilityTextBox");
+ //
+ // Metadata
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.MetadataTable);
+ this.Name = "Metadata";
+ this.Size = new System.Drawing.Size(362, 531);
+ resources.ApplyResources(this, "$this");
+ this.MetadataTable.ResumeLayout(false);
+ this.MetadataTable.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel MetadataTable;
+ private System.Windows.Forms.Label IdentifierLabel;
+ private TransparentTextBox MetadataIdentifierTextBox;
+ private System.Windows.Forms.Label ReplacementLabel;
+ private TransparentTextBox ReplacementTextBox;
+ private System.Windows.Forms.Label GameCompatibilityLabel;
+ private System.Windows.Forms.Label ReleaseLabel;
+ private System.Windows.Forms.Label AuthorLabel;
+ private System.Windows.Forms.Label LicenseLabel;
+ private TransparentTextBox MetadataModuleVersionTextBox;
+ private TransparentTextBox MetadataModuleLicenseTextBox;
+ private TransparentTextBox MetadataModuleAuthorTextBox;
+ private System.Windows.Forms.Label VersionLabel;
+ private TransparentTextBox MetadataModuleReleaseStatusTextBox;
+ private TransparentTextBox MetadataModuleGameCompatibilityTextBox;
+ }
+}
diff --git a/GUI/Controls/ModInfoTabs/Metadata.cs b/GUI/Controls/ModInfoTabs/Metadata.cs
new file mode 100644
index 0000000000..da9be85399
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Metadata.cs
@@ -0,0 +1,198 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace CKAN.GUI
+{
+ public partial class Metadata : UserControl
+ {
+ public Metadata()
+ {
+ InitializeComponent();
+ staticRowCount = MetadataTable.RowCount;
+ }
+
+ public void UpdateModInfo(GUIMod gui_module)
+ {
+ CkanModule module = gui_module.ToModule();
+
+ Util.Invoke(MetadataModuleVersionTextBox, () => MetadataModuleVersionTextBox.Text = gui_module.LatestVersion.ToString());
+ Util.Invoke(MetadataModuleLicenseTextBox, () => MetadataModuleLicenseTextBox.Text = string.Join(", ", module.license));
+ Util.Invoke(MetadataModuleAuthorTextBox, () => MetadataModuleAuthorTextBox.Text = gui_module.Authors);
+ Util.Invoke(MetadataIdentifierTextBox, () => MetadataIdentifierTextBox.Text = module.identifier);
+
+ Util.Invoke(MetadataModuleReleaseStatusTextBox, () =>
+ {
+ if (module.release_status == null)
+ {
+ ReleaseLabel.Visible = false;
+ MetadataModuleReleaseStatusTextBox.Visible = false;
+ MetadataTable.LayoutSettings.RowStyles[3].Height = 0;
+ }
+ else
+ {
+ ReleaseLabel.Visible = true;
+ MetadataModuleReleaseStatusTextBox.Visible = true;
+ MetadataTable.LayoutSettings.RowStyles[3].Height = 30;
+ MetadataModuleReleaseStatusTextBox.Text = module.release_status.ToString();
+ }
+ });
+ Util.Invoke(MetadataModuleGameCompatibilityTextBox, () => MetadataModuleGameCompatibilityTextBox.Text = gui_module.GameCompatibilityLong);
+
+ Util.Invoke(ReplacementTextBox, () =>
+ {
+ if (module.replaced_by == null)
+ {
+ ReplacementLabel.Visible = false;
+ ReplacementTextBox.Visible = false;
+ MetadataTable.LayoutSettings.RowStyles[6].Height = 0;
+ }
+ else
+ {
+ ReplacementLabel.Visible = true;
+ ReplacementTextBox.Visible = true;
+ MetadataTable.LayoutSettings.RowStyles[6].Height = 30;
+ ReplacementTextBox.Text = module.replaced_by.ToString();
+ }
+ });
+
+ Util.Invoke(MetadataTable, () =>
+ {
+ ClearResourceLinks();
+ var res = module.resources;
+ if (res != null)
+ {
+ AddResourceLink(Properties.Resources.ModInfoHomepageLabel, res.homepage);
+ AddResourceLink(Properties.Resources.ModInfoSpaceDockLabel, res.spacedock);
+ AddResourceLink(Properties.Resources.ModInfoCurseLabel, res.curse);
+ AddResourceLink(Properties.Resources.ModInfoRepositoryLabel, res.repository);
+ AddResourceLink(Properties.Resources.ModInfoBugTrackerLabel, res.bugtracker);
+ AddResourceLink(Properties.Resources.ModInfoContinuousIntegrationLabel, res.ci);
+ AddResourceLink(Properties.Resources.ModInfoLicenseLabel, res.license);
+ AddResourceLink(Properties.Resources.ModInfoManualLabel, res.manual);
+ AddResourceLink(Properties.Resources.ModInfoMetanetkanLabel, res.metanetkan);
+ AddResourceLink(Properties.Resources.ModInfoRemoteAvcLabel, res.remoteAvc);
+ AddResourceLink(Properties.Resources.ModInfoStoreLabel, res.store);
+ AddResourceLink(Properties.Resources.ModInfoSteamStoreLabel, res.steamstore);
+ }
+ });
+ }
+
+ private GameInstanceManager manager => Main.Instance.manager;
+
+ private void LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ Util.HandleLinkClicked((sender as LinkLabel).Text, e);
+ }
+
+ private void LinkLabel_KeyDown(object sender, KeyEventArgs e)
+ {
+ switch (e.KeyCode)
+ {
+ case Keys.Apps:
+ Util.LinkContextMenu((sender as LinkLabel).Text);
+ e.Handled = true;
+ break;
+ }
+ }
+
+ private int StringHeight(string text, Font font, int maxWidth)
+ => (int)CreateGraphics().MeasureString(text, font, maxWidth).Height;
+
+ private int LinkLabelStringHeight(LinkLabel lb, int fitWidth)
+ => lb.Padding.Vertical + lb.Margin.Vertical + 10
+ + StringHeight(lb.Text, lb.Font, fitWidth);
+
+ private int LabelStringHeight(Label lb)
+ => lb.Padding.Vertical + lb.Margin.Vertical + 10
+ + StringHeight(lb.Text, lb.Font, lb.Width);
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+ ResizeResourceRows();
+ }
+
+ private void ClearResourceLinks()
+ {
+ for (int row = MetadataTable.RowCount - 1; row >= staticRowCount; --row)
+ {
+ RemovePanelControl(MetadataTable, 0, row);
+ RemovePanelControl(MetadataTable, 1, row);
+ MetadataTable.RowStyles.RemoveAt(row);
+ }
+ MetadataTable.RowCount = staticRowCount;
+ }
+
+ private static void RemovePanelControl(TableLayoutPanel panel, int col, int row)
+ {
+ var ctl = panel.GetControlFromPosition(col, row);
+ if (ctl != null)
+ {
+ panel.Controls.Remove(ctl);
+ }
+ }
+
+ private int RightColumnWidth
+ => MetadataTable.Width
+ - MetadataTable.Padding.Horizontal
+ - MetadataTable.Margin.Horizontal
+ - (int)MetadataTable.ColumnStyles[0].Width;
+
+ private void AddResourceLink(string label, Uri link)
+ {
+ const int vPadding = 5;
+ if (link != null)
+ {
+ Label lbl = new Label()
+ {
+ AutoSize = true,
+ Dock = DockStyle.Fill,
+ ForeColor = SystemColors.GrayText,
+ Padding = new Padding(0, vPadding, 0, vPadding),
+ Text = label,
+ };
+ LinkLabel llbl = new LinkLabel()
+ {
+ AutoSize = false,
+ Dock = DockStyle.Fill,
+ Padding = new Padding(0, vPadding, 0, vPadding),
+ TabStop = true,
+ Text = link.ToString(),
+ };
+ llbl.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkLabel_LinkClicked);
+ llbl.KeyDown += new KeyEventHandler(LinkLabel_KeyDown);
+ int row = MetadataTable.RowCount;
+ MetadataTable.Controls.Add(lbl, 0, row);
+ MetadataTable.Controls.Add(llbl, 1, row);
+ MetadataTable.RowCount = row + 1;
+ MetadataTable.RowStyles.Add(
+ new RowStyle(SizeType.Absolute, Math.Max(
+ // "Remote version file" wraps
+ LabelStringHeight(lbl),
+ LinkLabelStringHeight(llbl, RightColumnWidth))));
+ }
+ }
+
+ private void ResizeResourceRows()
+ {
+ if (staticRowCount > 0)
+ {
+ var rWidth = RightColumnWidth;
+ for (int row = staticRowCount; row < MetadataTable.RowStyles.Count; ++row)
+ {
+ if (MetadataTable.GetControlFromPosition(0, row) is Label lab
+ && MetadataTable.GetControlFromPosition(1, row) is LinkLabel link)
+ {
+ MetadataTable.RowStyles[row].Height = Math.Max(
+ // "Remote version file" wraps
+ LabelStringHeight(lab),
+ LinkLabelStringHeight(link, rWidth));
+ }
+ }
+ }
+ }
+
+ private readonly int staticRowCount;
+ }
+}
diff --git a/GUI/Controls/ModInfoTabs/Metadata.resx b/GUI/Controls/ModInfoTabs/Metadata.resx
new file mode 100644
index 0000000000..c689551ef4
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Metadata.resx
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Identifier:
+ -
+ Replaced by:
+ -
+ Max game ver.:
+ Release status:
+ Author:
+ Licence:
+ None
+ Nobody
+ Version:
+
diff --git a/GUI/Controls/ModInfoTabs/Relationships.Designer.cs b/GUI/Controls/ModInfoTabs/Relationships.Designer.cs
new file mode 100644
index 0000000000..58c3b8c46a
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Relationships.Designer.cs
@@ -0,0 +1,222 @@
+namespace CKAN.GUI
+{
+ partial class Relationships
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(Relationships));
+ this.ToolTip = new System.Windows.Forms.ToolTip();
+ this.DependsGraphTree = new System.Windows.Forms.TreeView();
+ this.LegendProvidesImage = new System.Windows.Forms.PictureBox();
+ this.LegendProvidesLabel = new System.Windows.Forms.Label();
+ this.LegendDependsImage = new System.Windows.Forms.PictureBox();
+ this.LegendDependsLabel = new System.Windows.Forms.Label();
+ this.LegendRecommendsImage = new System.Windows.Forms.PictureBox();
+ this.LegendRecommendsLabel = new System.Windows.Forms.Label();
+ this.LegendSuggestsImage = new System.Windows.Forms.PictureBox();
+ this.LegendSuggestsLabel = new System.Windows.Forms.Label();
+ this.LegendSupportsImage = new System.Windows.Forms.PictureBox();
+ this.LegendSupportsLabel = new System.Windows.Forms.Label();
+ this.LegendConflictsImage = new System.Windows.Forms.PictureBox();
+ this.LegendConflictsLabel = new System.Windows.Forms.Label();
+ this.ReverseRelationshipsCheckbox = new System.Windows.Forms.CheckBox();
+ this.SuspendLayout();
+ //
+ // ToolTip
+ //
+ this.ToolTip.AutoPopDelay = 10000;
+ this.ToolTip.InitialDelay = 250;
+ this.ToolTip.ReshowDelay = 250;
+ this.ToolTip.ShowAlways = true;
+ //
+ // DependsGraphTree
+ //
+ this.DependsGraphTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.DependsGraphTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.DependsGraphTree.Location = new System.Drawing.Point(3, 114);
+ this.DependsGraphTree.Name = "DependsGraphTree";
+ this.DependsGraphTree.Size = new System.Drawing.Size(494, 364);
+ this.DependsGraphTree.TabIndex = 0;
+ this.DependsGraphTree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DependsGraphTree_NodeMouseDoubleClick);
+ this.DependsGraphTree.ShowNodeToolTips = true;
+ this.DependsGraphTree.ImageList = new System.Windows.Forms.ImageList(this.components)
+ {
+ // ImageList's default makes icons look like garbage
+ ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit
+ };
+ this.DependsGraphTree.ImageList.Images.Add("Root", global::CKAN.GUI.Properties.Resources.ksp);
+ this.DependsGraphTree.ImageList.Images.Add("Provides", global::CKAN.GUI.Properties.Resources.ballot);
+ this.DependsGraphTree.ImageList.Images.Add("Depends", global::CKAN.GUI.Properties.Resources.star);
+ this.DependsGraphTree.ImageList.Images.Add("Recommends", global::CKAN.GUI.Properties.Resources.thumbup);
+ this.DependsGraphTree.ImageList.Images.Add("Suggests", global::CKAN.GUI.Properties.Resources.info);
+ this.DependsGraphTree.ImageList.Images.Add("Supports", global::CKAN.GUI.Properties.Resources.smile);
+ this.DependsGraphTree.ImageList.Images.Add("Conflicts", global::CKAN.GUI.Properties.Resources.alert);
+ //
+ // LegendProvidesImage
+ //
+ this.LegendProvidesImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendProvidesImage.Image = global::CKAN.GUI.Properties.Resources.ballot;
+ this.LegendProvidesImage.Location = new System.Drawing.Point(6, 3);
+ this.LegendProvidesImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendProvidesImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendProvidesLabel
+ //
+ this.LegendProvidesLabel.AutoSize = true;
+ this.LegendProvidesLabel.Location = new System.Drawing.Point(24, 3);
+ resources.ApplyResources(this.LegendProvidesLabel, "LegendProvidesLabel");
+ //
+ // LegendDependsImage
+ //
+ this.LegendDependsImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendDependsImage.Image = global::CKAN.GUI.Properties.Resources.star;
+ this.LegendDependsImage.Location = new System.Drawing.Point(6, 21);
+ this.LegendDependsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendDependsImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendDependsLabel
+ //
+ this.LegendDependsLabel.AutoSize = true;
+ this.LegendDependsLabel.Location = new System.Drawing.Point(24, 21);
+ resources.ApplyResources(this.LegendDependsLabel, "LegendDependsLabel");
+ //
+ // LegendRecommendsImage
+ //
+ this.LegendRecommendsImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendRecommendsImage.Image = global::CKAN.GUI.Properties.Resources.thumbup;
+ this.LegendRecommendsImage.Location = new System.Drawing.Point(6, 39);
+ this.LegendRecommendsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendRecommendsImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendRecommendsLabel
+ //
+ this.LegendRecommendsLabel.AutoSize = true;
+ this.LegendRecommendsLabel.Location = new System.Drawing.Point(24, 39);
+ resources.ApplyResources(this.LegendRecommendsLabel, "LegendRecommendsLabel");
+ //
+ // LegendSuggestsImage
+ //
+ this.LegendSuggestsImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendSuggestsImage.Image = global::CKAN.GUI.Properties.Resources.info;
+ this.LegendSuggestsImage.Location = new System.Drawing.Point(6, 57);
+ this.LegendSuggestsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendSuggestsImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendSuggestsLabel
+ //
+ this.LegendSuggestsLabel.AutoSize = true;
+ this.LegendSuggestsLabel.Location = new System.Drawing.Point(24, 57);
+ resources.ApplyResources(this.LegendSuggestsLabel, "LegendSuggestsLabel");
+ //
+ // LegendSupportsImage
+ //
+ this.LegendSupportsImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendSupportsImage.Image = global::CKAN.GUI.Properties.Resources.smile;
+ this.LegendSupportsImage.Location = new System.Drawing.Point(6, 75);
+ this.LegendSupportsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendSupportsImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendSupportsLabel
+ //
+ this.LegendSupportsLabel.AutoSize = true;
+ this.LegendSupportsLabel.Location = new System.Drawing.Point(24, 75);
+ resources.ApplyResources(this.LegendSupportsLabel, "LegendSupportsLabel");
+ //
+ // LegendConflictsImage
+ //
+ this.LegendConflictsImage.BackColor = System.Drawing.SystemColors.Window;
+ this.LegendConflictsImage.Image = global::CKAN.GUI.Properties.Resources.alert;
+ this.LegendConflictsImage.Location = new System.Drawing.Point(6, 93);
+ this.LegendConflictsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.LegendConflictsImage.ClientSize = new System.Drawing.Size(14, 14);
+ //
+ // LegendConflictsLabel
+ //
+ this.LegendConflictsLabel.AutoSize = true;
+ this.LegendConflictsLabel.Location = new System.Drawing.Point(24, 93);
+ resources.ApplyResources(this.LegendConflictsLabel, "LegendConflictsLabel");
+ //
+ // ReverseRelationshipsCheckbox
+ //
+ this.ReverseRelationshipsCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.ReverseRelationshipsCheckbox.AutoSize = true;
+ this.ReverseRelationshipsCheckbox.AutoCheck = false;
+ this.ReverseRelationshipsCheckbox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.ReverseRelationshipsCheckbox.Name = "ReverseRelationshipsCheckbox";
+ this.ReverseRelationshipsCheckbox.Location = new System.Drawing.Point(3, 474);
+ this.ReverseRelationshipsCheckbox.Size = new System.Drawing.Size(494, 24);
+ this.ReverseRelationshipsCheckbox.Click += new System.EventHandler(this.ReverseRelationshipsCheckbox_Click);
+ this.ReverseRelationshipsCheckbox.CheckedChanged += new System.EventHandler(this.ReverseRelationshipsCheckbox_CheckedChanged);
+ resources.ApplyResources(this.ReverseRelationshipsCheckbox, "ReverseRelationshipsCheckbox");
+ //
+ // Relationships
+ //
+ this.Controls.Add(this.DependsGraphTree);
+ this.Controls.Add(this.LegendProvidesImage);
+ this.Controls.Add(this.LegendProvidesLabel);
+ this.Controls.Add(this.LegendDependsImage);
+ this.Controls.Add(this.LegendDependsLabel);
+ this.Controls.Add(this.LegendRecommendsImage);
+ this.Controls.Add(this.LegendRecommendsLabel);
+ this.Controls.Add(this.LegendSuggestsImage);
+ this.Controls.Add(this.LegendSuggestsLabel);
+ this.Controls.Add(this.LegendSupportsImage);
+ this.Controls.Add(this.LegendSupportsLabel);
+ this.Controls.Add(this.LegendConflictsImage);
+ this.Controls.Add(this.LegendConflictsLabel);
+ this.Controls.Add(this.ReverseRelationshipsCheckbox);
+ this.Name = "Relationships";
+ this.Size = new System.Drawing.Size(500, 500);
+ resources.ApplyResources(this, "$this");
+ this.ResumeLayout(false);
+ this.PerformLayout();
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ToolTip ToolTip;
+ private System.Windows.Forms.TreeView DependsGraphTree;
+ private System.Windows.Forms.PictureBox LegendProvidesImage;
+ private System.Windows.Forms.Label LegendProvidesLabel;
+ private System.Windows.Forms.PictureBox LegendDependsImage;
+ private System.Windows.Forms.Label LegendDependsLabel;
+ private System.Windows.Forms.PictureBox LegendRecommendsImage;
+ private System.Windows.Forms.Label LegendRecommendsLabel;
+ private System.Windows.Forms.PictureBox LegendSuggestsImage;
+ private System.Windows.Forms.Label LegendSuggestsLabel;
+ private System.Windows.Forms.PictureBox LegendSupportsImage;
+ private System.Windows.Forms.Label LegendSupportsLabel;
+ private System.Windows.Forms.PictureBox LegendConflictsImage;
+ private System.Windows.Forms.Label LegendConflictsLabel;
+ private System.Windows.Forms.CheckBox ReverseRelationshipsCheckbox;
+ }
+}
diff --git a/GUI/Controls/ModInfoTabs/Relationships.cs b/GUI/Controls/ModInfoTabs/Relationships.cs
new file mode 100644
index 0000000000..696d36dc4d
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Relationships.cs
@@ -0,0 +1,372 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Threading.Tasks;
+using System.ComponentModel.DataAnnotations;
+
+using CKAN.Versioning;
+using CKAN.Extensions;
+
+namespace CKAN.GUI
+{
+ public enum RelationshipType
+ {
+ [Display(Description = "RelationshipTypeProvides",
+ ResourceType = typeof(Properties.Resources))]
+ Provides = 0,
+
+ [Display(Description = "RelationshipTypeDepends",
+ ResourceType = typeof(Properties.Resources))]
+ Depends = 1,
+
+ [Display(Description = "RelationshipTypeRecommends",
+ ResourceType = typeof(Properties.Resources))]
+ Recommends = 2,
+
+ [Display(Description = "RelationshipTypeSuggests",
+ ResourceType = typeof(Properties.Resources))]
+ Suggests = 3,
+
+ [Display(Description = "RelationshipTypeSupports",
+ ResourceType = typeof(Properties.Resources))]
+ Supports = 4,
+
+ [Display(Description = "RelationshipTypeConflicts",
+ ResourceType = typeof(Properties.Resources))]
+ Conflicts = 5,
+ }
+
+ public partial class Relationships : UserControl
+ {
+ public Relationships()
+ {
+ InitializeComponent();
+
+ ToolTip.SetToolTip(ReverseRelationshipsCheckbox, Properties.Resources.ModInfoToolTipReverseRelationships);
+
+ DependsGraphTree.BeforeExpand += BeforeExpand;
+ }
+
+ public GUIMod SelectedModule
+ {
+ set
+ {
+ var module = value?.ToModule();
+ if (value != selectedModule)
+ {
+ if (ReverseRelationshipsCheckbox.CheckState == CheckState.Checked)
+ {
+ ReverseRelationshipsCheckbox.CheckState = CheckState.Unchecked;
+ }
+ selectedModule = value;
+ UpdateModDependencyGraph(selectedModule.ToModule());
+ }
+ }
+ get => selectedModule;
+ }
+
+ private void UpdateModDependencyGraph(CkanModule module)
+ {
+ Util.Invoke(DependsGraphTree, () => _UpdateModDependencyGraph(module));
+ }
+
+ private GUIMod selectedModule;
+ private GameInstanceManager manager => Main.Instance.manager;
+
+ private void DependsGraphTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
+ Main.Instance.ManageMods.ResetFilterAndSelectModOnList(e.Node.Name);
+ }
+
+ private bool ImMyOwnGrandpa(TreeNode node)
+ {
+ CkanModule module = node.Tag as CkanModule;
+ if (module != null)
+ {
+ for (TreeNode other = node.Parent; other != null; other = other.Parent)
+ {
+ if (module == other.Tag)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private void ReverseRelationshipsCheckbox_Click(object sender, EventArgs e)
+ {
+ ReverseRelationshipsCheckbox.CheckState =
+ ReverseRelationshipsCheckbox.CheckState == CheckState.Unchecked
+ // If user holds ctrl or shift, go to "sticky" indeterminate state,
+ // else normal checked
+ ? (Control.ModifierKeys & (Keys.Control | Keys.Shift)) != 0
+ ? CheckState.Indeterminate
+ : CheckState.Checked
+ : CheckState.Unchecked;
+ }
+
+ private void ReverseRelationshipsCheckbox_CheckedChanged(object sender, EventArgs e)
+ {
+ UpdateModDependencyGraph(SelectedModule.ToModule());
+ }
+
+ private void _UpdateModDependencyGraph(CkanModule module)
+ {
+ DependsGraphTree.BeginUpdate();
+ DependsGraphTree.BackColor = SystemColors.Window;
+ DependsGraphTree.LineColor = SystemColors.WindowText;
+ DependsGraphTree.Nodes.Clear();
+ IRegistryQuerier registry = RegistryManager.Instance(manager.CurrentInstance).registry;
+ TreeNode root = new TreeNode($"{module.name} {module.version}", 0, 0)
+ {
+ Name = module.identifier,
+ Tag = module
+ };
+ DependsGraphTree.Nodes.Add(root);
+ AddChildren(registry, root);
+ DependsGraphTree.EndUpdate();
+ root.Expand();
+ }
+
+ private void BeforeExpand(object sender, TreeViewCancelEventArgs args)
+ {
+ IRegistryQuerier registry = RegistryManager.Instance(manager.CurrentInstance).registry;
+ TreeNode node = args.Node;
+ const int modsPerUpdate = 10;
+
+ // Load in groups to reduce flickering
+ UseWaitCursor = true;
+ int lastStart = Math.Max(0, node.Nodes.Count - modsPerUpdate);
+ for (int start = 0; start <= lastStart; start += modsPerUpdate)
+ {
+ // Copy start's value to a variable that won't change as we loop
+ int threadStart = start;
+ int nodesLeft = node.Nodes.Count - start;
+ Task.Factory.StartNew(() =>
+ ExpandOnePage(
+ registry, node, threadStart,
+ // If next page is small (last), add it to this one,
+ // so the final page will be slower rather than faster
+ nodesLeft >= 2 * modsPerUpdate ? modsPerUpdate : nodesLeft));
+ }
+ }
+
+ private void ExpandOnePage(IRegistryQuerier registry, TreeNode parent, int start, int length)
+ {
+ // Should already have children, since the user is expanding it
+ var nodesAndChildren = parent.Nodes.Cast()
+ .Skip(start)
+ .Take(length)
+ // If there are grandchildren, then this child has been loaded before
+ .Where(child => child.Nodes.Count == 0
+ // If user switched to another mod, stop loading
+ && child.TreeView != null)
+ .Select(child => new KeyValuePair(
+ child,
+ GetChildren(registry, child).ToArray()))
+ .ToArray();
+ // If user switched to another mod, stop loading
+ if (parent.TreeView != null)
+ {
+ // Refresh the UI
+ Util.Invoke(this, () =>
+ {
+ if (nodesAndChildren.Length > 0)
+ {
+ DependsGraphTree.BeginUpdate();
+ foreach (var kvp in nodesAndChildren)
+ {
+ kvp.Key.Nodes.AddRange(kvp.Value);
+ }
+ DependsGraphTree.EndUpdate();
+ }
+ if (start + length >= parent.Nodes.Count)
+ {
+ // Reset the cursor when the final group finishes
+ UseWaitCursor = false;
+ }
+ });
+ }
+ }
+
+ private static readonly RelationshipType[] kindsOfRelationships = new RelationshipType[]
+ {
+ RelationshipType.Depends,
+ RelationshipType.Recommends,
+ RelationshipType.Suggests,
+ RelationshipType.Supports,
+ RelationshipType.Conflicts
+ };
+
+ private void AddChildren(IRegistryQuerier registry, TreeNode node)
+ {
+ var nodes = GetChildren(registry, node).ToArray();
+ Util.Invoke(this, () => node.Nodes.AddRange(nodes));
+ }
+
+ // Load one layer of grandchildren on demand
+ private IEnumerable GetChildren(IRegistryQuerier registry, TreeNode node)
+ {
+ var module = node.Tag as CkanModule;
+ var crit = manager.CurrentInstance.VersionCriteria();
+ // Skip children of nodes from circular dependencies
+ // Tag is null for non-indexed nodes
+ return ImMyOwnGrandpa(node) || module == null
+ ? Enumerable.Empty()
+ : ReverseRelationshipsCheckbox.CheckState == CheckState.Unchecked
+ ? ForwardRelationships(registry, node, module, crit)
+ : ReverseRelationships(registry, node, module, crit);
+ }
+
+ private IEnumerable GetModRelationships(CkanModule module, RelationshipType which)
+ {
+ switch (which)
+ {
+ case RelationshipType.Depends:
+ return module.depends
+ ?? Enumerable.Empty();
+ case RelationshipType.Recommends:
+ return module.recommends
+ ?? Enumerable.Empty();
+ case RelationshipType.Suggests:
+ return module.suggests
+ ?? Enumerable.Empty();
+ case RelationshipType.Supports:
+ return module.supports
+ ?? Enumerable.Empty();
+ case RelationshipType.Conflicts:
+ return module.conflicts
+ ?? Enumerable.Empty();
+ }
+ return Enumerable.Empty();
+ }
+
+ private IEnumerable ForwardRelationships(IRegistryQuerier registry, TreeNode node, CkanModule module, GameVersionCriteria crit)
+ => (module.provides?.Select(p => providedNode(p))
+ ?? Enumerable.Empty())
+ .Concat(kindsOfRelationships.SelectMany(relationship =>
+ GetModRelationships(module, relationship).Select(dependency =>
+ // Look for compatible mods
+ findDependencyShallow(registry, dependency, relationship, crit)
+ // Then incompatible mods
+ ?? findDependencyShallow(registry, dependency, relationship, null)
+ // Then give up and note the name without a module
+ ?? nonindexedNode(dependency, relationship))));
+
+ private TreeNode findDependencyShallow(IRegistryQuerier registry, RelationshipDescriptor relDescr, RelationshipType relationship, GameVersionCriteria crit)
+ {
+ // Check if this dependency is installed
+ if (relDescr.MatchesAny(
+ registry.InstalledModules.Select(im => im.Module),
+ new HashSet(registry.InstalledDlls),
+ // Maybe it's a DLC?
+ registry.InstalledDlc,
+ out CkanModule matched))
+ {
+ return matched != null
+ ? indexedNode(registry, matched, relationship, relDescr, crit)
+ : nonModuleNode(relDescr, null, relationship);
+ }
+
+ // Find modules that satisfy this dependency
+ List dependencyModules = relDescr.LatestAvailableWithProvides(
+ registry, crit,
+ // Ignore conflicts with installed mods
+ Enumerable.Empty());
+ if (dependencyModules.Count == 0)
+ {
+ // Nothing found, don't return a node
+ return null;
+ }
+ else if (dependencyModules.Count == 1
+ && relDescr.ContainsAny(new string[] { dependencyModules[0].identifier }))
+ {
+ // Only one exact match module, return a simple node
+ return indexedNode(registry, dependencyModules[0], relationship, relDescr, crit);
+ }
+ else
+ {
+ // Several found or not same id, return a "provides" node
+ return providesNode(relDescr.ToString(), relationship,
+ dependencyModules.Select(dep => indexedNode(registry, dep, relationship, relDescr, crit))
+ );
+ }
+ }
+
+ private IEnumerable ReverseRelationships(IRegistryQuerier registry, TreeNode node, CkanModule module, GameVersionCriteria crit)
+ {
+ var compat = registry.CompatibleModules(crit).ToArray();
+ var incompat = registry.IncompatibleModules(crit).ToArray();
+ var toFind = new CkanModule[] { module };
+ return kindsOfRelationships.SelectMany(relationship =>
+ compat.SelectMany(otherMod =>
+ GetModRelationships(otherMod, relationship)
+ .Where(r => r.MatchesAny(toFind, null, null))
+ .Select(r => indexedNode(registry, otherMod, relationship, r, crit)))
+ .Concat(incompat.SelectMany(otherMod =>
+ GetModRelationships(otherMod, relationship)
+ .Where(r => r.MatchesAny(toFind, null, null))
+ .Select(r => indexedNode(registry, otherMod, relationship, r, crit)))));
+ }
+
+ private TreeNode providesNode(string identifier, RelationshipType relationship, IEnumerable children)
+ {
+ int icon = (int)relationship + 1;
+ return new TreeNode(string.Format(Properties.Resources.ModInfoVirtual, identifier), icon, icon, children.ToArray())
+ {
+ Name = identifier,
+ ToolTipText = relationship.Localize(),
+ ForeColor = SystemColors.GrayText,
+ };
+ }
+
+ private TreeNode indexedNode(IRegistryQuerier registry, CkanModule module, RelationshipType relationship, RelationshipDescriptor relDescr, GameVersionCriteria crit)
+ {
+ int icon = (int)relationship + 1;
+ bool compatible = crit == null ? false
+ : registry.IdentifierCompatible(module.identifier, crit);
+ string suffix = compatible ? ""
+ : $" ({registry.CompatibleGameVersions(manager.CurrentInstance.game, module.identifier)})";
+ return new TreeNode($"{module.name} {module.version}{suffix}", icon, icon)
+ {
+ Name = module.identifier,
+ ToolTipText = $"{relationship.Localize()} {relDescr}",
+ Tag = module,
+ ForeColor = compatible ? SystemColors.WindowText : Color.Red,
+ };
+ }
+
+ private TreeNode nonModuleNode(RelationshipDescriptor relDescr, ModuleVersion version, RelationshipType relationship)
+ {
+ int icon = (int)relationship + 1;
+ return new TreeNode($"{relDescr} {version}", icon, icon)
+ {
+ Name = relDescr.ToString(),
+ ToolTipText = relationship.Localize()
+ };
+ }
+
+ private TreeNode nonindexedNode(RelationshipDescriptor relDescr, RelationshipType relationship)
+ {
+ // Completely nonexistent dependency, e.g. "AJE"
+ int icon = (int)relationship + 1;
+ return new TreeNode(string.Format(Properties.Resources.ModInfoNotIndexed, relDescr.ToString()), icon, icon)
+ {
+ Name = relDescr.ToString(),
+ ToolTipText = relationship.Localize(),
+ ForeColor = Color.Red
+ };
+ }
+
+ private TreeNode providedNode(string identifier)
+ => new TreeNode(identifier, 1, 1)
+ {
+ Name = identifier,
+ ToolTipText = $"{RelationshipType.Provides.Localize()} {identifier}",
+ };
+
+ }
+}
diff --git a/GUI/Controls/ModInfoTabs/Relationships.resx b/GUI/Controls/ModInfoTabs/Relationships.resx
new file mode 100644
index 0000000000..e8ff33ff83
--- /dev/null
+++ b/GUI/Controls/ModInfoTabs/Relationships.resx
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Provides
+ Depends
+ Recommends
+ Suggests
+ Supports
+ Conflicts
+ Reverse relationships
+
diff --git a/GUI/Controls/AllModVersions.Designer.cs b/GUI/Controls/ModInfoTabs/Versions.Designer.cs
similarity index 92%
rename from GUI/Controls/AllModVersions.Designer.cs
rename to GUI/Controls/ModInfoTabs/Versions.Designer.cs
index aa271f8161..0170be3028 100644
--- a/GUI/Controls/AllModVersions.Designer.cs
+++ b/GUI/Controls/ModInfoTabs/Versions.Designer.cs
@@ -1,6 +1,6 @@
namespace CKAN.GUI
{
- partial class AllModVersions
+ partial class Versions
{
///
/// Required designer variable.
@@ -29,12 +29,12 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(AllModVersions));
+ System.ComponentModel.ComponentResourceManager resources = new SingleAssemblyComponentResourceManager(typeof(Versions));
this.label1 = new System.Windows.Forms.Label();
- this.ModVersion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.CompatibleGameVersion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.ReleaseDate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.VersionsListView = new ThemedListView();
+ this.ModVersion = new System.Windows.Forms.ColumnHeader();
+ this.CompatibleGameVersion = new System.Windows.Forms.ColumnHeader();
+ this.ReleaseDate = new System.Windows.Forms.ColumnHeader();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
@@ -52,40 +52,41 @@ private void InitializeComponent()
this.label1.TabIndex = 0;
resources.ApplyResources(this.label1, "label1");
//
- // ModVersion
- //
- this.ModVersion.Width = 98;
- resources.ApplyResources(this.ModVersion, "ModVersion");
- //
- // CompatibleGameVersion
- //
- this.CompatibleGameVersion.Width = 132;
- resources.ApplyResources(this.CompatibleGameVersion, "CompatibleGameVersion");
- //
- // ReleaseDate
- //
- this.ReleaseDate.Width = 140;
- resources.ApplyResources(this.ReleaseDate, "ReleaseDate");
- //
// VersionsListView
//
this.VersionsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.VersionsListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.VersionsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ModVersion,
this.CompatibleGameVersion,
this.ReleaseDate});
this.VersionsListView.CheckBoxes = true;
this.VersionsListView.FullRowSelect = true;
- this.VersionsListView.Location = new System.Drawing.Point(3, 76);
+ this.VersionsListView.Location = new System.Drawing.Point(6, 76);
this.VersionsListView.Name = "VersionsListView";
- this.VersionsListView.Size = new System.Drawing.Size(348, 423);
+ this.VersionsListView.Size = new System.Drawing.Size(488, 416);
this.VersionsListView.TabIndex = 1;
this.VersionsListView.UseCompatibleStateImageBehavior = false;
this.VersionsListView.View = System.Windows.Forms.View.Details;
this.VersionsListView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.VersionsListView_ItemCheck);
//
+ // ModVersion
+ //
+ this.ModVersion.Width = 98;
+ resources.ApplyResources(this.ModVersion, "ModVersion");
+ //
+ // CompatibleGameVersion
+ //
+ this.CompatibleGameVersion.Width = 132;
+ resources.ApplyResources(this.CompatibleGameVersion, "CompatibleGameVersion");
+ //
+ // ReleaseDate
+ //
+ this.ReleaseDate.Width = 140;
+ resources.ApplyResources(this.ReleaseDate, "ReleaseDate");
+ //
// label2
//
this.label2.AutoSize = true;
@@ -144,7 +145,7 @@ private void InitializeComponent()
this.label7.TabIndex = 7;
resources.ApplyResources(this.label7, "label7");
//
- // AllModVersions
+ // Versions
//
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
@@ -154,8 +155,8 @@ private void InitializeComponent()
this.Controls.Add(this.label2);
this.Controls.Add(this.VersionsListView);
this.Controls.Add(this.label1);
- this.Name = "AllModVersions";
- this.Size = new System.Drawing.Size(354, 502);
+ this.Name = "Versions";
+ this.Size = new System.Drawing.Size(500, 500);
resources.ApplyResources(this, "$this");
this.ResumeLayout(false);
this.PerformLayout();
@@ -164,10 +165,10 @@ private void InitializeComponent()
#endregion
private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ListView VersionsListView;
private System.Windows.Forms.ColumnHeader ModVersion;
private System.Windows.Forms.ColumnHeader CompatibleGameVersion;
private System.Windows.Forms.ColumnHeader ReleaseDate;
- private System.Windows.Forms.ListView VersionsListView;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
diff --git a/GUI/Controls/AllModVersions.cs b/GUI/Controls/ModInfoTabs/Versions.cs
similarity index 99%
rename from GUI/Controls/AllModVersions.cs
rename to GUI/Controls/ModInfoTabs/Versions.cs
index 9d53de0b26..8a4a567678 100644
--- a/GUI/Controls/AllModVersions.cs
+++ b/GUI/Controls/ModInfoTabs/Versions.cs
@@ -10,9 +10,9 @@
namespace CKAN.GUI
{
- public partial class AllModVersions : UserControl
+ public partial class Versions : UserControl
{
- public AllModVersions()
+ public Versions()
{
InitializeComponent();
}
diff --git a/GUI/Controls/AllModVersions.resx b/GUI/Controls/ModInfoTabs/Versions.resx
similarity index 100%
rename from GUI/Controls/AllModVersions.resx
rename to GUI/Controls/ModInfoTabs/Versions.resx
diff --git a/GUI/Controls/ThemedTabControl.cs b/GUI/Controls/ThemedTabControl.cs
index 90215ec0e5..13dcd7946e 100644
--- a/GUI/Controls/ThemedTabControl.cs
+++ b/GUI/Controls/ThemedTabControl.cs
@@ -25,11 +25,31 @@ protected override void OnDrawItem(DrawItemEventArgs e)
// e.Index can be invalid (!!), so we need try/catch
try
{
+ var tabPage = TabPages[e.Index];
+ var textRect = e.Bounds;
+
+ // Image
+ var imageIndex = !string.IsNullOrEmpty(tabPage.ImageKey)
+ ? ImageList.Images.IndexOfKey(tabPage.ImageKey)
+ : tabPage.ImageIndex;
+ if (imageIndex > -1)
+ {
+ var image = ImageList.Images[imageIndex];
+ var offsetY = (e.Bounds.Height - image.Height) / 2;
+ // Tab is wider when selected, don't move image left 1px
+ var offsetX = e.State == DrawItemState.Selected ? offsetY + 3
+ : offsetY + 2;
+ // e.Graphics.DrawImage doesn't work on Mono, but this does
+ ImageList.Draw(e.Graphics, e.Bounds.Location + new Size(offsetX, offsetY), imageIndex);
+
+ // Don't overlap text on image
+ textRect.X += image.Width;
+ textRect.Width -= image.Width;
+ }
+
// Text
- var tabPage = TabPages[e.Index];
- Rectangle rect = e.Bounds;
TextRenderer.DrawText(e.Graphics, tabPage.Text, tabPage.Font,
- rect, tabPage.ForeColor);
+ textRect, tabPage.ForeColor);
}
catch (ArgumentOutOfRangeException)
{
diff --git a/GUI/Localization/de-DE/Contents.de-DE.resx b/GUI/Localization/de-DE/Contents.de-DE.resx
new file mode 100644
index 0000000000..bc4dddd366
--- /dev/null
+++ b/GUI/Localization/de-DE/Contents.de-DE.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Herunterladen
+ ZIP öffnen
+ Diese Mod ist nicht im Cache, klicke 'Herunterladen' für eine Inhaltsvorschau
+
diff --git a/GUI/Localization/de-DE/Metadata.de-DE.resx b/GUI/Localization/de-DE/Metadata.de-DE.resx
new file mode 100644
index 0000000000..844d9179a2
--- /dev/null
+++ b/GUI/Localization/de-DE/Metadata.de-DE.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Version:
+ Kennung:
+ Ersetzt durch:
+ Max. Spielversion:
+ Releasestatus:
+ Autor:
+ Lizenz:
+ N/A
+ N/A
+
diff --git a/GUI/Localization/de-DE/ModInfo.de-DE.resx b/GUI/Localization/de-DE/ModInfo.de-DE.resx
index a76458ec45..2b1f35b3bf 100644
--- a/GUI/Localization/de-DE/ModInfo.de-DE.resx
+++ b/GUI/Localization/de-DE/ModInfo.de-DE.resx
@@ -118,24 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Metadaten
- Modname
- Kennung:
- Ersetzt durch:
- Max. Spielversion:
- Releasestatus:
- Autor:
- Lizenz:
- N/A
- N/A
Beziehungen
- Abhängigkeit
- Empfehlung
- Vorschlag
- Unterstützt
- Konflikt
Inhalt
- Herunterladen
- ZIP öffnen
- Diese Mod ist nicht im Cache, klicke 'Herunterladen' für eine Inhaltsvorschau
- Versionen
+ Versionen
diff --git a/GUI/Localization/de-DE/Relationships.de-DE.resx b/GUI/Localization/de-DE/Relationships.de-DE.resx
new file mode 100644
index 0000000000..b2a611736d
--- /dev/null
+++ b/GUI/Localization/de-DE/Relationships.de-DE.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Abhängigkeit
+ Empfehlung
+ Vorschlag
+ Unterstützt
+ Konflikt
+
diff --git a/GUI/Localization/de-DE/AllModVersions.de-DE.resx b/GUI/Localization/de-DE/Versions.de-DE.resx
similarity index 100%
rename from GUI/Localization/de-DE/AllModVersions.de-DE.resx
rename to GUI/Localization/de-DE/Versions.de-DE.resx
diff --git a/GUI/Localization/en-US/ModInfo.en-US.resx b/GUI/Localization/en-US/Metadata.en-US.resx
similarity index 100%
rename from GUI/Localization/en-US/ModInfo.en-US.resx
rename to GUI/Localization/en-US/Metadata.en-US.resx
diff --git a/GUI/Localization/fr-FR/Contents.fr-FR.resx b/GUI/Localization/fr-FR/Contents.fr-FR.resx
new file mode 100644
index 0000000000..c3df669f23
--- /dev/null
+++ b/GUI/Localization/fr-FR/Contents.fr-FR.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Télécharger
+ Ouvrir le ZIP
+ Ce mod n'est pas dans le cache, cliquez "télécharger" pour visionner son contenu
+
diff --git a/GUI/Localization/fr-FR/Metadata.fr-FR.resx b/GUI/Localization/fr-FR/Metadata.fr-FR.resx
new file mode 100644
index 0000000000..9dcff40208
--- /dev/null
+++ b/GUI/Localization/fr-FR/Metadata.fr-FR.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Identifiant:
+ Remplacé par:
+ -
+ Version de jeu max:
+ Statut de la version:
+ Auteur:
+ Licence:
+ Aucune
+ Personne
+ Version:
+
diff --git a/GUI/Localization/fr-FR/ModInfo.fr-FR.resx b/GUI/Localization/fr-FR/ModInfo.fr-FR.resx
index 06950fa796..16215c05b3 100644
--- a/GUI/Localization/fr-FR/ModInfo.fr-FR.resx
+++ b/GUI/Localization/fr-FR/ModInfo.fr-FR.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Métadonnées
- Nom du mod
- Identifiant:
- -
- Remplacé par:
- -
- Version de jeu max:
- Statut de la version:
- Auteur:
- Licence:
- 0.0.0
- Aucune
- Personne
- Version:
- Stable
- 0.0.0
Relations
- Dépendances
- Recommandations
- Suggestions
- Supports
- Conflits
Contenu
- Télécharger
- Ouvrir le ZIP
- Ce mod n'est pas dans le cache, cliquez "télécharger" pour visionner son contenu
- Versions
+ Versions
diff --git a/GUI/Localization/fr-FR/Relationships.fr-FR.resx b/GUI/Localization/fr-FR/Relationships.fr-FR.resx
new file mode 100644
index 0000000000..08a87fde66
--- /dev/null
+++ b/GUI/Localization/fr-FR/Relationships.fr-FR.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Dépendances
+ Recommandations
+ Suggestions
+ Supports
+ Conflits
+
diff --git a/GUI/Localization/fr-FR/AllModVersions.fr-FR.resx b/GUI/Localization/fr-FR/Versions.fr-FR.resx
similarity index 100%
rename from GUI/Localization/fr-FR/AllModVersions.fr-FR.resx
rename to GUI/Localization/fr-FR/Versions.fr-FR.resx
diff --git a/GUI/Localization/ja-JP/Contents.ja-JP.resx b/GUI/Localization/ja-JP/Contents.ja-JP.resx
new file mode 100644
index 0000000000..f0e5e13e11
--- /dev/null
+++ b/GUI/Localization/ja-JP/Contents.ja-JP.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ダウンロード
+ ZIPファイルを開く
+ このModはキャッシュに存在しません、内容を見るにはダウンロードをクリックしてください。
+
diff --git a/GUI/Localization/ja-JP/Metadata.ja-JP.resx b/GUI/Localization/ja-JP/Metadata.ja-JP.resx
new file mode 100644
index 0000000000..d5d4cf3291
--- /dev/null
+++ b/GUI/Localization/ja-JP/Metadata.ja-JP.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 識別子:
+ Replaced by:
+ 対応バージョン:
+ リリース状況:
+ 作者:
+ ライセンス:
+ 無し
+ 無し
+ バージョン:
+ 安定
+
diff --git a/GUI/Localization/ja-JP/ModInfo.ja-JP.resx b/GUI/Localization/ja-JP/ModInfo.ja-JP.resx
index c2838dd615..50f8f23d44 100644
--- a/GUI/Localization/ja-JP/ModInfo.ja-JP.resx
+++ b/GUI/Localization/ja-JP/ModInfo.ja-JP.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
メタデータ
- Modの名前
- 識別子:
- -
- Replaced by:
- -
- 対応バージョン:
- リリース状況:
- 作者:
- ライセンス:
- 0.0.0
- 無し
- 無し
- バージョン:
- 安定
- 0.0.0
依存関係
- 依存
- 推奨
- 提案
- サポート
- 衝突
内容
- ダウンロード
- ZIPファイルを開く
- このModはキャッシュに存在しません、内容を見るにはダウンロードをクリックしてください。
- バージョン
+ バージョン
diff --git a/GUI/Localization/ja-JP/Relationships.ja-JP.resx b/GUI/Localization/ja-JP/Relationships.ja-JP.resx
new file mode 100644
index 0000000000..daaa96c07c
--- /dev/null
+++ b/GUI/Localization/ja-JP/Relationships.ja-JP.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 依存
+ 推奨
+ 提案
+ サポート
+ 衝突
+
diff --git a/GUI/Localization/ja-JP/AllModVersions.ja-JP.resx b/GUI/Localization/ja-JP/Versions.ja-JP.resx
similarity index 100%
rename from GUI/Localization/ja-JP/AllModVersions.ja-JP.resx
rename to GUI/Localization/ja-JP/Versions.ja-JP.resx
diff --git a/GUI/Localization/ko-KR/Contents.ko-KR.resx b/GUI/Localization/ko-KR/Contents.ko-KR.resx
new file mode 100644
index 0000000000..5da1d7ed25
--- /dev/null
+++ b/GUI/Localization/ko-KR/Contents.ko-KR.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 용량
+ ZIP 열기
+ 이 모드는 캐시에 있지 않아요. 파일 내용을 보려면 '설치'를 누르세요.
+
diff --git a/GUI/Localization/ko-KR/Metadata.ko-KR.resx b/GUI/Localization/ko-KR/Metadata.ko-KR.resx
new file mode 100644
index 0000000000..069dbaa3fd
--- /dev/null
+++ b/GUI/Localization/ko-KR/Metadata.ko-KR.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 식별자:
+ 대체된 모드:
+ 최대 지원 버전:
+ 출시 상태:
+ 제작자:
+ 라이선스:
+ 없음
+ 미상
+ 버전:
+ 안정함
+
diff --git a/GUI/Localization/ko-KR/ModInfo.ko-KR.resx b/GUI/Localization/ko-KR/ModInfo.ko-KR.resx
index 07d07c9768..fa14793ac2 100644
--- a/GUI/Localization/ko-KR/ModInfo.ko-KR.resx
+++ b/GUI/Localization/ko-KR/ModInfo.ko-KR.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
메타데이터
- 모드 이름
- 식별자:
- -
- 대체된 모드:
- -
- 최대 지원 버전:
- 출시 상태:
- 제작자:
- 라이선스:
- 0.0.0
- 없음
- 미상
- 버전:
- 안정함
- 0.0.0
모드 관계
- 필수
- 추천
- 제안
- 지원함
- 충돌함
파일 내용
- 용량
- ZIP 열기
- 이 모드는 캐시에 있지 않아요. 파일 내용을 보려면 '설치'를 누르세요.
- 버전
+ 버전
diff --git a/GUI/Localization/ko-KR/Relationships.ko-KR.resx b/GUI/Localization/ko-KR/Relationships.ko-KR.resx
new file mode 100644
index 0000000000..b6b49e758c
--- /dev/null
+++ b/GUI/Localization/ko-KR/Relationships.ko-KR.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 필수
+ 추천
+ 제안
+ 지원함
+ 충돌함
+
diff --git a/GUI/Localization/ko-KR/AllModVersions.ko-KR.resx b/GUI/Localization/ko-KR/Versions.ko-KR.resx
similarity index 100%
rename from GUI/Localization/ko-KR/AllModVersions.ko-KR.resx
rename to GUI/Localization/ko-KR/Versions.ko-KR.resx
diff --git a/GUI/Localization/pl-PL/Contents.pl-PL.resx b/GUI/Localization/pl-PL/Contents.pl-PL.resx
new file mode 100644
index 0000000000..3194f564fe
--- /dev/null
+++ b/GUI/Localization/pl-PL/Contents.pl-PL.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Rozmiar
+
+
+ Otwórz plik ZIP
+
+
+ Ten mod nie jest pobrany na dysku, kliknij "Pobierz" aby zobaczyć zawartość
+
+
diff --git a/GUI/Localization/pl-PL/Metadata.pl-PL.resx b/GUI/Localization/pl-PL/Metadata.pl-PL.resx
new file mode 100644
index 0000000000..5b7b3840b4
--- /dev/null
+++ b/GUI/Localization/pl-PL/Metadata.pl-PL.resx
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Identyfikator:
+
+
+ Zastąpione przez:
+
+
+ Maks. wersja gry.:
+
+
+ Status wydania:
+
+
+ Autor:
+
+
+ Licencja:
+
+
+ Brak
+
+
+ Nikt
+
+
+ Wersja:
+
+
diff --git a/GUI/Localization/pl-PL/ModInfo.pl-PL.resx b/GUI/Localization/pl-PL/ModInfo.pl-PL.resx
index f26df442e5..db9362347a 100644
--- a/GUI/Localization/pl-PL/ModInfo.pl-PL.resx
+++ b/GUI/Localization/pl-PL/ModInfo.pl-PL.resx
@@ -120,85 +120,13 @@
Metadane
-
- Nazwa moda
-
-
- Identyfikator:
-
-
- -
-
-
- Zastąpione przez:
-
-
- -
-
-
- Maks. wersja gry.:
-
-
- Status wydania:
-
-
- Autor:
-
-
- Licencja:
-
-
- 0.0.0
-
-
- Brak
-
-
- Nikt
-
-
- Wersja:
-
-
- Stabilny
-
-
- 0.0.0
-
Powiązania
-
- Zależne
-
-
- Zalecenia
-
-
- Sugerowane
-
-
- Wspiera
-
-
- Konflikty
-
-
- Odwróć powiązania
-
Zawartość
-
- Rozmiar
-
-
- Otwórz plik ZIP
-
-
- Ten mod nie jest pobrany na dysku, kliknij "Pobierz" aby zobaczyć zawartość
-
-
+
Wersje
diff --git a/GUI/Localization/pl-PL/Relationships.pl-PL.resx b/GUI/Localization/pl-PL/Relationships.pl-PL.resx
new file mode 100644
index 0000000000..a1b6fc0da0
--- /dev/null
+++ b/GUI/Localization/pl-PL/Relationships.pl-PL.resx
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Zależne
+
+
+ Zalecenia
+
+
+ Sugerowane
+
+
+ Wspiera
+
+
+ Konflikty
+
+
+ Odwróć powiązania
+
+
diff --git a/GUI/Localization/pl-PL/AllModVersions.pl-PL.resx b/GUI/Localization/pl-PL/Versions.pl-PL.resx
similarity index 100%
rename from GUI/Localization/pl-PL/AllModVersions.pl-PL.resx
rename to GUI/Localization/pl-PL/Versions.pl-PL.resx
diff --git a/GUI/Localization/pt-BR/Contents.pt-BR.resx b/GUI/Localization/pt-BR/Contents.pt-BR.resx
new file mode 100644
index 0000000000..781c16a528
--- /dev/null
+++ b/GUI/Localization/pt-BR/Contents.pt-BR.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Download
+ Abrir ZIP
+ Este mod não está no cache, clique em 'Download' para visualizar o conteúdo
+
diff --git a/GUI/Localization/pt-BR/Metadata.pt-BR.resx b/GUI/Localization/pt-BR/Metadata.pt-BR.resx
new file mode 100644
index 0000000000..f065623afe
--- /dev/null
+++ b/GUI/Localization/pt-BR/Metadata.pt-BR.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Identificador:
+ Substituido por:
+ Versão máxima do jogo:
+ Status da Release:
+ Autor:
+ Licença:
+ Nenhum
+ Ninguém
+ Versão:
+ Estável
+
diff --git a/GUI/Localization/pt-BR/ModInfo.pt-BR.resx b/GUI/Localization/pt-BR/ModInfo.pt-BR.resx
index f7c1cde4e2..8a660ea0f9 100644
--- a/GUI/Localization/pt-BR/ModInfo.pt-BR.resx
+++ b/GUI/Localization/pt-BR/ModInfo.pt-BR.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Metadata
- Nome do mod
- Identificador:
- -
- Substituido por:
- -
- Versão máxima do jogo:
- Status da Release:
- Autor:
- Licença:
- 0.0.0
- Nenhum
- Ninguém
- Versão:
- Estável
- 0.0.0
Relacionamento
- Dependências
- Recomendações
- Sugestões
- Suporta
- Conflita
Conteúdo
- Download
- Abrir ZIP
- Este mod não está no cache, clique em 'Download' para visualizar o conteúdo
Versões
diff --git a/GUI/Localization/pt-BR/Relationships.pt-BR.resx b/GUI/Localization/pt-BR/Relationships.pt-BR.resx
new file mode 100644
index 0000000000..d68a3b5afa
--- /dev/null
+++ b/GUI/Localization/pt-BR/Relationships.pt-BR.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Dependências
+ Recomendações
+ Sugestões
+ Suporta
+ Conflita
+
diff --git a/GUI/Localization/pt-BR/AllModVersions.pt-BR.resx b/GUI/Localization/pt-BR/Versions.pt-BR.resx
similarity index 100%
rename from GUI/Localization/pt-BR/AllModVersions.pt-BR.resx
rename to GUI/Localization/pt-BR/Versions.pt-BR.resx
diff --git a/GUI/Localization/ru-RU/Contents.ru-RU.resx b/GUI/Localization/ru-RU/Contents.ru-RU.resx
new file mode 100644
index 0000000000..061a3087f8
--- /dev/null
+++ b/GUI/Localization/ru-RU/Contents.ru-RU.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Загрузить
+ Открыть ZIP
+ Модификация не загружена в кэш. Нажмите «Загрузить» для просмотра содержимого
+
diff --git a/GUI/Localization/ru-RU/Metadata.ru-RU.resx b/GUI/Localization/ru-RU/Metadata.ru-RU.resx
new file mode 100644
index 0000000000..7361122ebb
--- /dev/null
+++ b/GUI/Localization/ru-RU/Metadata.ru-RU.resx
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Идентиф.:
+ Заменено:
+ Версия игры:
+ Статус:
+ Автор:
+ Лицензия:
+ Нет
+ Никто
+ Версия:
+ стабильно
+
diff --git a/GUI/Localization/ru-RU/ModInfo.ru-RU.resx b/GUI/Localization/ru-RU/ModInfo.ru-RU.resx
index fa03bdf490..e0c3643da0 100644
--- a/GUI/Localization/ru-RU/ModInfo.ru-RU.resx
+++ b/GUI/Localization/ru-RU/ModInfo.ru-RU.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Метаданные
- Название
- Идентиф.:
- —
- Заменено:
- —
- Версия игры:
- Статус:
- Автор:
- Лицензия:
- 0.0.0
- Нет
- Никто
- Версия:
- стабильно
- 0.0.0
Зависимости
- Зависит от
- Рекомендует
- Предлагает
- Поддерживает
- Конфликтует с
Содержимое
- Загрузить
- Открыть ZIP
- Модификация не загружена в кэш. Нажмите «Загрузить» для просмотра содержимого
- Версии
+ Версии
diff --git a/GUI/Localization/ru-RU/Relationships.ru-RU.resx b/GUI/Localization/ru-RU/Relationships.ru-RU.resx
new file mode 100644
index 0000000000..1741065772
--- /dev/null
+++ b/GUI/Localization/ru-RU/Relationships.ru-RU.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Зависит от
+ Рекомендует
+ Предлагает
+ Поддерживает
+ Конфликтует с
+
diff --git a/GUI/Localization/ru-RU/AllModVersions.ru-RU.resx b/GUI/Localization/ru-RU/Versions.ru-RU.resx
similarity index 100%
rename from GUI/Localization/ru-RU/AllModVersions.ru-RU.resx
rename to GUI/Localization/ru-RU/Versions.ru-RU.resx
diff --git a/GUI/Localization/zh-CN/Contents.zh-CN.resx b/GUI/Localization/zh-CN/Contents.zh-CN.resx
new file mode 100644
index 0000000000..cc8a8778a9
--- /dev/null
+++ b/GUI/Localization/zh-CN/Contents.zh-CN.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 下载
+ 打开Zip文件
+ 这个Mod并不在缓存中,点击‘下载’来预览其内容
+
diff --git a/GUI/Localization/zh-CN/Metadata.zh-CN.resx b/GUI/Localization/zh-CN/Metadata.zh-CN.resx
new file mode 100644
index 0000000000..9d42b79dfa
--- /dev/null
+++ b/GUI/Localization/zh-CN/Metadata.zh-CN.resx
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 标识符:
+ 替换为:
+ 最高游戏版本:
+ 发布状态:
+ 源代码:
+ 主页:
+ 作者:
+ 协议:
+ 无协议
+ 无作者
+ 版本:
+ 稳定
+
diff --git a/GUI/Localization/zh-CN/ModInfo.zh-CN.resx b/GUI/Localization/zh-CN/ModInfo.zh-CN.resx
index 047e5be419..a500cd960a 100644
--- a/GUI/Localization/zh-CN/ModInfo.zh-CN.resx
+++ b/GUI/Localization/zh-CN/ModInfo.zh-CN.resx
@@ -118,30 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
元数据
- Mod名称
- 标识符:
- -
- 替换为:
- -
- 最高游戏版本:
- 发布状态:
- 源代码:
- 主页:
- 作者:
- 协议:
- 无协议
- 无作者
- 版本:
- 稳定
关系
- 依赖
- 推荐
- 建议
- 支持
- 冲突
内容
- 下载
- 打开Zip文件
- 这个Mod并不在缓存中,点击‘下载’来预览其内容
- 版本
+ 版本
diff --git a/GUI/Localization/zh-CN/Relationships.zh-CN.resx b/GUI/Localization/zh-CN/Relationships.zh-CN.resx
new file mode 100644
index 0000000000..ba65d8c615
--- /dev/null
+++ b/GUI/Localization/zh-CN/Relationships.zh-CN.resx
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 依赖
+ 推荐
+ 建议
+ 支持
+ 冲突
+
diff --git a/GUI/Localization/zh-CN/AllModVersions.zh-CN.resx b/GUI/Localization/zh-CN/Versions.zh-CN.resx
similarity index 100%
rename from GUI/Localization/zh-CN/AllModVersions.zh-CN.resx
rename to GUI/Localization/zh-CN/Versions.zh-CN.resx
diff --git a/GUI/Main/Main.cs b/GUI/Main/Main.cs
index afa5157f3a..3d11738b93 100644
--- a/GUI/Main/Main.cs
+++ b/GUI/Main/Main.cs
@@ -316,7 +316,6 @@ protected override void OnShown(EventArgs e)
// SplitContainer is mis-designed to throw exceptions
// if the min/max limits are exceeded rather than simply obeying them.
}
- ModInfo.ModMetaSplitPosition = configuration.ModInfoPosition;
base.OnShown(e);
}
@@ -465,9 +464,6 @@ protected override void OnFormClosing(FormClosingEventArgs e)
// Copy panel position to app settings
configuration.PanelPosition = splitContainer1.SplitterDistance;
- // Copy metadata panel split height to app settings
- configuration.ModInfoPosition = ModInfo.ModMetaSplitPosition;
-
// Save settings
configuration.Save();
diff --git a/GUI/Model/GUIConfiguration.cs b/GUI/Model/GUIConfiguration.cs
index 0488436d00..ebf15cf29a 100644
--- a/GUI/Model/GUIConfiguration.cs
+++ b/GUI/Model/GUIConfiguration.cs
@@ -95,12 +95,6 @@ public Point WindowLoc
///
public int PanelPosition = 650;
- ///
- /// Stores distance from top of the split in the first metadata panel between the Name/description, and the mod details
- /// value is the default position used where there is no GUIConfig.xml file
- ///
- public int ModInfoPosition = 235;
-
public void Save()
{
SaveConfiguration(this);
diff --git a/GUI/Properties/Resources.Designer.cs b/GUI/Properties/Resources.Designer.cs
index 816ee24d89..8d6b0f42d1 100644
--- a/GUI/Properties/Resources.Designer.cs
+++ b/GUI/Properties/Resources.Designer.cs
@@ -22,14 +22,14 @@ namespace CKAN.GUI.Properties {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
+ public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() { }
+ public Resources() { }
///
/// Returns the cached ResourceManager instance used by this class.
@@ -184,6 +184,26 @@ internal static System.Drawing.Bitmap ksp {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap stop {
+ get {
+ object obj = ResourceManager.GetObject("stop", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ballot {
+ get {
+ object obj = ResourceManager.GetObject("ballot", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -1092,5 +1112,24 @@ internal static string RepoDownloadsFailedColHdr {
internal static string RepoDownloadsFailedAbortBtn {
get { return (string)(ResourceManager.GetObject("RepoDownloadsFailedAbortBtn", resourceCulture)); }
}
+
+ public static string RelationshipTypeProvides {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeProvides", resourceCulture)); }
+ }
+ public static string RelationshipTypeDepends {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeDepends", resourceCulture)); }
+ }
+ public static string RelationshipTypeRecommends {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeRecommends", resourceCulture)); }
+ }
+ public static string RelationshipTypeSuggests {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeSuggests", resourceCulture)); }
+ }
+ public static string RelationshipTypeSupports {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeSupports", resourceCulture)); }
+ }
+ public static string RelationshipTypeConflicts {
+ get { return (string)(ResourceManager.GetObject("RelationshipTypeConflicts", resourceCulture)); }
+ }
}
}
diff --git a/GUI/Properties/Resources.de-DE.resx b/GUI/Properties/Resources.de-DE.resx
index d33416298e..b7b205ecf8 100644
--- a/GUI/Properties/Resources.de-DE.resx
+++ b/GUI/Properties/Resources.de-DE.resx
@@ -389,4 +389,9 @@ Wenn du auf Nein klickst, siehst du diese Nachricht nicht mehr.
Füge eine weitere Suche hinzu
Abwählen um alle Mods zu deinstallieren, anwählen um die Änderungsliste zu leeren
Gesamtspielzeit: {0} Stunden
+ Abhängigkeit
+ Empfehlung
+ Vorschlag
+ Unterstützt
+ Konflikt
diff --git a/GUI/Properties/Resources.fr-FR.resx b/GUI/Properties/Resources.fr-FR.resx
index 482dc72acf..f49897f00f 100644
--- a/GUI/Properties/Resources.fr-FR.resx
+++ b/GUI/Properties/Resources.fr-FR.resx
@@ -406,4 +406,9 @@ Voulez-vous autoriser à faire cela? Si vous cliquer non, vous ne verrez plus ce
Retrait
Mise à jour
Remplacement
+ Dépendance
+ Recommandé
+ Suggéré
+ Supports
+ Conflits
diff --git a/GUI/Properties/Resources.ja-JP.resx b/GUI/Properties/Resources.ja-JP.resx
index eef926d8f0..81a8fff4be 100644
--- a/GUI/Properties/Resources.ja-JP.resx
+++ b/GUI/Properties/Resources.ja-JP.resx
@@ -403,4 +403,9 @@ CKANにこの動作をする許可を与えますか? いいえをクリック
詳細検索フィールドを広げるまたは閉じる(Ctrl-Shift-F)
新規検索を現在の検索結果に結合
全てのModをアンインストールするにはチェック解除、変更セットを消去するにはチェックする。
+ 依存
+ 推奨
+ 提案
+ サポート
+ 衝突
diff --git a/GUI/Properties/Resources.ko-KR.resx b/GUI/Properties/Resources.ko-KR.resx
index 67b6322c86..c539e38103 100644
--- a/GUI/Properties/Resources.ko-KR.resx
+++ b/GUI/Properties/Resources.ko-KR.resx
@@ -427,4 +427,9 @@ CKAN에게 이것을 허용할 건가요? 아니요를 누르면 이 메세지
새로운 검색을 지금 검색에 더하기
모든 모드를 지우려면 체크를 풀고, 다시 되돌리려면 체크하기
총 플레이 타임: {0} 시간
+ 필수
+ 추천
+ 제안
+ 지원함
+ 충돌함
diff --git a/GUI/Properties/Resources.pl-PL.resx b/GUI/Properties/Resources.pl-PL.resx
index 3f98de98d5..8e28edc078 100644
--- a/GUI/Properties/Resources.pl-PL.resx
+++ b/GUI/Properties/Resources.pl-PL.resx
@@ -1012,4 +1012,9 @@ Czy chcesz zezwolić na to CKAN-owi? Jeśli klikniesz nie, nie zobaczysz tej wia
Przerwij całą aktualizację
+ Zależne
+ Zalecenia
+ Sugerowane
+ Wspiera
+ Konflikty
diff --git a/GUI/Properties/Resources.pt-BR.resx b/GUI/Properties/Resources.pt-BR.resx
index 3db47b8d1d..efa8c143be 100644
--- a/GUI/Properties/Resources.pt-BR.resx
+++ b/GUI/Properties/Resources.pt-BR.resx
@@ -382,4 +382,9 @@ Você deseja permitir que o CKAN faça isso? Se você clicar em Não, você não
sug:
conf:
Expanda ou retraia os campos de busca detalhados (Ctrl-Shift-F)
+ Depende
+ Recomenda
+ Sugere
+ Suporta
+ Conflita
diff --git a/GUI/Properties/Resources.resx b/GUI/Properties/Resources.resx
index b401ab0cc7..86d1a1653e 100644
--- a/GUI/Properties/Resources.resx
+++ b/GUI/Properties/Resources.resx
@@ -122,6 +122,8 @@
..\..\assets\ckan.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\apply.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\ksp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+ ..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+ ..\Resources\ballot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -444,4 +446,10 @@ Do you want to allow CKAN to do this? If you click no you won't see this message
The following repositories failed to download. You can retry or abort, and if you retry, you can choose to remove some repositories. Note that any repositories you skip will be PERMANENTLY removed from your configuration!
Repository
Abort whole update
+ Provides
+ Depends
+ Recommends
+ Suggests
+ Supports
+ Conflicts
diff --git a/GUI/Properties/Resources.ru-RU.resx b/GUI/Properties/Resources.ru-RU.resx
index 4e0fcd640a..1d559ffb5f 100644
--- a/GUI/Properties/Resources.ru-RU.resx
+++ b/GUI/Properties/Resources.ru-RU.resx
@@ -405,4 +405,9 @@ https://github.com/KSP-CKAN/NetKAN/issues/new/choose
Раскрыть/закрыть поля расширенного поиска (Ctrl+Shift+F)
Сложить результаты текущего и нового поисков
Снимите выделение для удаления всех модификаций, выберите для очищения списка изменений
+ Обязательно
+ Рекомендовать
+ Предлагать
+ Поддерживает
+ Конфликтует с
diff --git a/GUI/Properties/Resources.zh-CN.resx b/GUI/Properties/Resources.zh-CN.resx
index a9b66e36ac..e1c8e7d197 100644
--- a/GUI/Properties/Resources.zh-CN.resx
+++ b/GUI/Properties/Resources.zh-CN.resx
@@ -363,4 +363,9 @@ CKAN Version(CKAN版本) : {3}
推荐:
冲突:
展开或折叠详细的搜索字段 (Ctrl-Shift-F)
+ 依赖
+ 推荐
+ 建议
+ 支持
+ 冲突
diff --git a/GUI/Resources/ballot.png b/GUI/Resources/ballot.png
new file mode 100644
index 0000000000..67966a21b2
Binary files /dev/null and b/GUI/Resources/ballot.png differ
diff --git a/GUI/Resources/stop.png b/GUI/Resources/stop.png
new file mode 100644
index 0000000000..92657b9c6f
Binary files /dev/null and b/GUI/Resources/stop.png differ
diff --git a/Tests/GUI/ResourcesTests.cs b/Tests/GUI/ResourcesTests.cs
index 642def7907..6c554f291a 100644
--- a/Tests/GUI/ResourcesTests.cs
+++ b/Tests/GUI/ResourcesTests.cs
@@ -38,14 +38,16 @@ public void PropertiesResources_LanguageResource_NotSet()
///
[Test,
// Controls
- TestCase(typeof(CKAN.GUI.AllModVersions)),
+ TestCase(typeof(CKAN.GUI.Metadata)),
+ TestCase(typeof(CKAN.GUI.Relationships)),
+ TestCase(typeof(CKAN.GUI.Contents)),
+ TestCase(typeof(CKAN.GUI.Versions)),
TestCase(typeof(CKAN.GUI.Changeset)),
TestCase(typeof(CKAN.GUI.ChooseProvidedMods)),
TestCase(typeof(CKAN.GUI.ChooseRecommendedMods)),
TestCase(typeof(CKAN.GUI.DeleteDirectories)),
TestCase(typeof(CKAN.GUI.EditModpack)),
TestCase(typeof(CKAN.GUI.EditModSearch)),
- TestCase(typeof(CKAN.GUI.HintTextBox)),
TestCase(typeof(CKAN.GUI.ManageMods)),
TestCase(typeof(CKAN.GUI.ModInfo)),
TestCase(typeof(CKAN.GUI.Wait)),
diff --git a/crowdin.yml b/crowdin.yml
index 546ec969ac..7896d1e107 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -3,7 +3,6 @@ files:
ignore:
- Properties/
- Localization/
- - HintTextBox.resx
translation: /GUI/Localization/%locale%/%file_name%.%locale%.%file_extension%
- source: /**/Resources.resx
translation: /**/%file_name%.%locale%.%file_extension%