diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index 3d6f0775..26e1c388 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -29,199 +29,291 @@ namespace PckStudio.Forms.Editor /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor)); - this.treeView1 = new System.Windows.Forms.TreeView(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.catImages = new System.Windows.Forms.ImageList(this.components); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView2 = new System.Windows.Forms.TreeView(); - this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); - this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.contextMenuStrip1.SuspendLayout(); - this.menuStrip.SuspendLayout(); - this.contextMenuStrip2.SuspendLayout(); - this.SuspendLayout(); - // - // treeView1 - // - resources.ApplyResources(this.treeView1, "treeView1"); - this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.treeView1.ContextMenuStrip = this.contextMenuStrip1; - this.treeView1.ForeColor = System.Drawing.Color.White; - this.treeView1.ImageList = this.catImages; - this.treeView1.LabelEdit = true; - this.treeView1.Name = "treeView1"; - this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); - this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown); - // - // contextMenuStrip1 - // - this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor)); + this.treeView1 = new System.Windows.Forms.TreeView(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.catImages = new System.Windows.Forms.ImageList(this.components); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView2 = new System.Windows.Forms.TreeView(); + this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); + this.compressionUpDown = new System.Windows.Forms.NumericUpDown(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.contextMenuStrip1.SuspendLayout(); + this.menuStrip.SuspendLayout(); + this.contextMenuStrip2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit(); + this.SuspendLayout(); + // + // treeView1 + // + resources.ApplyResources(this.treeView1, "treeView1"); + this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.treeView1.ContextMenuStrip = this.contextMenuStrip1; + this.treeView1.ForeColor = System.Drawing.Color.White; + this.treeView1.ImageList = this.catImages; + this.treeView1.LabelEdit = true; + this.treeView1.Name = "treeView1"; + this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addCategoryStripMenuItem, this.removeCategoryStripMenuItem}); - this.contextMenuStrip1.Name = "contextMenuStrip1"; - resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); - // - // addCategoryStripMenuItem - // - resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem"); - this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem"; - this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click); - // - // removeCategoryStripMenuItem - // - this.removeCategoryStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; - this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem"; - resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem"); - this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click); - // - // catImages - // - this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream"))); - this.catImages.TransparentColor = System.Drawing.Color.Transparent; - this.catImages.Images.SetKeyName(0, "0_overworld.png"); - this.catImages.Images.SetKeyName(1, "1_nether.png"); - this.catImages.Images.SetKeyName(2, "2_end.png"); - this.catImages.Images.SetKeyName(3, "4_creative.png"); - this.catImages.Images.SetKeyName(4, "3_menu.png"); - this.catImages.Images.SetKeyName(5, "5_mg01.png"); - this.catImages.Images.SetKeyName(6, "6_mg02.png"); - this.catImages.Images.SetKeyName(7, "7_mg03.png"); - this.catImages.Images.SetKeyName(8, "8_unused.png"); - // - // menuStrip - // - resources.ApplyResources(this.menuStrip, "menuStrip"); - this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contextMenuStrip1.Name = "contextMenuStrip1"; + resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); + // + // addCategoryStripMenuItem + // + resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem"); + this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem"; + this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click); + // + // removeCategoryStripMenuItem + // + this.removeCategoryStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; + this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem"; + resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem"); + this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click); + // + // catImages + // + this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream"))); + this.catImages.TransparentColor = System.Drawing.Color.Transparent; + this.catImages.Images.SetKeyName(0, "0_overworld.png"); + this.catImages.Images.SetKeyName(1, "1_nether.png"); + this.catImages.Images.SetKeyName(2, "2_end.png"); + this.catImages.Images.SetKeyName(3, "4_creative.png"); + this.catImages.Images.SetKeyName(4, "3_menu.png"); + this.catImages.Images.SetKeyName(5, "5_mg01.png"); + this.catImages.Images.SetKeyName(6, "6_mg02.png"); + this.catImages.Images.SetKeyName(7, "7_mg03.png"); + this.catImages.Images.SetKeyName(8, "8_unused.png"); + // + // menuStrip + // + resources.ApplyResources(this.menuStrip, "menuStrip"); + this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.toolsToolStripMenuItem, this.helpToolStripMenuItem}); - this.menuStrip.Name = "menuStrip"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip.Name = "menuStrip"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.saveToolStripMenuItem1}); - this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem"); - // - // saveToolStripMenuItem1 - // - resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1"); - this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; - // - // toolsToolStripMenuItem - // - this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem"); + // + // saveToolStripMenuItem1 + // + resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1"); + this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; + this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click); + // + // toolsToolStripMenuItem + // + this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.creditsEditorToolStripMenuItem, - this.deleteUnusedBINKAsToolStripMenuItem}); - this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); - // - // creditsEditorToolStripMenuItem - // - this.creditsEditorToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ExportFile; - this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem"; - resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem"); - this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click); - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); - this.helpToolStripMenuItem.Click += new System.EventHandler(this.helpToolStripMenuItem_Click); - // - // treeView2 - // - this.treeView2.AllowDrop = true; - resources.ApplyResources(this.treeView2, "treeView2"); - this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.treeView2.ContextMenuStrip = this.contextMenuStrip2; - this.treeView2.ForeColor = System.Drawing.Color.White; - this.treeView2.Name = "treeView2"; - this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop); - this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter); - this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown); - // - // contextMenuStrip2 - // - this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteUnusedBINKAsToolStripMenuItem, + this.openDataFolderToolStripMenuItem}); + this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); + // + // creditsEditorToolStripMenuItem + // + this.creditsEditorToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ExportFile; + this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem"; + resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem"); + this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click); + // + // deleteUnusedBINKAsToolStripMenuItem + // + this.deleteUnusedBINKAsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; + this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; + resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); + this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); + // + // openDataFolderToolStripMenuItem + // + this.openDataFolderToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ZZFolder; + this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem"; + resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem"); + this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click); + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.howToAddSongsToolStripMenuItem, + this.whatIsEachCategoryToolStripMenuItem, + this.howToEditCreditsToolStripMenuItem, + this.optimizeDataFolderToolStripMenuItem, + this.bINKACompressionToolStripMenuItem}); + this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); + // + // howToAddSongsToolStripMenuItem + // + this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; + resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); + this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); + // + // whatIsEachCategoryToolStripMenuItem + // + this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem"; + resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem"); + this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click); + // + // howToEditCreditsToolStripMenuItem + // + this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; + resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); + this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); + // + // optimizeDataFolderToolStripMenuItem + // + this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; + resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); + this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); + // + // bINKACompressionToolStripMenuItem + // + this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; + resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); + this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click); + // + // treeView2 + // + this.treeView2.AllowDrop = true; + resources.ApplyResources(this.treeView2, "treeView2"); + this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.treeView2.ContextMenuStrip = this.contextMenuStrip2; + this.treeView2.ForeColor = System.Drawing.Color.White; + this.treeView2.Name = "treeView2"; + this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop); + this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter); + this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown); + // + // contextMenuStrip2 + // + this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addEntryMenuItem, this.removeEntryMenuItem, this.verifyFileLocationToolStripMenuItem}); - this.contextMenuStrip2.Name = "contextMenuStrip1"; - resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2"); - // - // addEntryMenuItem - // - resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem"); - this.addEntryMenuItem.Name = "addEntryMenuItem"; - this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click); - // - // removeEntryMenuItem - // - this.removeEntryMenuItem.Image = global::PckStudio.Properties.Resources.Del; - this.removeEntryMenuItem.Name = "removeEntryMenuItem"; - resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem"); - this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click); - // - // verifyFileLocationToolStripMenuItem - // - this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem"; - resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem"); - this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click); - // - // playOverworldInCreative - // - resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative"); - this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window; - this.playOverworldInCreative.Name = "playOverworldInCreative"; - this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark; - this.playOverworldInCreative.UseCustomBackColor = true; - this.playOverworldInCreative.UseCustomForeColor = true; - this.playOverworldInCreative.UseSelectable = true; - // - // deleteUnusedBINKAsToolStripMenuItem - // - this.deleteUnusedBINKAsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Del; - this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; - resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); - this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); - // - // AudioEditor - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.playOverworldInCreative); - this.Controls.Add(this.treeView1); - this.Controls.Add(this.treeView2); - this.Controls.Add(this.menuStrip); - this.Name = "AudioEditor"; - this.Style = MetroFramework.MetroColorStyle.Silver; - this.Theme = MetroFramework.MetroThemeStyle.Dark; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AudioEditor_FormClosing); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed); + this.contextMenuStrip2.Name = "contextMenuStrip1"; + resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2"); + // + // addEntryMenuItem + // + resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem"); + this.addEntryMenuItem.Name = "addEntryMenuItem"; + this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click); + // + // removeEntryMenuItem + // + this.removeEntryMenuItem.Image = global::PckStudio.Properties.Resources.Del; + this.removeEntryMenuItem.Name = "removeEntryMenuItem"; + resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem"); + this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click); + // + // verifyFileLocationToolStripMenuItem + // + this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem"; + resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem"); + this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click); + // + // playOverworldInCreative + // + resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative"); + this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window; + this.playOverworldInCreative.Name = "playOverworldInCreative"; + this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark; + this.playOverworldInCreative.UseCustomBackColor = true; + this.playOverworldInCreative.UseCustomForeColor = true; + this.playOverworldInCreative.UseSelectable = true; + // + // compressionUpDown + // + this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window; + resources.ApplyResources(this.compressionUpDown, "compressionUpDown"); + this.compressionUpDown.Maximum = new decimal(new int[] { + 9, + 0, + 0, + 0}); + this.compressionUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.compressionUpDown.Name = "compressionUpDown"; + this.compressionUpDown.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + // + // metroLabel1 + // + resources.ApplyResources(this.metroLabel1, "metroLabel1"); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark; + // + // AudioEditor + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.compressionUpDown); + this.Controls.Add(this.playOverworldInCreative); + this.Controls.Add(this.treeView1); + this.Controls.Add(this.treeView2); + this.Controls.Add(this.menuStrip); + this.Name = "AudioEditor"; + this.Style = MetroFramework.MetroColorStyle.Silver; + this.Theme = MetroFramework.MetroThemeStyle.Dark; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed); + this.Shown += new System.EventHandler(this.AudioEditor_Shown); + this.contextMenuStrip1.ResumeLayout(false); + this.menuStrip.ResumeLayout(false); + this.menuStrip.PerformLayout(); + this.contextMenuStrip2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + this.Shown += new System.EventHandler(this.AudioEditor_Shown); this.contextMenuStrip1.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.contextMenuStrip2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index b7aaf66f..bc5d6a43 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -19,7 +19,6 @@ namespace PckStudio.Forms.Editor { public partial class AudioEditor : MetroForm { - public bool saved = false; public string defaultType = "yes"; private string DataDirectory = ""; string tempDir = ""; @@ -27,8 +26,9 @@ namespace PckStudio.Forms.Editor PCKFile.FileData audioPCK; LOCFile loc; bool _isLittleEndian = false; + MainForm parent = null; - public static readonly List Categories = new List + public static readonly List Categories = new List { "Overworld", "Nether", @@ -52,35 +52,11 @@ namespace PckStudio.Forms.Editor return (PCKAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category); } - public static PCKFile.FileData CreateAudioPck(bool isLittle) - { - // create actual valid pck file structure - PCKAudioFile audioPck = new PCKAudioFile(); - audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld); - audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.Nether); - audioPck.AddCategory(PCKAudioFile.AudioCategory.EAudioType.End); - PCKFile.FileData pckFileData = new PCKFile.FileData("audio.pck", 8); - using (var stream = new MemoryStream()) - { - PCKAudioFileWriter.Write(stream, audioPck, isLittle); - pckFileData.SetData(stream.ToArray()); - } - return pckFileData; - } - - /// - /// Overload that creates a new audio.pck file - /// - public AudioEditor(LOCFile locFile, bool isLittleEndian) : this(CreateAudioPck(isLittleEndian), locFile, isLittleEndian) - { - } - public AudioEditor(PCKFile.FileData file, LOCFile locFile, bool isLittleEndian) { InitializeComponent(); // so the Creative songs aren't combined until after the forms are closed. // this will prevent potential problems with editing the categories after merging. - this.saveToolStripMenuItem1.Click += (sender, e) => saveToolStripMenuItem1_Click(sender, e, false); loc = locFile; tempDir = Path.Combine(Directory.GetCurrentDirectory(), "temp"); _isLittleEndian = isLittleEndian; @@ -353,7 +329,7 @@ namespace PckStudio.Forms.Editor } } - private void saveToolStripMenuItem1_Click(object sender, EventArgs e, bool combineCreative) + private void saveToolStripMenuItem1_Click(object sender, EventArgs e) { if (!audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Overworld) || !audioFile.HasCategory(PCKAudioFile.AudioCategory.EAudioType.Nether) || @@ -367,7 +343,7 @@ namespace PckStudio.Forms.Editor foreach (var category in audioFile.Categories) { category.Name = ""; - if (combineCreative && category.audioType == PCKAudioFile.AudioCategory.EAudioType.Creative) + if (playOverworldInCreative.Checked && category.audioType == PCKAudioFile.AudioCategory.EAudioType.Creative) { foreach (var name in overworldCategory.SongNames) { @@ -394,7 +370,7 @@ namespace PckStudio.Forms.Editor PCKAudioFileWriter.Write(stream, audioFile, _isLittleEndian); audioPCK.SetData(stream.ToArray()); } - saved = true; + DialogResult = DialogResult.OK; } private void treeView2_DragEnter(object sender, DragEventArgs e) @@ -420,11 +396,6 @@ namespace PckStudio.Forms.Editor audioFile.SetCredits(prompt.Credits.Split('\n')); } - private void AudioEditor_FormClosing(object sender, FormClosingEventArgs e) - { - if (saved) saveToolStripMenuItem1_Click(sender, e, playOverworldInCreative.Checked); - } - private void deleteUnusedBINKAsToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("This will delete all unused BINKA songs in the Data directory. This cannot be undone. Are you sure you want to continue?", "Warning", MessageBoxButtons.YesNo); @@ -461,8 +432,8 @@ namespace PckStudio.Forms.Editor // For when the Data Directory variable is null, this sets the variable in the form private void getDataDirectory() { - MainForm parent = Owner.Owner as MainForm; // Gets the MainForm so we can access the Save Location - DataDirectory = Path.Combine(Path.GetDirectoryName(parent.saveLocation), "Data"); + if (Owner.Owner is MainForm p) parent = p; + else Close(); } } } diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index b70bb513..dfd6e031 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -125,6 +125,26 @@ 127, 8 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x + DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 + jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC + + + + 168, 22 + + + Add Category + + + 168, 22 + + + Remove Category + 169, 48 @@ -384,26 +404,6 @@ 3 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x - DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 - jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC - - - - 168, 22 - - - Add Category - - - 168, 22 - - - Remove Category - 19, 8 @@ -489,33 +489,36 @@ 174, 70 - - contextMenuStrip2 + + Help - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 20, 60 - - 151, 84 + + 410, 24 279, 230 - - 13 + + menuStrip1 - - treeView2 + + menuStrip - - System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this 4 + + 282, 8 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -542,6 +545,36 @@ Verify File Location + + 174, 70 + + + contextMenuStrip2 + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 151, 84 + + + 279, 208 + + + 13 + + + treeView2 + + + System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + True