diff --git a/src/KKManager.Core/Data/Zipmods/Manifest.cs b/src/KKManager.Core/Data/Zipmods/Manifest.cs index b1c719da..e83fd630 100644 --- a/src/KKManager.Core/Data/Zipmods/Manifest.cs +++ b/src/KKManager.Core/Data/Zipmods/Manifest.cs @@ -1,6 +1,7 @@ using Sideloader.AutoResolver; using System; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Linq; using System.Xml; @@ -19,6 +20,8 @@ namespace Sideloader /// /// Contains data about the loaded manifest.xml /// + [ReadOnly(true)] + [TypeConverter(typeof(ExpandableObjectConverter))] public class Manifest { /// @@ -86,6 +89,7 @@ public string Description /// Parsed contents of the manifest.xml. /// public XDocument ManifestDocument => manifestDocument; + [Browsable(false)] public XElement ManifestDocumentRoot => ManifestDocument.Root; // /// // /// Raw contents of the manifest.xml. @@ -102,6 +106,7 @@ public string Description /// /// Games the mod is made for. If specified, the mod will only load for those games. If not specified will load on any game. /// + [TypeConverter(typeof(ListTypeConverter))] public List Games { get => ManifestDocumentRoot.Elements().Where(x => x.Name.ToString().Equals("game", StringComparison.OrdinalIgnoreCase)).Select(x => x.Value.Trim()).Where(x => x.Length > 0).ToList(); @@ -115,10 +120,13 @@ public List Games /// /// List of all migration info for this mod /// + [TypeConverter(typeof(ListTypeConverter))] public List MigrationList { get; } #if AI || HS2 + [TypeConverter(typeof(ListTypeConverter))] [Key(10)] public List HeadPresetList { get; } + [TypeConverter(typeof(ListTypeConverter))] [Key(11)] public List FaceSkinList { get; } #endif diff --git a/src/KKManager.Core/Data/Zipmods/MigrationInfo.cs b/src/KKManager.Core/Data/Zipmods/MigrationInfo.cs index 87ce7de2..ca96ff21 100644 --- a/src/KKManager.Core/Data/Zipmods/MigrationInfo.cs +++ b/src/KKManager.Core/Data/Zipmods/MigrationInfo.cs @@ -1,4 +1,5 @@ -using MessagePack; +using System.ComponentModel; +using MessagePack; namespace Sideloader.AutoResolver { @@ -6,6 +7,7 @@ namespace Sideloader.AutoResolver /// Data about the migration to be performed /// [MessagePackObject] + [ReadOnly(true)] public class MigrationInfo { /// @@ -56,5 +58,27 @@ public MigrationInfo(MigrationType migrationType, string guidOld, string guidNew GUIDOld = guidOld; GUIDNew = guidNew; } + + public override string ToString() + { + var sb = new System.Text.StringBuilder(); + sb.AppendFormat("migrationType=\"{0}\"", MigrationType); + + if (!string.IsNullOrEmpty(Category)) + sb.AppendFormat(" category=\"{0}\"", Category); + + if (!string.IsNullOrEmpty(GUIDOld)) + sb.AppendFormat(" guidOld=\"{0}\"", GUIDOld); + + if (!string.IsNullOrEmpty(GUIDNew)) + sb.AppendFormat(" guidNew=\"{0}\"", GUIDNew); + + if (IDOld != 0 || IDNew != 0) + { + sb.AppendFormat(" idOld=\"{0}\"", IDOld); + sb.AppendFormat(" idNew=\"{0}\"", IDNew); + } + return sb.ToString(); + } } } diff --git a/src/KKManager.Core/Data/Zipmods/SideloaderModInfo.cs b/src/KKManager.Core/Data/Zipmods/SideloaderModInfo.cs index 5bf79c49..97c8a8d2 100644 --- a/src/KKManager.Core/Data/Zipmods/SideloaderModInfo.cs +++ b/src/KKManager.Core/Data/Zipmods/SideloaderModInfo.cs @@ -38,7 +38,6 @@ public SideloaderModInfo(FileInfo location, Manifest manifest, List> } } - [Browsable(false)] public Manifest Manifest { get; } [Browsable(false)] diff --git a/src/KKManager/Windows/Content/SideloaderModsWindow.Designer.cs b/src/KKManager/Windows/Content/SideloaderModsWindow.Designer.cs index a7446034..2dd3ce5d 100644 --- a/src/KKManager/Windows/Content/SideloaderModsWindow.Designer.cs +++ b/src/KKManager/Windows/Content/SideloaderModsWindow.Designer.cs @@ -41,6 +41,7 @@ private void InitializeComponent() this.olvColumnFilename = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.olvColumnPath = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.olvColumnWebsite = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.olvColumnContentType = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -68,6 +69,7 @@ private void InitializeComponent() this.objectListView1.AllColumns.Add(this.olvColumnFilename); this.objectListView1.AllColumns.Add(this.olvColumnPath); this.objectListView1.AllColumns.Add(this.olvColumnWebsite); + this.objectListView1.AllColumns.Add(this.olvColumnContentType); this.objectListView1.AllowColumnReorder = true; this.objectListView1.CellEditUseWholeCell = false; this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -77,7 +79,8 @@ private void InitializeComponent() this.olvColumnAuthor, this.olvColumnGuid, this.olvColumnFilename, - this.olvColumnWebsite}); + this.olvColumnWebsite, + this.olvColumnContentType}); this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default; resources.ApplyResources(this.objectListView1, "objectListView1"); this.objectListView1.FullRowSelect = true; @@ -136,8 +139,8 @@ private void InitializeComponent() // olvColumnFilename // this.olvColumnFilename.AspectName = "FileName"; - this.olvColumnFilename.MinimumWidth = 50; resources.ApplyResources(this.olvColumnFilename, "olvColumnFilename"); + this.olvColumnFilename.MinimumWidth = 50; // // olvColumnPath // @@ -148,9 +151,14 @@ private void InitializeComponent() // olvColumnWebsite // this.olvColumnWebsite.AspectName = "Website"; + resources.ApplyResources(this.olvColumnWebsite, "olvColumnWebsite"); this.olvColumnWebsite.Hyperlink = true; this.olvColumnWebsite.MinimumWidth = 100; - resources.ApplyResources(this.olvColumnWebsite, "olvColumnWebsite"); + // + // olvColumnContentType + // + this.olvColumnContentType.AspectName = "ContentsKind"; + resources.ApplyResources(this.olvColumnContentType, "olvColumnContentType"); // // toolStrip1 // @@ -279,5 +287,6 @@ private void InitializeComponent() private ToolStripButton toolStripButtonSameGuid; private BrightIdeasSoftware.OLVColumn olvColumnPath; private BrightIdeasSoftware.OLVColumn olvColumnGames; + private BrightIdeasSoftware.OLVColumn olvColumnContentType; } } diff --git a/src/KKManager/Windows/Content/SideloaderModsWindow.resx b/src/KKManager/Windows/Content/SideloaderModsWindow.resx index ca5ccc40..2f7aa0b2 100644 --- a/src/KKManager/Windows/Content/SideloaderModsWindow.resx +++ b/src/KKManager/Windows/Content/SideloaderModsWindow.resx @@ -158,6 +158,9 @@ 90 + + 6 + File name @@ -170,12 +173,24 @@ 200 + + 7 + Website 123 + + 5 + + + Contents Kind + + + 104 + Fill @@ -204,6 +219,30 @@ 17, 17 + + 0, 0 + + + 891, 25 + + + 2 + + + toolStrip1 + + + toolStrip1 + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -336,30 +375,6 @@ 100, 25 - - 0, 0 - - - 891, 25 - - - 2 - - - toolStrip1 - - - toolStrip1 - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - True @@ -426,6 +441,12 @@ BrightIdeasSoftware.OLVColumn, ObjectListView, Version=2.9.1.1072, Culture=neutral, PublicKeyToken=b1c5bf581481bcd4 + + olvColumnContentType + + + BrightIdeasSoftware.OLVColumn, ObjectListView, Version=2.9.1.1072, Culture=neutral, PublicKeyToken=b1c5bf581481bcd4 + toolStripButton1 diff --git a/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.Designer.cs b/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.Designer.cs index 2774f485..ea90ec67 100644 --- a/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.Designer.cs +++ b/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.Designer.cs @@ -40,11 +40,21 @@ private void InitializeComponent() this.groupBox3 = new System.Windows.Forms.GroupBox(); this.listView1 = new System.Windows.Forms.ListView(); this.columnHeaderPath = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.groupBox1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); this.SuspendLayout(); // // groupBox2 @@ -125,13 +135,38 @@ private void InitializeComponent() this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; // + // splitContainer1 + // + resources.ApplyResources(this.splitContainer1, "splitContainer1"); + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.groupBox2); + // + // splitContainer2 + // + resources.ApplyResources(this.splitContainer2, "splitContainer2"); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.groupBox1); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.groupBox3); + // // SideloaderViewerBase // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox3); - this.Controls.Add(this.groupBox1); + this.Controls.Add(this.splitContainer1); this.Controls.Add(this.toolStrip1); this.Name = "SideloaderViewerBase"; this.groupBox2.ResumeLayout(false); @@ -141,6 +176,14 @@ private void InitializeComponent() this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.groupBox3.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -159,5 +202,7 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ColumnHeader columnHeaderPath; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; } } diff --git a/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.resx b/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.resx index e51539b3..7c179b0c 100644 --- a/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.resx +++ b/src/KKManager/Windows/ToolWindows/Properties/Viewers/SideloaderViewer.resx @@ -126,7 +126,7 @@ 26, 16 - 325, 412 + 325, 256 Zoom @@ -160,7 +160,7 @@ 3, 16 - 23, 412 + 23, 256 3 @@ -193,7 +193,7 @@ 351, 16 - 23, 412 + 23, 256 2 @@ -217,10 +217,10 @@ Fill - 0, 310 + 0, 0 - 377, 431 + 377, 275 5 @@ -235,13 +235,13 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + splitContainer1.Panel2 0 - Top + Fill False @@ -250,7 +250,7 @@ 3, 16 - 371, 161 + 371, 199 1 @@ -268,13 +268,13 @@ 0 - Top + Fill - 0, 25 + 0, 0 - 377, 160 + 377, 218 4 @@ -289,11 +289,14 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + splitContainer2.Panel1 - 2 + 0 + + 17, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -340,7 +343,7 @@ $this - 3 + 1 Fill @@ -349,7 +352,7 @@ 3, 16 - 371, 106 + 371, 196 0 @@ -367,13 +370,13 @@ 0 - Top + Fill - 0, 185 + 0, 0 - 377, 125 + 377, 215 7 @@ -388,11 +391,122 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + splitContainer2.Panel2 + 0 + + + Fill + + + 0, 25 + + + Horizontal + + + Fill + + + 0, 0 + + + Horizontal + + + splitContainer2.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer2 + + + 0 + + + splitContainer2.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer2 + + 1 + + 377, 437 + + + 218 + + + 9 + + + splitContainer2 + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + + + splitContainer1.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 0 + + + splitContainer1.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 1 + + + 377, 716 + + + 437 + + + 8 + + + splitContainer1 + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + 6, 13 @@ -415,12 +529,6 @@ SideloaderViewerBase - KKManager.Windows.ToolWindows.Properties.PropertyViewerBase, KKManager, Version=0.21.0.0, Culture=neutral, PublicKeyToken=null + KKManager.Windows.ToolWindows.Properties.PropertyViewerBase, KKManager, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null - - 17, 17 - - - True - \ No newline at end of file