diff --git a/Launcher/Form1.Designer.cs b/Launcher/Form1.Designer.cs index a5029be34..532304617 100644 --- a/Launcher/Form1.Designer.cs +++ b/Launcher/Form1.Designer.cs @@ -34,30 +34,36 @@ this.resolutionBox = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); this.fullscreenBox = new System.Windows.Forms.CheckBox(); - this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.contentPackageBox = new System.Windows.Forms.ComboBox(); this.label2 = new System.Windows.Forms.Label(); - this.button2 = new System.Windows.Forms.Button(); + this.packageManagerButton = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // pictureBox1 // + this.pictureBox1.BackColor = System.Drawing.Color.OrangeRed; this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(57, 25); + this.pictureBox1.Location = new System.Drawing.Point(-11, 33); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(508, 69); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.Size = new System.Drawing.Size(650, 42); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; // // launchButton // + this.launchButton.BackColor = System.Drawing.Color.OrangeRed; + this.launchButton.FlatAppearance.BorderColor = System.Drawing.Color.OrangeRed; + this.launchButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.launchButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.launchButton.ForeColor = System.Drawing.SystemColors.ControlText; this.launchButton.Location = new System.Drawing.Point(455, 399); this.launchButton.Name = "launchButton"; this.launchButton.Size = new System.Drawing.Size(161, 42); this.launchButton.TabIndex = 1; this.launchButton.Text = "LAUNCH"; - this.launchButton.UseVisualStyleBackColor = true; + this.launchButton.UseVisualStyleBackColor = false; this.launchButton.Click += new System.EventHandler(this.launchButton_Click); // // resolutionBox @@ -72,6 +78,8 @@ // label1 // this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Transparent; + this.label1.ForeColor = System.Drawing.SystemColors.Window; this.label1.Location = new System.Drawing.Point(54, 191); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(60, 13); @@ -81,52 +89,65 @@ // fullscreenBox // this.fullscreenBox.AutoSize = true; + this.fullscreenBox.BackColor = System.Drawing.Color.Transparent; + this.fullscreenBox.ForeColor = System.Drawing.SystemColors.Window; this.fullscreenBox.Location = new System.Drawing.Point(57, 252); this.fullscreenBox.Name = "fullscreenBox"; this.fullscreenBox.Size = new System.Drawing.Size(74, 17); this.fullscreenBox.TabIndex = 4; this.fullscreenBox.Text = "Fullscreen"; - this.fullscreenBox.UseVisualStyleBackColor = true; + this.fullscreenBox.UseVisualStyleBackColor = false; // - // comboBox2 + // contentPackageBox // - this.comboBox2.FormattingEnabled = true; - this.comboBox2.Location = new System.Drawing.Point(368, 207); - this.comboBox2.Name = "comboBox2"; - this.comboBox2.Size = new System.Drawing.Size(212, 21); - this.comboBox2.TabIndex = 5; + this.contentPackageBox.FormattingEnabled = true; + this.contentPackageBox.Location = new System.Drawing.Point(368, 207); + this.contentPackageBox.Name = "contentPackageBox"; + this.contentPackageBox.Size = new System.Drawing.Size(212, 21); + this.contentPackageBox.TabIndex = 5; + this.contentPackageBox.SelectedIndexChanged += new System.EventHandler(this.contentPackageBox_SelectedIndexChanged); // // label2 // this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.Color.Transparent; + this.label2.ForeColor = System.Drawing.SystemColors.Window; this.label2.Location = new System.Drawing.Point(365, 191); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(92, 13); this.label2.TabIndex = 6; this.label2.Text = "Content package:"; // - // button2 + // packageManagerButton // - this.button2.Location = new System.Drawing.Point(368, 234); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(130, 35); - this.button2.TabIndex = 7; - this.button2.Text = "Package manager"; - this.button2.UseVisualStyleBackColor = true; + this.packageManagerButton.BackColor = System.Drawing.Color.OrangeRed; + this.packageManagerButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.packageManagerButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.packageManagerButton.Location = new System.Drawing.Point(368, 234); + this.packageManagerButton.Name = "packageManagerButton"; + this.packageManagerButton.Size = new System.Drawing.Size(120, 35); + this.packageManagerButton.TabIndex = 7; + this.packageManagerButton.Text = "Package manager"; + this.packageManagerButton.UseVisualStyleBackColor = false; + this.packageManagerButton.Click += new System.EventHandler(this.packageManagerButton_Click); // // LauncherMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.ButtonHighlight; + this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(628, 453); - this.Controls.Add(this.button2); + this.Controls.Add(this.packageManagerButton); this.Controls.Add(this.label2); - this.Controls.Add(this.comboBox2); + this.Controls.Add(this.contentPackageBox); this.Controls.Add(this.fullscreenBox); this.Controls.Add(this.label1); - this.Controls.Add(this.resolutionBox); this.Controls.Add(this.launchButton); + this.Controls.Add(this.resolutionBox); this.Controls.Add(this.pictureBox1); + this.DoubleBuffered = true; this.Name = "LauncherMain"; this.Text = "Form1"; ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); @@ -142,9 +163,9 @@ private System.Windows.Forms.ComboBox resolutionBox; private System.Windows.Forms.Label label1; private System.Windows.Forms.CheckBox fullscreenBox; - private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.ComboBox contentPackageBox; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button packageManagerButton; } } diff --git a/Launcher/Form1.cs b/Launcher/Form1.cs index 6081552c1..0e810866c 100644 --- a/Launcher/Form1.cs +++ b/Launcher/Form1.cs @@ -17,6 +17,7 @@ namespace Launcher { public partial class LauncherMain : Form { + public static string ContentPackageFolder = "Data/ContentPackages/"; private const string configPath = "config.xml"; private Subsurface.GameSettings settings; @@ -41,6 +42,9 @@ namespace Launcher { InitializeComponent(); + ContentPackage.LoadAll(LauncherMain.ContentPackageFolder); + contentPackageBox.DataSource = ContentPackage.list; + supportedModes = new List(); DEVMODE vDevMode = new DEVMODE(); @@ -77,6 +81,15 @@ namespace Launcher fullscreenBox.DataBindings.Add("Checked", this, "FullscreenEnabled"); + if (settings.SelectedContentPackage == null) + { + if (contentPackageBox.Items.Count > 0) contentPackageBox.SelectedItem = contentPackageBox.Items[0]; + } + else + { + contentPackageBox.SelectedItem = settings.SelectedContentPackage; + } + //resolutionBox.SelectedItem = selectedMode; } @@ -95,6 +108,21 @@ namespace Launcher Process.Start(Directory.GetCurrentDirectory() + "/Subsurface.exe"); Application.Exit(); } + + private void packageManagerButton_Click(object sender, EventArgs e) + { + var packageManager = new PackageManager(settings.SelectedContentPackage); + packageManager.Show(); + } + + private void contentPackageBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (settings == null) return; + + ComboBox comboBox = sender as ComboBox; + + settings.SelectedContentPackage = comboBox.SelectedItem as ContentPackage; + } } public class GraphicsMode diff --git a/Launcher/Form1.resx b/Launcher/Form1.resx index 5c879df53..e6caebe5f 100644 --- a/Launcher/Form1.resx +++ b/Launcher/Form1.resx @@ -121,7 +121,7 @@ iVBORw0KGgoAAAANSUhEUgAABpQAAAD4CAYAAADivwW2AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxAAAAsQAa0jvXUAAP+WSURBVHhe7P35u67XWR94VizF + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACwwAAAsMAT9AIsgAAP+WSURBVHhe7P35u67XWR94VizF tiyUYx0UqStd1dVDdVe6OnO6M1QlDAFCKDBUIHTTFZKqQBLsDAbiGALYhhCwfZwUIInRkmwfa5Y1WbYG azBKDD+k+7J+7T8nvT6vnu/2fdZZ7x7O2Xu/w17Pdd3SPnu/7/Os4V7f+3sPaz3/2X/6T/9pypQpU6ZM mTJlypQpU6ZMmTJlyiHyn//H/9+U3Zc/ckx5xzFk9L11MmrLlClTzklGmD5lypQbk+Eim3KojIhBLyOi @@ -2886,6 +2886,63 @@ WyP8ncXqNfvPG90TG41htdVWW2211VZbbbXLs5Emq9bruGpV7/U2en9s9DnVRvd5Kfbnf/7nq6222gXZ cJGtdiobEeJF2+hzV1vtNDbC1WXa6B5WW2211a6jjTjwom30uautdhob4eoybXQPq6222mqrrbbaaqsd p430Hhu9d5E2KoqvttpqZ7E//8/+fzvjQ0uhlEjNAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACw4AAAsOAUC+4UEAAAveSURBVHhe7d3vch23DcbhvZz4 + v2Q7tmQnjpO2Se//hrYEQ7AvcbiS26/v78MTkgCI3XMyg3FmpPh48eLhBODpePny8QTgiQEAGDtevfpy + AvB0vH799QTg6Xjz5usJwFMbAL+0DQBHx9u3v54APB3v3n07AXg67u6+nQA8Hff3v50APB3377+f7++/ + n7HelzXjsc6apLFYh6xVmr+5r/G6l9isbbH3QWNDniOfdVqf99PlfYl1US/n7DvPsUps9skardf9heX5 + rfbmfUSt1VyYeX1+xGOt9Zv7EYsey3c44rE+F8vvYInFuuk3vy+J1fP2vZXkar94Xj57iljWtXX7binr + hvr+mpvnH7lT75ZY3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AQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAAxhgAgDEGAGCMAQAYYwAA + xhgAgDEGAGCMAQAYYwAAtj6f/wEIzWam3AHpbQAAAABJRU5ErkJggg== \ No newline at end of file diff --git a/Launcher/Launcher.csproj b/Launcher/Launcher.csproj index d10df6389..40d07dd82 100644 --- a/Launcher/Launcher.csproj +++ b/Launcher/Launcher.csproj @@ -37,6 +37,7 @@ + @@ -53,11 +54,20 @@ Form1.cs + + Form + + + PackageManager.cs + Form1.cs + + PackageManager.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/Launcher/PackageManager.Designer.cs b/Launcher/PackageManager.Designer.cs new file mode 100644 index 000000000..d308263eb --- /dev/null +++ b/Launcher/PackageManager.Designer.cs @@ -0,0 +1,307 @@ +namespace Launcher +{ + partial class PackageManager + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageManager)); + this.packageList = new System.Windows.Forms.ListBox(); + this.newPackageName = new System.Windows.Forms.TextBox(); + this.newPackage = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.itemList = new System.Windows.Forms.ListBox(); + this.itemButton = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.characterList = new System.Windows.Forms.ListBox(); + this.characterButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.structureList = new System.Windows.Forms.ListBox(); + this.structureButton = new System.Windows.Forms.Button(); + this.jobButton = new System.Windows.Forms.Button(); + this.jobList = new System.Windows.Forms.ListBox(); + this.label4 = new System.Windows.Forms.Label(); + this.okButton = new System.Windows.Forms.Button(); + this.characterFolder = new System.Windows.Forms.Button(); + this.itemFolder = new System.Windows.Forms.Button(); + this.structureFolder = new System.Windows.Forms.Button(); + this.jobFolder = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // packageList + // + this.packageList.FormattingEnabled = true; + this.packageList.Location = new System.Drawing.Point(12, 73); + this.packageList.Name = "packageList"; + this.packageList.Size = new System.Drawing.Size(180, 342); + this.packageList.TabIndex = 3; + this.packageList.SelectedIndexChanged += new System.EventHandler(this.packageList_SelectedIndexChanged); + // + // newPackageName + // + this.newPackageName.Location = new System.Drawing.Point(12, 421); + this.newPackageName.Name = "newPackageName"; + this.newPackageName.Size = new System.Drawing.Size(129, 20); + this.newPackageName.TabIndex = 4; + this.newPackageName.TextChanged += new System.EventHandler(this.newPackageName_TextChanged); + // + // newPackage + // + this.newPackage.Enabled = false; + this.newPackage.Location = new System.Drawing.Point(147, 421); + this.newPackage.Name = "newPackage"; + this.newPackage.Size = new System.Drawing.Size(45, 20); + this.newPackage.TabIndex = 5; + this.newPackage.Text = "New"; + this.newPackage.UseVisualStyleBackColor = true; + this.newPackage.Click += new System.EventHandler(this.newPackage_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Transparent; + this.label1.ForeColor = System.Drawing.SystemColors.Control; + this.label1.Location = new System.Drawing.Point(215, 285); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(51, 13); + this.label1.TabIndex = 7; + this.label1.Text = "Item files:"; + // + // itemList + // + this.itemList.FormattingEnabled = true; + this.itemList.Location = new System.Drawing.Point(218, 307); + this.itemList.Name = "itemList"; + this.itemList.Size = new System.Drawing.Size(255, 134); + this.itemList.TabIndex = 8; + // + // itemButton + // + this.itemButton.Location = new System.Drawing.Point(301, 281); + this.itemButton.Name = "itemButton"; + this.itemButton.Size = new System.Drawing.Size(75, 23); + this.itemButton.TabIndex = 9; + this.itemButton.Text = "Add file"; + this.itemButton.UseVisualStyleBackColor = true; + this.itemButton.Click += new System.EventHandler(this.addFileButton_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.Color.Transparent; + this.label2.ForeColor = System.Drawing.SystemColors.Control; + this.label2.Location = new System.Drawing.Point(215, 120); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(77, 13); + this.label2.TabIndex = 7; + this.label2.Text = "Character files:"; + // + // characterList + // + this.characterList.FormattingEnabled = true; + this.characterList.Location = new System.Drawing.Point(218, 145); + this.characterList.Name = "characterList"; + this.characterList.Size = new System.Drawing.Size(255, 121); + this.characterList.TabIndex = 8; + // + // characterButton + // + this.characterButton.Location = new System.Drawing.Point(301, 116); + this.characterButton.Name = "characterButton"; + this.characterButton.Size = new System.Drawing.Size(75, 23); + this.characterButton.TabIndex = 9; + this.characterButton.Text = "Add file"; + this.characterButton.UseVisualStyleBackColor = true; + this.characterButton.Click += new System.EventHandler(this.addFileButton_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.Color.Transparent; + this.label3.ForeColor = System.Drawing.SystemColors.Control; + this.label3.Location = new System.Drawing.Point(489, 121); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(96, 13); + this.label3.TabIndex = 7; + this.label3.Text = "Map structure files:"; + // + // structureList + // + this.structureList.FormattingEnabled = true; + this.structureList.Location = new System.Drawing.Point(492, 145); + this.structureList.Name = "structureList"; + this.structureList.Size = new System.Drawing.Size(255, 121); + this.structureList.TabIndex = 8; + // + // structureButton + // + this.structureButton.Location = new System.Drawing.Point(603, 116); + this.structureButton.Name = "structureButton"; + this.structureButton.Size = new System.Drawing.Size(75, 23); + this.structureButton.TabIndex = 9; + this.structureButton.Text = "Add file"; + this.structureButton.UseVisualStyleBackColor = true; + this.structureButton.Click += new System.EventHandler(this.addFileButton_Click); + // + // jobButton + // + this.jobButton.Location = new System.Drawing.Point(603, 281); + this.jobButton.Name = "jobButton"; + this.jobButton.Size = new System.Drawing.Size(75, 23); + this.jobButton.TabIndex = 12; + this.jobButton.Text = "Add file"; + this.jobButton.UseVisualStyleBackColor = true; + this.jobButton.Click += new System.EventHandler(this.addFileButton_Click); + // + // jobList + // + this.jobList.FormattingEnabled = true; + this.jobList.Location = new System.Drawing.Point(492, 307); + this.jobList.Name = "jobList"; + this.jobList.Size = new System.Drawing.Size(255, 134); + this.jobList.TabIndex = 11; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.BackColor = System.Drawing.Color.Transparent; + this.label4.ForeColor = System.Drawing.SystemColors.Control; + this.label4.Location = new System.Drawing.Point(489, 286); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(48, 13); + this.label4.TabIndex = 10; + this.label4.Text = "Job files:"; + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(623, 503); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(124, 37); + this.okButton.TabIndex = 13; + this.okButton.Text = "OK"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // characterFolder + // + this.characterFolder.Location = new System.Drawing.Point(398, 116); + this.characterFolder.Name = "characterFolder"; + this.characterFolder.Size = new System.Drawing.Size(75, 23); + this.characterFolder.TabIndex = 9; + this.characterFolder.Text = "Add folder"; + this.characterFolder.UseVisualStyleBackColor = true; + this.characterFolder.Click += new System.EventHandler(this.addFolderButton_Click); + // + // itemFolder + // + this.itemFolder.Location = new System.Drawing.Point(398, 280); + this.itemFolder.Name = "itemFolder"; + this.itemFolder.Size = new System.Drawing.Size(75, 23); + this.itemFolder.TabIndex = 14; + this.itemFolder.Text = "Add folder"; + this.itemFolder.UseVisualStyleBackColor = true; + this.itemFolder.Click += new System.EventHandler(this.addFolderButton_Click); + // + // structureFolder + // + this.structureFolder.Location = new System.Drawing.Point(672, 116); + this.structureFolder.Name = "structureFolder"; + this.structureFolder.Size = new System.Drawing.Size(75, 23); + this.structureFolder.TabIndex = 15; + this.structureFolder.Text = "Add folder"; + this.structureFolder.UseVisualStyleBackColor = true; + this.structureFolder.Click += new System.EventHandler(this.addFolderButton_Click); + // + // jobFolder + // + this.jobFolder.Location = new System.Drawing.Point(672, 281); + this.jobFolder.Name = "jobFolder"; + this.jobFolder.Size = new System.Drawing.Size(75, 23); + this.jobFolder.TabIndex = 16; + this.jobFolder.Text = "Add folder"; + this.jobFolder.UseVisualStyleBackColor = true; + this.jobFolder.Click += new System.EventHandler(this.addFolderButton_Click); + // + // PackageManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.ClientSize = new System.Drawing.Size(784, 562); + this.Controls.Add(this.jobFolder); + this.Controls.Add(this.structureFolder); + this.Controls.Add(this.itemFolder); + this.Controls.Add(this.okButton); + this.Controls.Add(this.jobButton); + this.Controls.Add(this.jobList); + this.Controls.Add(this.label4); + this.Controls.Add(this.structureButton); + this.Controls.Add(this.characterFolder); + this.Controls.Add(this.characterButton); + this.Controls.Add(this.itemButton); + this.Controls.Add(this.structureList); + this.Controls.Add(this.label3); + this.Controls.Add(this.characterList); + this.Controls.Add(this.label2); + this.Controls.Add(this.itemList); + this.Controls.Add(this.label1); + this.Controls.Add(this.newPackage); + this.Controls.Add(this.newPackageName); + this.Controls.Add(this.packageList); + this.DoubleBuffered = true; + this.Name = "PackageManager"; + this.Text = "PackageManager"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox packageList; + private System.Windows.Forms.TextBox newPackageName; + private System.Windows.Forms.Button newPackage; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ListBox itemList; + private System.Windows.Forms.Button itemButton; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ListBox characterList; + private System.Windows.Forms.Button characterButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ListBox structureList; + private System.Windows.Forms.Button structureButton; + private System.Windows.Forms.Button jobButton; + private System.Windows.Forms.ListBox jobList; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Button characterFolder; + private System.Windows.Forms.Button itemFolder; + private System.Windows.Forms.Button structureFolder; + private System.Windows.Forms.Button jobFolder; + + } +} \ No newline at end of file diff --git a/Launcher/PackageManager.cs b/Launcher/PackageManager.cs new file mode 100644 index 000000000..4b1d5ec10 --- /dev/null +++ b/Launcher/PackageManager.cs @@ -0,0 +1,228 @@ +using Subsurface; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Launcher +{ + public partial class PackageManager : Form + { + private ContentPackage selectedPackage; + + private List fileBoxes; + private List