From 8848c97a6ee8c2dbe8a99ce31cd340699ecca84d Mon Sep 17 00:00:00 2001 From: CatmanFan Date: Tue, 20 Feb 2024 06:28:28 +0100 Subject: [PATCH] Update 3 --- FriishProduce/App.config | 3 + FriishProduce/BannerPreview.Designer.cs | 23 +- FriishProduce/BannerPreviewForm.Designer.cs | 3 +- FriishProduce/FriishProduce.csproj | 23 +- FriishProduce/InjectorForm.Designer.cs | 150 ++- FriishProduce/InjectorForm.cs | 53 +- FriishProduce/InjectorForm.resx | 906 ++++++++++++------ FriishProduce/MainForm.Designer.cs | 23 +- FriishProduce/MainForm.cs | 38 +- FriishProduce/MainForm.resx | 22 +- FriishProduce/Properties/Settings.Designer.cs | 12 + FriishProduce/Properties/Settings.settings | 3 + .../Strings/InjectorForm.Designer.cs | 18 + FriishProduce/Strings/InjectorForm.resx | 6 + .../Strings/SettingsForm.Designer.cs | 11 +- FriishProduce/Strings/SettingsForm.resx | 7 +- FriishProduce/Strings/Strings.Designer.cs | 28 +- FriishProduce/Strings/Strings.resx | 16 +- FriishProduce/Strings/es/InjectorForm.resx | 6 + FriishProduce/Strings/es/SettingsForm.resx | 7 +- FriishProduce/Strings/es/Strings.resx | 3 + FriishProduce/Strings/fr/InjectorForm.resx | 6 + FriishProduce/Strings/fr/SettingsForm.resx | 7 +- FriishProduce/Strings/fr/Strings.resx | 3 + FriishProduce/Strings/tr/InjectorForm.resx | 10 +- FriishProduce/Strings/tr/MainForm.resx | 9 +- FriishProduce/Strings/tr/Options_VC_N64.resx | 37 +- FriishProduce/Strings/tr/SettingsForm.resx | 7 +- FriishProduce/Strings/tr/Strings.resx | 3 + FriishProduce/Subforms/About.Designer.cs | 3 +- .../Subforms/ChannelTitles.Designer.cs | 40 +- FriishProduce/Subforms/ChannelTitles.resx | 43 +- .../Subforms/ContentOptions.Designer.cs | 42 +- FriishProduce/Subforms/ContentOptions.resx | 42 +- .../Subforms/Options_VC_N64.Designer.cs | 6 +- .../Subforms/Options_VC_NES.Designer.cs | 6 +- .../Subforms/Options_VC_SEGA.Designer.cs | 6 +- .../Subforms/SettingsForm.Designer.cs | 217 ++--- FriishProduce/Subforms/SettingsForm.cs | 123 ++- FriishProduce/Subforms/SettingsForm.resx | 473 ++++----- FriishProduce/_classes/Banner.cs | 2 +- FriishProduce/_classes/Injectors/WiiVC.cs | 25 +- FriishProduce/_classes/Injectors/WiiVC/N64.cs | 34 +- FriishProduce/_classes/Injectors/WiiVC/NES.cs | 13 +- .../_classes/Injectors/WiiVC/NeoGeo.cs | 2 +- .../_classes/Injectors/WiiVC/SEGA.cs | 4 +- .../_classes/Injectors/WiiVC/SNES.cs | 17 +- FriishProduce/_classes/Language.cs | 24 +- FriishProduce/_classes/MessageBox.cs | 143 ++- FriishProduce/_classes/ROM.cs | 23 +- FriishProduce/_classes/TitleImage.cs | 2 +- FriishProduce/_classes/Update.cs | 41 + FriishProduce/packages.config | 1 + 53 files changed, 1648 insertions(+), 1127 deletions(-) create mode 100644 FriishProduce/_classes/Update.cs diff --git a/FriishProduce/App.config b/FriishProduce/App.config index 4f70d2a8..efef1f26 100644 --- a/FriishProduce/App.config +++ b/FriishProduce/App.config @@ -37,6 +37,9 @@ False + + False + diff --git a/FriishProduce/BannerPreview.Designer.cs b/FriishProduce/BannerPreview.Designer.cs index 02091579..5a960e41 100644 --- a/FriishProduce/BannerPreview.Designer.cs +++ b/FriishProduce/BannerPreview.Designer.cs @@ -64,7 +64,7 @@ private void InitializeComponent() this.BannerPreview_Panel.Controls.Add(this.BannerPreview_Year); this.BannerPreview_Panel.Controls.Add(this.BannerPreview_BG); this.BannerPreview_Panel.Controls.Add(this.BannerPreview_Buffer); - this.BannerPreview_Panel.Location = new System.Drawing.Point(-20, 0); + this.BannerPreview_Panel.Location = new System.Drawing.Point(-6, 0); this.BannerPreview_Panel.Name = "BannerPreview_Panel"; this.BannerPreview_Panel.Size = new System.Drawing.Size(853, 379); this.BannerPreview_Panel.TabIndex = 44; @@ -74,7 +74,7 @@ private void InitializeComponent() this.BannerPreview_Label.BackColor = System.Drawing.Color.Gainsboro; this.BannerPreview_Label.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); this.BannerPreview_Label.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Label.Location = new System.Drawing.Point(-9, 238); + this.BannerPreview_Label.Location = new System.Drawing.Point(-10, 250); this.BannerPreview_Label.Name = "BannerPreview_Label"; this.BannerPreview_Label.Size = new System.Drawing.Size(872, 65); this.BannerPreview_Label.TabIndex = 43; @@ -86,7 +86,7 @@ private void InitializeComponent() // this.BannerPreview_Line2.BackColor = System.Drawing.Color.Silver; this.BannerPreview_Line2.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Line2.Location = new System.Drawing.Point(19, 118); + this.BannerPreview_Line2.Location = new System.Drawing.Point(3, 130); this.BannerPreview_Line2.Name = "BannerPreview_Line2"; this.BannerPreview_Line2.Size = new System.Drawing.Size(175, 3); this.BannerPreview_Line2.TabIndex = 45; @@ -97,7 +97,7 @@ private void InitializeComponent() // this.BannerPreview_Line1.BackColor = System.Drawing.Color.Silver; this.BannerPreview_Line1.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Line1.Location = new System.Drawing.Point(19, 59); + this.BannerPreview_Line1.Location = new System.Drawing.Point(3, 71); this.BannerPreview_Line1.Name = "BannerPreview_Line1"; this.BannerPreview_Line1.Size = new System.Drawing.Size(175, 3); this.BannerPreview_Line1.TabIndex = 44; @@ -109,7 +109,7 @@ private void InitializeComponent() this.Image.BackColor = System.Drawing.SystemColors.ControlLight; this.Image.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Image.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.Image.Location = new System.Drawing.Point(311, 59); + this.Image.Location = new System.Drawing.Point(311, 71); this.Image.Name = "Image"; this.Image.Size = new System.Drawing.Size(231, 172); this.Image.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -120,7 +120,7 @@ private void InitializeComponent() // this.BannerPreview_Players.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.5F); this.BannerPreview_Players.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Players.Location = new System.Drawing.Point(39, 71); + this.BannerPreview_Players.Location = new System.Drawing.Point(23, 83); this.BannerPreview_Players.Name = "BannerPreview_Players"; this.BannerPreview_Players.Size = new System.Drawing.Size(229, 46); this.BannerPreview_Players.TabIndex = 47; @@ -132,7 +132,7 @@ private void InitializeComponent() // this.BannerPreview_Year.Font = new System.Drawing.Font("Microsoft Sans Serif", 12.5F); this.BannerPreview_Year.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Year.Location = new System.Drawing.Point(39, 12); + this.BannerPreview_Year.Location = new System.Drawing.Point(23, 24); this.BannerPreview_Year.Name = "BannerPreview_Year"; this.BannerPreview_Year.Size = new System.Drawing.Size(229, 46); this.BannerPreview_Year.TabIndex = 46; @@ -144,7 +144,7 @@ private void InitializeComponent() // this.BannerPreview_BG.BackColor = System.Drawing.Color.WhiteSmoke; this.BannerPreview_BG.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_BG.Location = new System.Drawing.Point(-10, 179); + this.BannerPreview_BG.Location = new System.Drawing.Point(-10, 191); this.BannerPreview_BG.Name = "BannerPreview_BG"; this.BannerPreview_BG.Size = new System.Drawing.Size(872, 60); this.BannerPreview_BG.TabIndex = 42; @@ -155,7 +155,7 @@ private void InitializeComponent() // this.BannerPreview_Buffer.BackColor = System.Drawing.Color.Gainsboro; this.BannerPreview_Buffer.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.BannerPreview_Buffer.Location = new System.Drawing.Point(-10, 237); + this.BannerPreview_Buffer.Location = new System.Drawing.Point(-10, 249); this.BannerPreview_Buffer.Name = "BannerPreview_Buffer"; this.BannerPreview_Buffer.Size = new System.Drawing.Size(872, 119); this.BannerPreview_Buffer.TabIndex = 48; @@ -163,11 +163,10 @@ private void InitializeComponent() // // BannerPreview // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.Controls.Add(this.BannerPreview_Panel); this.Name = "BannerPreview"; - this.Size = new System.Drawing.Size(812, 343); + this.Size = new System.Drawing.Size(840, 360); this.BannerPreview_Panel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.BannerPreview_Line2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.BannerPreview_Line1)).EndInit(); diff --git a/FriishProduce/BannerPreviewForm.Designer.cs b/FriishProduce/BannerPreviewForm.Designer.cs index 7115225e..61252e55 100644 --- a/FriishProduce/BannerPreviewForm.Designer.cs +++ b/FriishProduce/BannerPreviewForm.Designer.cs @@ -33,8 +33,7 @@ private void InitializeComponent() // // BannerPreviewForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(833, 354); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; diff --git a/FriishProduce/FriishProduce.csproj b/FriishProduce/FriishProduce.csproj index 9a5feeb4..4d3ac1c6 100644 --- a/FriishProduce/FriishProduce.csproj +++ b/FriishProduce/FriishProduce.csproj @@ -71,6 +71,9 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + ..\packages\Octokit.9.1.2\lib\netstandard2.0\Octokit.dll + ..\packages\Ookii.Dialogs.WinForms.4.0.0\lib\net462\Ookii.Dialogs.WinForms.dll @@ -138,6 +141,7 @@ MainForm.cs + BannerPreview.cs @@ -416,22 +420,22 @@ False - Exclude - True + Exclude + True File False - Exclude - True + Exclude + True Assembly @@ -451,7 +455,6 @@ - @@ -459,16 +462,22 @@ - cd "$(ProjectDir)Strings\" + cd "$(TargetDir)strings\" +for /R "%25cd%25" %25%25f in (.) do (call :delete %25%25f) + +cd "$(ProjectDir)Strings\" for /R "%25cd%25" %25%25f in (.) do (call :copy %25%25f %25cd%25) goto :eof :copy -if NOT %25~n1 == %25~n2 rmdir /s /q "$(TargetDir)strings\%25~n1\" if NOT %25~n1 == %25~n2 mkdir "$(TargetDir)strings\%25~n1\" if NOT %25~n1 == %25~n2 robocopy %251 $(TargetDir)strings\%25~n1\ 1>nul exit /b +:delete +rmdir /s /q "$(TargetDir)strings\%25~n1\" +exit /b + :eof \ No newline at end of file diff --git a/FriishProduce/InjectorForm.Designer.cs b/FriishProduce/InjectorForm.Designer.cs index b4a46d03..d942eb18 100644 --- a/FriishProduce/InjectorForm.Designer.cs +++ b/FriishProduce/InjectorForm.Designer.cs @@ -35,13 +35,13 @@ private void InitializeComponent() this.groupBox8 = new System.Windows.Forms.GroupBox(); this.imageintpl = new System.Windows.Forms.ComboBox(); this.BrowseWAD = new System.Windows.Forms.OpenFileDialog(); - this.tabControl1 = new TabControls.DotNetBarTabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.SaveIcon_Panel = new System.Windows.Forms.Panel(); this.SaveDataTitle = new System.Windows.Forms.TextBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.button1 = new System.Windows.Forms.Button(); + this.StatusImage2 = new System.Windows.Forms.PictureBox(); + this.label11 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.ChannelTitle_Locale = new System.Windows.Forms.CheckBox(); this.Random = new System.Windows.Forms.PictureBox(); @@ -52,13 +52,9 @@ private void InitializeComponent() this.label7 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); - this.StatusImage2 = new System.Windows.Forms.PictureBox(); this.label3 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.button2 = new System.Windows.Forms.Button(); this.Players = new System.Windows.Forms.NumericUpDown(); this.ReleaseYear = new System.Windows.Forms.NumericUpDown(); this.BannerTitle = new System.Windows.Forms.TextBox(); @@ -73,26 +69,23 @@ private void InitializeComponent() this.OpenWAD = new System.Windows.Forms.CheckBox(); this.WADRegion = new System.Windows.Forms.PictureBox(); this.Base = new System.Windows.Forms.ComboBox(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.Preview = new System.Windows.Forms.PictureBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tabPage1 = new System.Windows.Forms.CheckBox(); this.bannerPreview1 = new FriishProduce.BannerPreview(); + this.tabPage2 = new System.Windows.Forms.CheckBox(); this.groupBox8.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); this.groupBox5.SuspendLayout(); this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.StatusImage2)).BeginInit(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Random)).BeginInit(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.StatusImage2)).BeginInit(); this.groupBox6.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Players)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ReleaseYear)).BeginInit(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.WADRegion)).BeginInit(); - this.tabPage2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.Preview)).BeginInit(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // WADRegionList @@ -123,29 +116,6 @@ private void InitializeComponent() // resources.ApplyResources(this.BrowseWAD, "BrowseWAD"); // - // tabControl1 - // - resources.ApplyResources(this.tabControl1, "tabControl1"); - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; - this.tabControl1.Multiline = true; - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; - // - // tabPage1 - // - this.tabPage1.BackColor = System.Drawing.SystemColors.Control; - this.tabPage1.Controls.Add(this.groupBox5); - this.tabPage1.Controls.Add(this.groupBox4); - this.tabPage1.Controls.Add(this.groupBox3); - this.tabPage1.Controls.Add(this.groupBox1); - this.tabPage1.Controls.Add(this.groupBox6); - this.tabPage1.Controls.Add(this.groupBox2); - resources.ApplyResources(this.tabPage1, "tabPage1"); - this.tabPage1.Name = "tabPage1"; - // // groupBox5 // this.groupBox5.Controls.Add(this.SaveIcon_Panel); @@ -172,6 +142,8 @@ private void InitializeComponent() // groupBox4 // this.groupBox4.Controls.Add(this.button1); + this.groupBox4.Controls.Add(this.StatusImage2); + this.groupBox4.Controls.Add(this.label11); resources.ApplyResources(this.groupBox4, "groupBox4"); this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.System; this.groupBox4.Name = "groupBox4"; @@ -184,6 +156,18 @@ private void InitializeComponent() this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.OpenInjectorOptions); // + // StatusImage2 + // + this.StatusImage2.Image = global::FriishProduce.Properties.Resources.cross; + resources.ApplyResources(this.StatusImage2, "StatusImage2"); + this.StatusImage2.Name = "StatusImage2"; + this.StatusImage2.TabStop = false; + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // // groupBox3 // this.groupBox3.Controls.Add(this.ChannelTitle_Locale); @@ -249,9 +233,7 @@ private void InitializeComponent() // groupBox1 // this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.StatusImage2); this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.label11); this.groupBox1.Controls.Add(this.label1); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System; @@ -263,24 +245,12 @@ private void InitializeComponent() resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // - // StatusImage2 - // - this.StatusImage2.Image = global::FriishProduce.Properties.Resources.cross; - resources.ApplyResources(this.StatusImage2, "StatusImage2"); - this.StatusImage2.Name = "StatusImage2"; - this.StatusImage2.TabStop = false; - // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; this.label3.UseMnemonic = false; // - // label11 - // - resources.ApplyResources(this.label11, "label11"); - this.label11.Name = "label11"; - // // label1 // resources.ApplyResources(this.label1, "label1"); @@ -289,8 +259,6 @@ private void InitializeComponent() // // groupBox6 // - this.groupBox6.Controls.Add(this.pictureBox1); - this.groupBox6.Controls.Add(this.button2); this.groupBox6.Controls.Add(this.Players); this.groupBox6.Controls.Add(this.ReleaseYear); this.groupBox6.Controls.Add(this.BannerTitle); @@ -302,20 +270,6 @@ private void InitializeComponent() this.groupBox6.Name = "groupBox6"; this.groupBox6.TabStop = false; // - // pictureBox1 - // - this.pictureBox1.BackColor = System.Drawing.Color.Silver; - resources.ApplyResources(this.pictureBox1, "pictureBox1"); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.TabStop = false; - // - // button2 - // - resources.ApplyResources(this.button2, "button2"); - this.button2.Image = global::FriishProduce.Properties.Resources.image_share; - this.button2.Name = "button2"; - this.button2.UseVisualStyleBackColor = true; - // // Players // this.Players.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -449,21 +403,25 @@ private void InitializeComponent() this.Base.Name = "Base"; this.Base.SelectedIndexChanged += new System.EventHandler(this.Base_SelectedIndexChanged); // - // tabPage2 + // panel1 // - this.tabPage2.BackColor = System.Drawing.SystemColors.Control; - this.tabPage2.Controls.Add(this.Preview); - this.tabPage2.Controls.Add(this.bannerPreview1); - resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Name = "tabPage2"; + this.panel1.Controls.Add(this.groupBox1); + this.panel1.Controls.Add(this.groupBox5); + this.panel1.Controls.Add(this.groupBox2); + this.panel1.Controls.Add(this.groupBox4); + this.panel1.Controls.Add(this.groupBox6); + this.panel1.Controls.Add(this.groupBox3); + resources.ApplyResources(this.panel1, "panel1"); + this.panel1.Name = "panel1"; // - // Preview + // tabPage1 // - this.Preview.BackgroundImage = global::FriishProduce.Properties.Resources.x; - resources.ApplyResources(this.Preview, "Preview"); - this.Preview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.Preview.Name = "Preview"; - this.Preview.TabStop = false; + resources.ApplyResources(this.tabPage1, "tabPage1"); + this.tabPage1.Checked = true; + this.tabPage1.CheckState = System.Windows.Forms.CheckState.Checked; + this.tabPage1.Name = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + this.tabPage1.Click += new System.EventHandler(this.TabPageClick); // // bannerPreview1 // @@ -471,13 +429,23 @@ private void InitializeComponent() resources.ApplyResources(this.bannerPreview1, "bannerPreview1"); this.bannerPreview1.Name = "bannerPreview1"; // + // tabPage2 + // + resources.ApplyResources(this.tabPage2, "tabPage2"); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + this.tabPage2.Click += new System.EventHandler(this.TabPageClick); + // // InjectorForm // - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.BackColor = System.Drawing.Color.WhiteSmoke; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.BackColor = System.Drawing.Color.White; resources.ApplyResources(this, "$this"); - this.Controls.Add(this.tabControl1); + this.Controls.Add(this.tabPage2); + this.Controls.Add(this.tabPage1); + this.Controls.Add(this.panel1); this.Controls.Add(this.groupBox8); + this.Controls.Add(this.bannerPreview1); this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "InjectorForm"; @@ -486,27 +454,24 @@ private void InitializeComponent() this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.isClosing); this.Shown += new System.EventHandler(this.Form_Shown); this.groupBox8.ResumeLayout(false); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.StatusImage2)).EndInit(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.Random)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.StatusImage2)).EndInit(); this.groupBox6.ResumeLayout(false); this.groupBox6.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Players)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ReleaseYear)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.WADRegion)).EndInit(); - this.tabPage2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.Preview)).EndInit(); + this.panel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -546,17 +511,14 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox8; internal System.Windows.Forms.OpenFileDialog BrowseWAD; private System.Windows.Forms.CheckBox OpenWAD; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.PictureBox Preview; private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.CheckBox ChannelTitle_Locale; private System.Windows.Forms.Label label11; private System.Windows.Forms.PictureBox StatusImage2; private System.Windows.Forms.Label label2; - private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.TabPage tabPage1; - private TabControls.DotNetBarTabControl tabControl1; private BannerPreview bannerPreview1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox tabPage1; + private System.Windows.Forms.CheckBox tabPage2; } } \ No newline at end of file diff --git a/FriishProduce/InjectorForm.cs b/FriishProduce/InjectorForm.cs index 8da0c26c..54c1db00 100644 --- a/FriishProduce/InjectorForm.cs +++ b/FriishProduce/InjectorForm.cs @@ -29,7 +29,7 @@ public partial class InjectorForm : Form // ----------------------------------- // Public variables // ----------------------------------- - protected string ROM { get; set; } + protected ROM ROM { get; set; } protected string Manual { get; set; } protected LibRetroDB LibRetro { get; set; } protected Database Database { get; set; } @@ -64,6 +64,7 @@ public void RefreshForm() SetROMDataText(); bannerPreview1.Update(BannerTitle.Text, (int)ReleaseYear.Value, (int)Players.Value, tImg != null ? tImg.VCPic : null, Creator.isJapan ? 1 : Creator.isKorea ? 2 : 0); + Parent.SetTitle(); baseName.Location = new Point(label4.Location.X + label4.Width - 4, label4.Location.Y); baseID.Location = new Point(label5.Location.X + label5.Width - 4, label5.Location.Y); @@ -75,11 +76,11 @@ public void RefreshForm() imageintpl.SelectedIndex = Properties.Settings.Default.ImageInterpolation; } - public InjectorForm(Console c, string ROM = null) + public InjectorForm(Console c, string ROMpath = null) { Console = c; - this.ROM = ROM; InitializeComponent(); + if (ROMpath != null) ROM = new ROM(ROMpath); } private void Form_Shown(object sender, EventArgs e) @@ -155,7 +156,7 @@ private void Form_Shown(object sender, EventArgs e) Creator.BannerPlayers = (int)Players.Value; AddBases(); - if (ROM != null) LoadROM(ROM, Properties.Settings.Default.AutoLibRetro); + if (ROM != null) LoadROM(ROM.Path, Properties.Settings.Default.AutoLibRetro); } // ----------------------------------- @@ -175,10 +176,9 @@ protected virtual void CheckExport() SaveDataTitle.Lines.Length == 0 ? new string[] { "" } : SaveDataTitle.Lines; - button2.Enabled = tImg != null && !string.IsNullOrEmpty(Creator.BannerTitle); - SetROMDataText(); bannerPreview1.Update(BannerTitle.Text, (int)ReleaseYear.Value, (int)Players.Value, tImg != null ? tImg.VCPic : null, Creator.isJapan ? 1 : Creator.isKorea ? 2 : 0); + Parent.SetTitle(); ReadyToExport = !string.IsNullOrEmpty(Creator.TitleID) && Creator.TitleID.Length == 4 && !string.IsNullOrWhiteSpace(ChannelTitle.Text) @@ -192,7 +192,7 @@ protected virtual void CheckExport() protected virtual void SetROMDataText() { - label1.Text = string.Format(Language.Get(label1.Name, this), ROM != null ? Path.GetFileName(ROM) : Language.Get("Unknown")); + label1.Text = string.Format(Language.Get(label1.Name, this), ROM != null ? Path.GetFileName(ROM.Path) : Language.Get("Unknown")); if (LibRetro == null) { @@ -366,7 +366,7 @@ public void LoadManual(string path) if (validFiles < 2) { - MessageBox.Show(Language.Get("Message006"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(Language.Get("Message007"), MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Warning); Manual = null; return; } @@ -430,7 +430,6 @@ public bool LoadImage(Bitmap src) if (tImg.Source != null) { - Preview.Image = tImg.IconVCPic; SaveIcon_Panel.BackgroundImage = tImg.SaveIcon(); } @@ -480,7 +479,7 @@ public void LoadROM(string ROMpath, bool UseLibRetro = true) if (applicable < 6) { - MessageBox.Show(Language.Get("Message007"), MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(Language.Get("Message008"), MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Warning); return; } break; @@ -496,7 +495,7 @@ public void LoadROM(string ROMpath, bool UseLibRetro = true) } - ROM = ROMpath; + ROM = new ROM(ROMpath); ROMLoaded = true; Random.Visible = @@ -521,7 +520,7 @@ public void LoadLibRetroData() { try { - LibRetro = new LibRetroDB { SoftwarePath = ROM }; + LibRetro = new LibRetroDB { SoftwarePath = ROM.Path }; bool Retrieved = LibRetro.GetData(Console); if (Retrieved) @@ -555,7 +554,7 @@ public void LoadLibRetroData() } catch (Exception ex) { - MessageBox.Show(Language.Get("Error"), ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Hand); + MessageBox.Show(Language.Get("Error"), ex.Message, MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Error); } } @@ -593,7 +592,7 @@ public bool CreateInject() if (Properties.Settings.Default.AutoOpenFolder) System.Diagnostics.Process.Start("explorer.exe", $"/select, \"{Creator.Out}\""); else - MessageBox.Show(string.Format(Language.Get("Message003"), Creator.Out), MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show(string.Format(Language.Get("Message003"), Creator.Out), MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Information); return true; } @@ -602,7 +601,7 @@ public bool CreateInject() catch (Exception ex) { - MessageBox.Show(Language.Get("Error"), ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Hand); + MessageBox.Show(Language.Get("Error"), ex.Message, MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Error); return false; } @@ -969,6 +968,8 @@ private void UpdateBaseGeneral(int index) foreach (var item in Database.List) foreach (var key in CurrentBase.Keys) if (item.TitleID.ToUpper() == key.ToUpper()) UpdateBaseConsole(item.emuRev); + + bannerPreview1.Update(BannerTitle.Text, (int)ReleaseYear.Value, (int)Players.Value, tImg != null ? tImg.VCPic : null, Creator.isJapan ? 1 : Creator.isKorea ? 2 : 0); } /// @@ -1042,5 +1043,27 @@ private void ChannelTitle_Locale_CheckedChanged(object sender, EventArgs e) ChannelTitle.Enabled = !ChannelTitle_Locale.Checked; } + + private void TabPageClick(object sender, EventArgs e) + { + panel1.Hide(); + bannerPreview1.Hide(); + + tabPage1.Checked = (sender as CheckBox).Name == tabPage1.Name; + tabPage2.Checked = (sender as CheckBox).Name == tabPage2.Name; + + tabPage1.Enabled = !tabPage1.Checked; + tabPage2.Enabled = !tabPage2.Checked; + + if (tabPage1.Checked) + { + panel1.Show(); + } + + else if (tabPage2.Checked) + { + bannerPreview1.Show(); + } + } } } diff --git a/FriishProduce/InjectorForm.resx b/FriishProduce/InjectorForm.resx index e7c345dd..5eee4db7 100644 --- a/FriishProduce/InjectorForm.resx +++ b/FriishProduce/InjectorForm.resx @@ -133,23 +133,6 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System - - - null - - - 14, 24 - - - 431, 21 - - - - 41 - imageintpl @@ -162,11 +145,12 @@ 0 + False - 1340, 380 + 999, 480 461, 63 @@ -190,7 +174,35 @@ $this - 2 + 4 + + + + System + + + null + + + 14, 24 + + + 431, 21 + + + 41 + + + imageintpl + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox8 + + + 0 153, 17 @@ -198,8 +210,56 @@ WAD|*.wad - - Left + + SaveIcon_Panel + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 0 + + + SaveDataTitle + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 1 + + + False + + + 453, 291 + + + 400, 85 + + + 40 + + + Savedata + + + groupBox5 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 1 Stretch @@ -255,32 +315,68 @@ 1 - + + button1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 0 + + + StatusImage2 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 1 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 2 + + False - - 443, 345 + + 17, 291 - - 400, 85 + + 425, 85 - - 40 + + 35 - - Savedata + + WAD content options - - groupBox5 + + groupBox4 - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + panel1 - - 0 + + 3 System @@ -289,10 +385,10 @@ NoControl - 27, 51 + 12, 23 - 370, 26 + 400, 24 0 @@ -312,33 +408,174 @@ 0 - - False + + NoControl - - 12, 306 + + 12, 53 - - 425, 124 + + 16, 16 - - 35 + + AutoSize - - WAD content options + + 2 - + + StatusImage2 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox4 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1 - - tabPage1 + + True - + + NoControl + + + 30, 54 + + + 80, 13 + + 1 + + Custom manual + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 2 + + + ChannelTitle_Locale + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 0 + + + Random + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 1 + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 2 + + + ChannelTitle + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 3 + + + RegionFree + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 4 + + + TitleID + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 5 + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + 6 + + + False + + + 453, 168 + + + 400, 115 + + + 39 + + + Channel metadata + + + groupBox3 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 5 + Button @@ -561,32 +798,68 @@ 6 - + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + False - - 443, 12 + + 17, 12 - - 400, 115 + + 425, 115 - - 39 + + 34 - - Channel metadata + + Current information - - groupBox3 + + groupBox1 - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + panel1 - - 2 + + 0 True @@ -618,33 +891,6 @@ 0 - - NoControl - - - 11, 99 - - - 16, 16 - - - AutoSize - - - 2 - - - StatusImage2 - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - True @@ -676,38 +922,8 @@ groupBox1 - 2 - - - True - - - NoControl - - - 29, 100 - - - 80, 13 - - 1 - - Custom manual - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - True @@ -736,94 +952,109 @@ groupBox1 - 4 + 2 - - False + + Players - - 12, 8 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 425, 125 + + groupBox6 - - 34 + + 0 - - Current information + + ReleaseYear - - groupBox1 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox6 + + + 1 + + + BannerTitle + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox6 + + + 2 + + + label8 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + groupBox6 - + 3 - - NoControl + + label9 - - 18, 149 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 365, 1 + + groupBox6 - - 41 + + 4 - - pictureBox1 + + label10 - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox6 - - 0 + + 5 - + False - - MiddleLeft - - - NoControl - - - 20, 160 + + 453, 12 - - 360, 26 + + 400, 148 - - 44 + + 33 - - Show preview... + + Banner details - - button2 + + groupBox6 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox6 + + panel1 - - 1 + + 4 - 276, 114 + 276, 109 76, 21 @@ -844,10 +1075,10 @@ groupBox6 - 2 + 0 - 46, 114 + 46, 109 76, 21 @@ -865,10 +1096,10 @@ groupBox6 - 3 + 1 - 46, 44 + 46, 41 130 @@ -895,7 +1126,7 @@ groupBox6 - 4 + 2 True @@ -904,7 +1135,7 @@ NoControl - 43, 25 + 43, 22 56, 13 @@ -925,13 +1156,13 @@ groupBox6 - 5 + 3 NoControl - 43, 96 + 43, 91 152, 17 @@ -952,13 +1183,13 @@ groupBox6 - 6 + 4 NoControl - 205, 96 + 205, 91 152, 17 @@ -982,34 +1213,118 @@ groupBox6 - 7 + 5 - + + baseID + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + baseName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 1 + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 2 + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 3 + + + OpenWAD + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 4 + + + WADRegion + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 5 + + + Base + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 6 + + False - - 443, 136 + + 17, 135 - - 400, 200 + + 425, 148 - - 33 + + 40 - - Banner details + + Base information - - groupBox6 + + groupBox2 - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + panel1 - - 4 + + 2 True @@ -1150,7 +1465,7 @@ NoControl - 25, 95 + 25, 111 200, 18 @@ -1180,7 +1495,7 @@ NoControl - 367, 70 + 367, 86 32, 22 @@ -1207,7 +1522,7 @@ System - 25, 70 + 25, 86 336, 21 @@ -1227,95 +1542,74 @@ 6 - - False + + Top - - 12, 157 + + 0, 0 - - 425, 125 + + 870, 390 - - 40 + + 44 - - Base information + + panel1 - - groupBox2 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - tabPage1 + + 3 - - 5 + + Button - - 129, 4 + + False + + + System + + + NoControl - - 0, 0, 0, 0 + + 17, 396 - 1201, 483 + 140, 26 - 1 + 45 Details + + MiddleCenter + tabPage1 - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabControl1 + $this - 0 - - - Stretch - - - NoControl - - - 1055, 181 - - - 132, 97 - - - StretchImage - - - 41 - - - Preview - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 0 + 1 - 12, 52 + 15, 15 - 831, 356 + 840, 360 42 @@ -1327,61 +1621,46 @@ FriishProduce.BannerPreview, FriishProduce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - tabPage2 + $this - 1 + 5 + + + Button + + + System + + + NoControl - 129, 4 + 163, 396 - 1201, 483 + 140, 26 - 2 + 46 Preview + + MiddleCenter + tabPage2 - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabControl1 - - - 1 - - - Left - - - 35, 125 - - - 0, 0 - - - 1334, 491 - - - 43 - - - tabControl1 - - - TabControls.DotNetBarTabControl, FriishProduce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - $this - - 1 + + 0 True @@ -1390,13 +1669,16 @@ True - 1370, 491 + 870, 450 Tahoma, 8.25pt - - NES + + NoControl + + + No BrowseWAD diff --git a/FriishProduce/MainForm.Designer.cs b/FriishProduce/MainForm.Designer.cs index e21fa3d3..a2bcc820 100644 --- a/FriishProduce/MainForm.Designer.cs +++ b/FriishProduce/MainForm.Designer.cs @@ -65,7 +65,7 @@ private void InitializeComponent() this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.CloseTab = new System.Windows.Forms.ToolStripMenuItem(); this.tabControl = new MdiTabControl.TabControl(); - this.BrowseManual = new System.Windows.Forms.FolderBrowserDialog(); + this.BrowseManual = new Ookii.Dialogs.WinForms.VistaFolderBrowserDialog(); this.TabContextMenu.SuspendLayout(); this.SuspendLayout(); // @@ -95,6 +95,7 @@ private void InitializeComponent() this.ribbon1.OrbDropDown.TabIndex = ((int)(resources.GetObject("ribbon1.OrbDropDown.TabIndex"))); this.ribbon1.OrbStyle = System.Windows.Forms.RibbonOrbStyle.Office_2010_Extended; this.ribbon1.OrbText = "File"; + this.ribbon1.PanelCaptionHeight = 14; // // // @@ -108,7 +109,7 @@ private void InitializeComponent() this.ribbon1.RibbonTabFont = new System.Drawing.Font("Segoe UI", 8F); this.ribbon1.Tabs.Add(this.ribbonTab_Home); this.ribbon1.TabSpacing = 3; - this.ribbon1.ThemeColor = System.Windows.Forms.RibbonTheme.Blue; + this.ribbon1.ThemeColor = System.Windows.Forms.RibbonTheme.Halloween; this.ribbon1.UseAlwaysStandardTheme = true; // // NewProject @@ -349,11 +350,12 @@ private void InitializeComponent() resources.ApplyResources(this.tabControl, "tabControl"); this.tabControl.MenuRenderer = null; this.tabControl.Name = "tabControl"; + this.tabControl.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; this.tabControl.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; - this.tabControl.TabBackHighColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(241)))), ((int)(((byte)(255))))); - this.tabControl.TabBackHighColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(241)))), ((int)(((byte)(255))))); - this.tabControl.TabBackLowColor = System.Drawing.Color.WhiteSmoke; - this.tabControl.TabBackLowColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(217)))), ((int)(((byte)(235))))); + this.tabControl.TabBackHighColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(217)))), ((int)(((byte)(237))))); + this.tabControl.TabBackHighColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(250)))), ((int)(((byte)(255))))); + this.tabControl.TabBackLowColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(217)))), ((int)(((byte)(237))))); + this.tabControl.TabBackLowColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(240)))), ((int)(((byte)(255))))); this.tabControl.TabBorderEnhanced = true; this.tabControl.TabBorderEnhanceWeight = MdiTabControl.TabControl.Weight.Soft; this.tabControl.TabCloseButtonImage = null; @@ -361,23 +363,26 @@ private void InitializeComponent() this.tabControl.TabCloseButtonImageHot = null; this.tabControl.TabCloseButtonSize = new System.Drawing.Size(14, 14); this.tabControl.TabCloseButtonVisible = false; + this.tabControl.TabGlassGradient = true; this.tabControl.TabHeight = 25; this.tabControl.TabMaximumWidth = 350; this.tabControl.TabOffset = 5; this.tabControl.TabPadLeft = 7; this.tabControl.TabPadRight = 7; + this.tabControl.TopSeparator = false; this.tabControl.SelectedTabChanged += new System.EventHandler(this.TabChanged); this.tabControl.TabIndexChanged += new System.EventHandler(this.TabChanged); // // BrowseManual // - resources.ApplyResources(this.BrowseManual, "BrowseManual"); + this.BrowseManual.RootFolder = System.Environment.SpecialFolder.MyComputer; this.BrowseManual.ShowNewFolderButton = false; // // MainForm // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tabControl); this.Controls.Add(this.ribbon1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -424,8 +429,8 @@ private void InitializeComponent() private System.Windows.Forms.RibbonOrbMenuItem NewProject; private System.Windows.Forms.RibbonSeparator orbMenuSeparator2; private System.Windows.Forms.RibbonButton OpenManual; - private System.Windows.Forms.FolderBrowserDialog BrowseManual; private System.Windows.Forms.RibbonSeparator ribbonSeparator1; + private Ookii.Dialogs.WinForms.VistaFolderBrowserDialog BrowseManual; } } diff --git a/FriishProduce/MainForm.cs b/FriishProduce/MainForm.cs index 4c081a2d..07b6785d 100644 --- a/FriishProduce/MainForm.cs +++ b/FriishProduce/MainForm.cs @@ -1,4 +1,5 @@ -using System; +using Ookii.Dialogs.WinForms; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -13,6 +14,8 @@ namespace FriishProduce { public partial class MainForm : RibbonForm { + private SettingsForm s = new SettingsForm(); + internal LibRetroDB LibRetro { get; set; } private void AutoSetRibbon() @@ -85,7 +88,7 @@ private void RefreshForm() AutoSetRibbon(); Language.AutoSetForm(this); - Text = Language.Get("_AppTitle"); + SetTitle(); MenuItem_Settings.Text = Language.Get("Settings"); BrowseROM.Title = BrowseImage.Title = ribbonPanel_Open.Text; SaveWAD.Title = Strip_ExportWAD.Text = ExportWAD.Text; @@ -123,13 +126,21 @@ public MainForm() // Automatically set defined initial directory for save file dialog // ******** SaveWAD.InitialDirectory = Paths.Out; + + // FriishProduce.Update.GetLatest(); + } + + public void SetTitle(bool isNull = false) + { + if (tabControl.SelectedForm == null || tabControl.TabPages.Count == 0 || isNull) Text = Language.Get("_AppTitle"); + else if (!string.IsNullOrWhiteSpace((tabControl.SelectedForm as InjectorForm).Text)) + Text = Language.Get("_AppTitle") + " - " + (tabControl.SelectedForm as InjectorForm).Text; } private void Settings_Click(object sender, EventArgs e) { string lang = Properties.Settings.Default.UI_Language; - SettingsForm s = new SettingsForm(); s.ShowDialog(this); if (lang != Properties.Settings.Default.UI_Language) RefreshForm(); @@ -154,11 +165,12 @@ public void TabChanged(object sender, EventArgs e) else ExportCheck(sender, e); + SetTitle(!OpenROM.Enabled); + // Context menu // ******** if (tabControl.TabPages.Count >= 1) { - if (sender == tabControl.TabPages[0]) Strip_UseLibRetro.Enabled = UseLibRetro.Enabled = (tabControl.SelectedForm as InjectorForm).ROMLoaded; } } @@ -176,7 +188,7 @@ private void MainForm_Closing(object sender, FormClosingEventArgs e) if (isUnsaved) { - if (MessageBox.Show(Language.Get("Message002"), MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) + if (MessageBox.Show(Language.Get("Message002"), MessageBoxButtons.YesNo, Ookii.Dialogs.WinForms.TaskDialogIcon.Warning) == DialogResult.No) e.Cancel = true; else foreach (MdiTabControl.TabPage tabPage in tabControl.TabPages) @@ -197,6 +209,7 @@ private void AddProject(object sender, EventArgs e) InjectorForm Tab = new InjectorForm(console) { Parent = this, ContextMenuStrip = TabContextMenu }; Tab.FormClosed += TabChanged; Tab.ExportCheck += ExportCheck; + tabControl.TabBackHighColor = Tab.BackColor; tabControl.TabPages.Add(Tab); foreach (MdiTabControl.TabPage tabPage in tabControl.TabPages) @@ -261,7 +274,11 @@ private void OpenImage_Click(object sender, EventArgs e) } } - private void OpenManual_Click(object sender, EventArgs e) => (tabControl.SelectedForm as InjectorForm).LoadManual(BrowseManual.ShowDialog() == DialogResult.OK ? BrowseManual.SelectedPath : null); + private void OpenManual_Click(object sender, EventArgs e) + { + if (!Properties.Settings.Default.DoNotShow_000) MessageBox.Show(Language.Get("Message006"), 0); + (tabControl.SelectedForm as InjectorForm).LoadManual(BrowseManual.ShowDialog() == DialogResult.OK ? BrowseManual.SelectedPath : null); + } public void CleanTemp() { @@ -277,9 +294,12 @@ public void CleanTemp() private void TabContextMenu_Opening(object sender, CancelEventArgs e) { - var page = (sender as ContextMenuStrip).SourceControl; - var index = tabControl.TabPages.get_IndexOf(page as MdiTabControl.TabPage); - tabControl.TabPages[index].Select(); + if (tabControl.TabPages.Count > 1) + { + var page = (sender as ContextMenuStrip).SourceControl; + var index = tabControl.TabPages.get_IndexOf(page as MdiTabControl.TabPage); + tabControl.TabPages[index].Select(); + } } private void CloseTab_Click(object sender, EventArgs e) => (tabControl.SelectedForm as Form).Close(); diff --git a/FriishProduce/MainForm.resx b/FriishProduce/MainForm.resx index a249127c..220c812a 100644 --- a/FriishProduce/MainForm.resx +++ b/FriishProduce/MainForm.resx @@ -142,7 +142,7 @@ 0 - 984, 124 + 870, 120 1 @@ -308,11 +308,14 @@ Fill + + Segoe UI, 8pt + - 0, 124 + 0, 120 - 984, 488 + 870, 492 3 @@ -332,9 +335,6 @@ 447, 17 - - Needs to contain an "emanual"/"html"/"man" subfolder with extracted contents of the corresponding .arc. - True @@ -344,11 +344,8 @@ True - - 6, 13 - - 984, 612 + 870, 612 Tahoma, 8.25pt @@ -2752,9 +2749,6 @@ AAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAhAAAAIQBAAD8HwAA//8AAP//AAA= - - NoControl - CenterScreen @@ -2939,7 +2933,7 @@ BrowseManual - System.Windows.Forms.FolderBrowserDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Ookii.Dialogs.WinForms.VistaFolderBrowserDialog, Ookii.Dialogs.WinForms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=66aa232afad40158 MainForm diff --git a/FriishProduce/Properties/Settings.Designer.cs b/FriishProduce/Properties/Settings.Designer.cs index f91ddd15..fa188dfb 100644 --- a/FriishProduce/Properties/Settings.Designer.cs +++ b/FriishProduce/Properties/Settings.Designer.cs @@ -130,5 +130,17 @@ public bool Default_N64_ROMC0 { this["Default_N64_ROMC0"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool DoNotShow_000 { + get { + return ((bool)(this["DoNotShow_000"])); + } + set { + this["DoNotShow_000"] = value; + } + } } } diff --git a/FriishProduce/Properties/Settings.settings b/FriishProduce/Properties/Settings.settings index 1609d9f9..f3a23aa0 100644 --- a/FriishProduce/Properties/Settings.settings +++ b/FriishProduce/Properties/Settings.settings @@ -29,5 +29,8 @@ False + + False + \ No newline at end of file diff --git a/FriishProduce/Strings/InjectorForm.Designer.cs b/FriishProduce/Strings/InjectorForm.Designer.cs index c3e40bc2..cf26b573 100644 --- a/FriishProduce/Strings/InjectorForm.Designer.cs +++ b/FriishProduce/Strings/InjectorForm.Designer.cs @@ -257,5 +257,23 @@ public static string RegionFree_Text { return ResourceManager.GetString("RegionFree.Text", resourceCulture); } } + + /// + /// Looks up a localized string similar to Details. + /// + public static string tabPage1_Text { + get { + return ResourceManager.GetString("tabPage1.Text", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preview. + /// + public static string tabPage2_Text { + get { + return ResourceManager.GetString("tabPage2.Text", resourceCulture); + } + } } } diff --git a/FriishProduce/Strings/InjectorForm.resx b/FriishProduce/Strings/InjectorForm.resx index 2488f956..852b1b65 100644 --- a/FriishProduce/Strings/InjectorForm.resx +++ b/FriishProduce/Strings/InjectorForm.resx @@ -183,4 +183,10 @@ Region Free + + Details + + + Preview + \ No newline at end of file diff --git a/FriishProduce/Strings/SettingsForm.Designer.cs b/FriishProduce/Strings/SettingsForm.Designer.cs index 733332f7..83b872d6 100644 --- a/FriishProduce/Strings/SettingsForm.Designer.cs +++ b/FriishProduce/Strings/SettingsForm.Designer.cs @@ -108,19 +108,18 @@ public static string LanguageList_Items { /// /// Looks up a localized string similar to Application. /// - public static string tabPage1_Text { + public static string Node0_Text { get { - return ResourceManager.GetString("tabPage1.Text", resourceCulture); + return ResourceManager.GetString("Node0.Text", resourceCulture); } } /// - /// Looks up a localized string similar to Default settings - ///[{0}]. + /// Looks up a localized string similar to Default settings. /// - public static string tabPage2_Text { + public static string Node1_Text { get { - return ResourceManager.GetString("tabPage2.Text", resourceCulture); + return ResourceManager.GetString("Node1.Text", resourceCulture); } } } diff --git a/FriishProduce/Strings/SettingsForm.resx b/FriishProduce/Strings/SettingsForm.resx index 889c2148..0e111619 100644 --- a/FriishProduce/Strings/SettingsForm.resx +++ b/FriishProduce/Strings/SettingsForm.resx @@ -132,11 +132,10 @@ System default - + Application - - Default settings -[{0}] + + Default settings \ No newline at end of file diff --git a/FriishProduce/Strings/Strings.Designer.cs b/FriishProduce/Strings/Strings.Designer.cs index cc818768..fbc3d91a 100644 --- a/FriishProduce/Strings/Strings.Designer.cs +++ b/FriishProduce/Strings/Strings.Designer.cs @@ -168,6 +168,15 @@ public static string ByDefault { } } + /// + /// Looks up a localized string similar to Do not show this again. + /// + public static string DoNotShow { + get { + return ResourceManager.GetString("DoNotShow", resourceCulture); + } + } + /// /// Looks up a localized string similar to An error has occurred. /// @@ -473,7 +482,7 @@ public static string Message004 { } /// - /// Looks up a localized string similar to The WAD you have selected (title ID: {0}) is is not valid. + /// Looks up a localized string similar to The WAD you have selected (title ID: {0}) is invalid. ///This could be for any of the following reasons: ///- The currently-selected console does not match that used by the WAD. ///- The WAD is not yet available in the database. @@ -486,8 +495,10 @@ public static string Message005 { } /// - /// Looks up a localized string similar to Not a valid emanual contents folder. - ///Please make sure the directory you selected contains a subfolder "emanual", including the extracted contents of a manual .arc from a VC WAD.. + /// Looks up a localized string similar to Importing a custom manual + ///This can be used to replace the original Operations Guide for the VC title with one modified for the needs of the injected ROM. + /// + ///Before proceeding, please make sure the directory you are choosing contains a subfolder "emanual", including the extracted contents of a manual .arc from a VC WAD.. /// public static string Message006 { get { @@ -496,7 +507,7 @@ public static string Message006 { } /// - /// Looks up a localized string similar to The ZIP archive you have selected is not valid.. + /// Looks up a localized string similar to Not a valid emanual contents folder.. /// public static string Message007 { get { @@ -504,6 +515,15 @@ public static string Message007 { } } + /// + /// Looks up a localized string similar to The ZIP archive you have selected is invalid.. + /// + public static string Message008 { + get { + return ResourceManager.GetString("Message008", resourceCulture); + } + } + /// /// Looks up a localized string similar to Commodore 64. /// diff --git a/FriishProduce/Strings/Strings.resx b/FriishProduce/Strings/Strings.resx index 8216341e..91ac0488 100644 --- a/FriishProduce/Strings/Strings.resx +++ b/FriishProduce/Strings/Strings.resx @@ -148,6 +148,9 @@ Default The "by default" value + + Do not show this again + An error has occurred @@ -261,18 +264,23 @@ Restart now? Some fields may need to be filled manually. - The WAD you have selected (title ID: {0}) is is not valid. + The WAD you have selected (title ID: {0}) is invalid. This could be for any of the following reasons: - The currently-selected console does not match that used by the WAD. - The WAD is not yet available in the database. - The WAD has already been modified (i.e. injected or converted to a forwarder). - Not a valid emanual contents folder. -Please make sure the directory you selected contains a subfolder "emanual", including the extracted contents of a manual .arc from a VC WAD. + Importing a custom manual +This can be used to replace the original Operations Guide for the VC title with one modified for the needs of the injected ROM. + +Before proceeding, please make sure the directory you are choosing contains a subfolder "emanual", including the extracted contents of a manual .arc from a VC WAD. - The ZIP archive you have selected is not valid. + Not a valid emanual contents folder. + + + The ZIP archive you have selected is invalid. Nintendo diff --git a/FriishProduce/Strings/es/InjectorForm.resx b/FriishProduce/Strings/es/InjectorForm.resx index 461ec649..4e4ed554 100644 --- a/FriishProduce/Strings/es/InjectorForm.resx +++ b/FriishProduce/Strings/es/InjectorForm.resx @@ -177,4 +177,10 @@ Eliminar bloqueo regional + + Detalles + + + Vista previa + \ No newline at end of file diff --git a/FriishProduce/Strings/es/SettingsForm.resx b/FriishProduce/Strings/es/SettingsForm.resx index 6a1380ac..cfb1d335 100644 --- a/FriishProduce/Strings/es/SettingsForm.resx +++ b/FriishProduce/Strings/es/SettingsForm.resx @@ -133,11 +133,10 @@ seleccionada Idioma del sistema - + Programa - - Ajustes por defecto -[{0}] + + Ajustes por defecto \ No newline at end of file diff --git a/FriishProduce/Strings/es/Strings.resx b/FriishProduce/Strings/es/Strings.resx index e0d1340a..9cfa95ed 100644 --- a/FriishProduce/Strings/es/Strings.resx +++ b/FriishProduce/Strings/es/Strings.resx @@ -142,6 +142,9 @@ Por defecto The "by default" value + + No volver a mostrar este mensaje + Se ha producido un error diff --git a/FriishProduce/Strings/fr/InjectorForm.resx b/FriishProduce/Strings/fr/InjectorForm.resx index 9e3e7f0b..68cc9845 100644 --- a/FriishProduce/Strings/fr/InjectorForm.resx +++ b/FriishProduce/Strings/fr/InjectorForm.resx @@ -183,4 +183,10 @@ Déverrouillage de région + + Détails + + + Aperçu + \ No newline at end of file diff --git a/FriishProduce/Strings/fr/SettingsForm.resx b/FriishProduce/Strings/fr/SettingsForm.resx index 855504d9..1e17243b 100644 --- a/FriishProduce/Strings/fr/SettingsForm.resx +++ b/FriishProduce/Strings/fr/SettingsForm.resx @@ -132,11 +132,10 @@ Système - + Application - - Réglages par défaut -[{0}] + + Réglages par défaut \ No newline at end of file diff --git a/FriishProduce/Strings/fr/Strings.resx b/FriishProduce/Strings/fr/Strings.resx index 7f00882d..dcd1e598 100644 --- a/FriishProduce/Strings/fr/Strings.resx +++ b/FriishProduce/Strings/fr/Strings.resx @@ -148,6 +148,9 @@ Par défaut The "by default" value + + Ne plus afficher ce message + Une erreur est survenue diff --git a/FriishProduce/Strings/tr/InjectorForm.resx b/FriishProduce/Strings/tr/InjectorForm.resx index a5468303..fd1e6203 100644 --- a/FriishProduce/Strings/tr/InjectorForm.resx +++ b/FriishProduce/Strings/tr/InjectorForm.resx @@ -148,10 +148,10 @@ Oyun başlığı: - Kısa ad: + Kısa başlık: - Tam ad: + Tam başlık: Yıl: @@ -159,4 +159,10 @@ Bolgesiz + + Detaylar + + + Önizleme + \ No newline at end of file diff --git a/FriishProduce/Strings/tr/MainForm.resx b/FriishProduce/Strings/tr/MainForm.resx index 7c650536..3ac7e08b 100644 --- a/FriishProduce/Strings/tr/MainForm.resx +++ b/FriishProduce/Strings/tr/MainForm.resx @@ -120,6 +120,9 @@ Kapat + + WAD Olarak Kaydet + Hakkında @@ -133,7 +136,7 @@ Resim - Kılavuz Klasörü + Kılavuz Kaydet @@ -148,10 +151,10 @@ Giriş - Resmi Aç... + Resmi aç... - ROM Dosyasını Aç... + ROM dosyasını aç... LibRetro'dan Veri Alma diff --git a/FriishProduce/Strings/tr/Options_VC_N64.resx b/FriishProduce/Strings/tr/Options_VC_N64.resx index 05aa47df..c9bdd791 100644 --- a/FriishProduce/Strings/tr/Options_VC_N64.resx +++ b/FriishProduce/Strings/tr/Options_VC_N64.resx @@ -59,46 +59,46 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - - + + - + - - - - + + + + - - + + - - + + - - - - + + + + - + - + @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Yamalar + Ekran Parlaklığı Düzeltmesi diff --git a/FriishProduce/Strings/tr/SettingsForm.resx b/FriishProduce/Strings/tr/SettingsForm.resx index cbfc13a2..f2ef435b 100644 --- a/FriishProduce/Strings/tr/SettingsForm.resx +++ b/FriishProduce/Strings/tr/SettingsForm.resx @@ -126,11 +126,10 @@ Sistem Dili - + Uygulama - - Varsayılan ayarları -[{0}] + + Varsayılan ayarları \ No newline at end of file diff --git a/FriishProduce/Strings/tr/Strings.resx b/FriishProduce/Strings/tr/Strings.resx index 26ecdb62..1b8537e1 100644 --- a/FriishProduce/Strings/tr/Strings.resx +++ b/FriishProduce/Strings/tr/Strings.resx @@ -142,6 +142,9 @@ Varsayılan The "by default" value + + Bu mesajı bir daha gösterme + Bir hata oluştu diff --git a/FriishProduce/Subforms/About.Designer.cs b/FriishProduce/Subforms/About.Designer.cs index 22a1b5c4..c795cbc6 100644 --- a/FriishProduce/Subforms/About.Designer.cs +++ b/FriishProduce/Subforms/About.Designer.cs @@ -154,8 +154,7 @@ private void InitializeComponent() // About // this.AcceptButton = this.okButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.ClientSize = new System.Drawing.Size(613, 230); this.Controls.Add(this.tableLayoutPanel); this.Font = new System.Drawing.Font("Tahoma", 8.25F); diff --git a/FriishProduce/Subforms/ChannelTitles.Designer.cs b/FriishProduce/Subforms/ChannelTitles.Designer.cs index d5dfff74..ee17ff5e 100644 --- a/FriishProduce/Subforms/ChannelTitles.Designer.cs +++ b/FriishProduce/Subforms/ChannelTitles.Designer.cs @@ -30,8 +30,8 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChannelTitles)); - this.panel2 = new System.Windows.Forms.Panel(); - this.panel1 = new System.Windows.Forms.Panel(); + this.bottomPanel2 = new System.Windows.Forms.Panel(); + this.bottomPanel1 = new System.Windows.Forms.Panel(); this.OK = new System.Windows.Forms.Button(); this.English = new System.Windows.Forms.TextBox(); this.French = new System.Windows.Forms.TextBox(); @@ -49,23 +49,23 @@ private void InitializeComponent() this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); - this.panel2.SuspendLayout(); - this.panel1.SuspendLayout(); + this.bottomPanel2.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); this.SuspendLayout(); // - // panel2 + // bottomPanel2 // - this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; - this.panel2.Controls.Add(this.panel1); - resources.ApplyResources(this.panel2, "panel2"); - this.panel2.Name = "panel2"; + this.bottomPanel2.BackColor = System.Drawing.SystemColors.ControlDark; + this.bottomPanel2.Controls.Add(this.bottomPanel1); + resources.ApplyResources(this.bottomPanel2, "bottomPanel2"); + this.bottomPanel2.Name = "bottomPanel2"; // - // panel1 + // bottomPanel1 // - this.panel1.BackColor = System.Drawing.SystemColors.ControlLight; - this.panel1.Controls.Add(this.OK); - resources.ApplyResources(this.panel1, "panel1"); - this.panel1.Name = "panel1"; + this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; + this.bottomPanel1.Controls.Add(this.OK); + resources.ApplyResources(this.bottomPanel1, "bottomPanel1"); + this.bottomPanel1.Name = "bottomPanel1"; // // OK // @@ -173,8 +173,8 @@ private void InitializeComponent() // ChannelTitles // this.AcceptButton = this.OK; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ControlBox = false; this.Controls.Add(this.label8); this.Controls.Add(this.label7); @@ -192,7 +192,7 @@ private void InitializeComponent() this.Controls.Add(this.German); this.Controls.Add(this.French); this.Controls.Add(this.English); - this.Controls.Add(this.panel2); + this.Controls.Add(this.bottomPanel2); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; @@ -201,8 +201,8 @@ private void InitializeComponent() this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.TopMost = true; - this.panel2.ResumeLayout(false); - this.panel1.ResumeLayout(false); + this.bottomPanel2.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -210,8 +210,8 @@ private void InitializeComponent() #endregion - private System.Windows.Forms.Panel panel2; - protected System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel bottomPanel2; + protected System.Windows.Forms.Panel bottomPanel1; protected System.Windows.Forms.Button OK; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; diff --git a/FriishProduce/Subforms/ChannelTitles.resx b/FriishProduce/Subforms/ChannelTitles.resx index 245d97e3..ec95fcf2 100644 --- a/FriishProduce/Subforms/ChannelTitles.resx +++ b/FriishProduce/Subforms/ChannelTitles.resx @@ -145,57 +145,57 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel1 + bottomPanel1 0 - + Bottom - + 0, 1 - + 314, 47 - + 4 - - panel1 + + bottomPanel1 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel2 + + bottomPanel2 - + 0 - + Bottom - + 0, 234 - + 314, 48 - + 13 - - panel2 + + bottomPanel2 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 16 @@ -654,9 +654,6 @@ True - - 6, 13 - 314, 282 diff --git a/FriishProduce/Subforms/ContentOptions.Designer.cs b/FriishProduce/Subforms/ContentOptions.Designer.cs index 50279802..991e3335 100644 --- a/FriishProduce/Subforms/ContentOptions.Designer.cs +++ b/FriishProduce/Subforms/ContentOptions.Designer.cs @@ -30,28 +30,28 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ContentOptions)); - this.panel2 = new System.Windows.Forms.Panel(); - this.panel1 = new System.Windows.Forms.Panel(); + this.bottomPanel2 = new System.Windows.Forms.Panel(); + this.bottomPanel1 = new System.Windows.Forms.Panel(); this.Cancel = new System.Windows.Forms.Button(); this.OK = new System.Windows.Forms.Button(); - this.panel2.SuspendLayout(); - this.panel1.SuspendLayout(); + this.bottomPanel2.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); this.SuspendLayout(); // - // panel2 + // bottomPanel2 // - this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; - this.panel2.Controls.Add(this.panel1); - resources.ApplyResources(this.panel2, "panel2"); - this.panel2.Name = "panel2"; + this.bottomPanel2.BackColor = System.Drawing.SystemColors.ControlDark; + this.bottomPanel2.Controls.Add(this.bottomPanel1); + resources.ApplyResources(this.bottomPanel2, "bottomPanel2"); + this.bottomPanel2.Name = "bottomPanel2"; // - // panel1 + // bottomPanel1 // - this.panel1.BackColor = System.Drawing.SystemColors.ControlLight; - this.panel1.Controls.Add(this.Cancel); - this.panel1.Controls.Add(this.OK); - resources.ApplyResources(this.panel1, "panel1"); - this.panel1.Name = "panel1"; + this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; + this.bottomPanel1.Controls.Add(this.Cancel); + this.bottomPanel1.Controls.Add(this.OK); + resources.ApplyResources(this.bottomPanel1, "bottomPanel1"); + this.bottomPanel1.Name = "bottomPanel1"; // // Cancel // @@ -69,11 +69,11 @@ private void InitializeComponent() // ContentOptions // this.AcceptButton = this.OK; - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.CancelButton = this.Cancel; resources.ApplyResources(this, "$this"); this.ControlBox = false; - this.Controls.Add(this.panel2); + this.Controls.Add(this.bottomPanel2); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.KeyPreview = true; this.MaximizeBox = false; @@ -83,17 +83,17 @@ private void InitializeComponent() this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Load += new System.EventHandler(this.Form_Load); - this.panel2.ResumeLayout(false); - this.panel1.ResumeLayout(false); + this.bottomPanel2.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel bottomPanel2; protected System.Windows.Forms.Button OK; - protected System.Windows.Forms.Panel panel1; + protected System.Windows.Forms.Panel bottomPanel1; protected System.Windows.Forms.Button Cancel; } } \ No newline at end of file diff --git a/FriishProduce/Subforms/ContentOptions.resx b/FriishProduce/Subforms/ContentOptions.resx index 996a55a0..bff947a6 100644 --- a/FriishProduce/Subforms/ContentOptions.resx +++ b/FriishProduce/Subforms/ContentOptions.resx @@ -145,7 +145,7 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel1 + bottomPanel1 0 @@ -172,57 +172,57 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel1 + bottomPanel1 1 - + Bottom - + 0, 1 - + 384, 47 - + 4 - - panel1 + + bottomPanel1 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel2 + + bottomPanel2 - + 0 - + Bottom - + 0, 314 - + 384, 48 - + 12 - - panel2 + + bottomPanel2 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 0 diff --git a/FriishProduce/Subforms/Options_VC_N64.Designer.cs b/FriishProduce/Subforms/Options_VC_N64.Designer.cs index 82f597be..85735209 100644 --- a/FriishProduce/Subforms/Options_VC_N64.Designer.cs +++ b/FriishProduce/Subforms/Options_VC_N64.Designer.cs @@ -39,7 +39,7 @@ private void InitializeComponent() this.x009 = new System.Windows.Forms.Label(); this.n64004 = new System.Windows.Forms.GroupBox(); this.ROMCType = new System.Windows.Forms.ComboBox(); - this.panel1.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -52,7 +52,7 @@ private void InitializeComponent() // // panel1 // - this.panel1.Size = new System.Drawing.Size(459, 47); + this.bottomPanel1.Size = new System.Drawing.Size(459, 47); // // Cancel // @@ -193,7 +193,7 @@ private void InitializeComponent() this.Controls.SetChildIndex(this.panel3, 0); this.Controls.SetChildIndex(this.n64004, 0); this.Controls.SetChildIndex(this.groupBox1, 0); - this.panel1.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.panel3.ResumeLayout(false); diff --git a/FriishProduce/Subforms/Options_VC_NES.Designer.cs b/FriishProduce/Subforms/Options_VC_NES.Designer.cs index 1424441a..f8ad2f03 100644 --- a/FriishProduce/Subforms/Options_VC_NES.Designer.cs +++ b/FriishProduce/Subforms/Options_VC_NES.Designer.cs @@ -33,7 +33,7 @@ private void InitializeComponent() this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.PaletteList = new System.Windows.Forms.ComboBox(); - this.panel1.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); @@ -44,7 +44,7 @@ private void InitializeComponent() // // panel1 // - this.panel1.Size = new System.Drawing.Size(299, 47); + this.bottomPanel1.Size = new System.Drawing.Size(299, 47); // // Cancel // @@ -112,7 +112,7 @@ private void InitializeComponent() this.Controls.Add(this.groupBox1); this.Name = "Options_VC_NES"; this.Controls.SetChildIndex(this.groupBox1, 0); - this.panel1.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); diff --git a/FriishProduce/Subforms/Options_VC_SEGA.Designer.cs b/FriishProduce/Subforms/Options_VC_SEGA.Designer.cs index 597969d3..3114a7b1 100644 --- a/FriishProduce/Subforms/Options_VC_SEGA.Designer.cs +++ b/FriishProduce/Subforms/Options_VC_SEGA.Designer.cs @@ -34,7 +34,7 @@ private void InitializeComponent() this.BrightnessValue = new System.Windows.Forms.TrackBar(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.panel1.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.BrightnessValue)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -46,7 +46,7 @@ private void InitializeComponent() // // panel1 // - this.panel1.Size = new System.Drawing.Size(429, 47); + this.bottomPanel1.Size = new System.Drawing.Size(429, 47); // // Cancel // @@ -118,7 +118,7 @@ private void InitializeComponent() this.Name = "Options_VC_SEGA"; this.Controls.SetChildIndex(this.groupBox1, 0); this.Controls.SetChildIndex(this.checkBox1, 0); - this.panel1.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.BrightnessValue)).EndInit(); diff --git a/FriishProduce/Subforms/SettingsForm.Designer.cs b/FriishProduce/Subforms/SettingsForm.Designer.cs index 658305da..7c3f74fd 100644 --- a/FriishProduce/Subforms/SettingsForm.Designer.cs +++ b/FriishProduce/Subforms/SettingsForm.Designer.cs @@ -30,18 +30,14 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); - this.tabControl1 = new TabControls.DotNetBarTabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.panel4 = new System.Windows.Forms.Panel(); + this.line2 = new System.Windows.Forms.Panel(); this.DefaultImageInterpolation = new System.Windows.Forms.ComboBox(); this.AutoOpenFolder = new System.Windows.Forms.CheckBox(); this.label2 = new System.Windows.Forms.Label(); this.LanguageList = new System.Windows.Forms.ComboBox(); this.AutoLibRetro = new System.Windows.Forms.CheckBox(); - this.panel2 = new System.Windows.Forms.Panel(); + this.line1 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.tabPage3 = new System.Windows.Forms.TabPage(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.n64003 = new System.Windows.Forms.CheckBox(); this.n64002 = new System.Windows.Forms.CheckBox(); @@ -49,56 +45,31 @@ private void InitializeComponent() this.n64000 = new System.Windows.Forms.CheckBox(); this.n64004 = new System.Windows.Forms.GroupBox(); this.ROMCType = new System.Windows.Forms.ComboBox(); - this.tabPage4 = new System.Windows.Forms.TabPage(); + this.DownloadBanners = new System.Windows.Forms.Button(); this.OK = new System.Windows.Forms.Button(); this.Cancel = new System.Windows.Forms.Button(); + this.bottomPanel1 = new System.Windows.Forms.Panel(); + this.bottomPanel2 = new System.Windows.Forms.Panel(); + this.TreeView = new System.Windows.Forms.TreeView(); this.panel1 = new System.Windows.Forms.Panel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.DebugTab = new System.Windows.Forms.TabPage(); - this.DownloadBanners = new System.Windows.Forms.Button(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.tabPage3.SuspendLayout(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.leftSeparator = new System.Windows.Forms.Panel(); this.groupBox1.SuspendLayout(); this.n64004.SuspendLayout(); + this.bottomPanel1.SuspendLayout(); + this.bottomPanel2.SuspendLayout(); this.panel1.SuspendLayout(); - this.panel3.SuspendLayout(); - this.DebugTab.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); this.SuspendLayout(); // - // tabControl1 - // - resources.ApplyResources(this.tabControl1, "tabControl1"); - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Controls.Add(this.tabPage4); - this.tabControl1.Controls.Add(this.DebugTab); - this.tabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; - this.tabControl1.Multiline = true; - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; - // - // tabPage1 - // - this.tabPage1.BackColor = System.Drawing.SystemColors.Control; - this.tabPage1.Controls.Add(this.panel4); - this.tabPage1.Controls.Add(this.DefaultImageInterpolation); - this.tabPage1.Controls.Add(this.AutoOpenFolder); - this.tabPage1.Controls.Add(this.label2); - this.tabPage1.Controls.Add(this.LanguageList); - this.tabPage1.Controls.Add(this.AutoLibRetro); - this.tabPage1.Controls.Add(this.panel2); - this.tabPage1.Controls.Add(this.label1); - resources.ApplyResources(this.tabPage1, "tabPage1"); - this.tabPage1.Name = "tabPage1"; + // line2 // - // panel4 - // - this.panel4.BackColor = System.Drawing.SystemColors.ControlDark; - resources.ApplyResources(this.panel4, "panel4"); - this.panel4.Name = "panel4"; + this.line2.BackColor = System.Drawing.SystemColors.ControlDark; + resources.ApplyResources(this.line2, "line2"); + this.line2.Name = "line2"; // // DefaultImageInterpolation // @@ -128,6 +99,7 @@ private void InitializeComponent() resources.GetString("LanguageList.Items")}); resources.ApplyResources(this.LanguageList, "LanguageList"); this.LanguageList.Name = "LanguageList"; + this.LanguageList.SelectedIndexChanged += new System.EventHandler(this.LanguageList_SelectedIndexChanged); // // AutoLibRetro // @@ -135,31 +107,17 @@ private void InitializeComponent() this.AutoLibRetro.Name = "AutoLibRetro"; this.AutoLibRetro.UseVisualStyleBackColor = true; // - // panel2 + // line1 // - this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; - resources.ApplyResources(this.panel2, "panel2"); - this.panel2.Name = "panel2"; + this.line1.BackColor = System.Drawing.SystemColors.ControlDark; + resources.ApplyResources(this.line1, "line1"); + this.line1.Name = "line1"; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // - // tabPage2 - // - this.tabPage2.BackColor = System.Drawing.SystemColors.Control; - resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Name = "tabPage2"; - // - // tabPage3 - // - this.tabPage3.BackColor = System.Drawing.SystemColors.Control; - this.tabPage3.Controls.Add(this.groupBox1); - this.tabPage3.Controls.Add(this.n64004); - resources.ApplyResources(this.tabPage3, "tabPage3"); - this.tabPage3.Name = "tabPage3"; - // // groupBox1 // this.groupBox1.Controls.Add(this.n64003); @@ -208,11 +166,12 @@ private void InitializeComponent() resources.ApplyResources(this.ROMCType, "ROMCType"); this.ROMCType.Name = "ROMCType"; // - // tabPage4 + // DownloadBanners // - this.tabPage4.BackColor = System.Drawing.SystemColors.Control; - resources.ApplyResources(this.tabPage4, "tabPage4"); - this.tabPage4.Name = "tabPage4"; + resources.ApplyResources(this.DownloadBanners, "DownloadBanners"); + this.DownloadBanners.Name = "DownloadBanners"; + this.DownloadBanners.UseVisualStyleBackColor = true; + this.DownloadBanners.Click += new System.EventHandler(this.DownloadBanners_Click); // // OK // @@ -229,43 +188,84 @@ private void InitializeComponent() this.Cancel.UseVisualStyleBackColor = true; this.Cancel.Click += new System.EventHandler(this.Cancel_Click); // + // bottomPanel1 + // + this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; + this.bottomPanel1.Controls.Add(this.Cancel); + this.bottomPanel1.Controls.Add(this.OK); + resources.ApplyResources(this.bottomPanel1, "bottomPanel1"); + this.bottomPanel1.Name = "bottomPanel1"; + // + // bottomPanel2 + // + this.bottomPanel2.BackColor = System.Drawing.SystemColors.ControlDark; + this.bottomPanel2.Controls.Add(this.bottomPanel1); + resources.ApplyResources(this.bottomPanel2, "bottomPanel2"); + this.bottomPanel2.Name = "bottomPanel2"; + // + // TreeView + // + this.TreeView.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.TreeView.FullRowSelect = true; + this.TreeView.ItemHeight = 20; + resources.ApplyResources(this.TreeView, "TreeView"); + this.TreeView.Name = "TreeView"; + this.TreeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + ((System.Windows.Forms.TreeNode)(resources.GetObject("TreeView.Nodes"))), + ((System.Windows.Forms.TreeNode)(resources.GetObject("TreeView.Nodes1")))}); + this.TreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TreeView_AfterSelect); + // // panel1 // - this.panel1.BackColor = System.Drawing.SystemColors.ControlLight; - this.panel1.Controls.Add(this.Cancel); - this.panel1.Controls.Add(this.OK); + this.panel1.Controls.Add(this.checkBox1); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.DownloadBanners); + this.panel1.Controls.Add(this.line1); + this.panel1.Controls.Add(this.AutoOpenFolder); + this.panel1.Controls.Add(this.LanguageList); resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // - // panel3 + // checkBox1 // - this.panel3.BackColor = System.Drawing.SystemColors.ControlDark; - this.panel3.Controls.Add(this.panel1); - resources.ApplyResources(this.panel3, "panel3"); - this.panel3.Name = "panel3"; + resources.ApplyResources(this.checkBox1, "checkBox1"); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.UseVisualStyleBackColor = true; // - // DebugTab + // panel4 // - this.DebugTab.BackColor = System.Drawing.SystemColors.Control; - this.DebugTab.Controls.Add(this.DownloadBanners); - resources.ApplyResources(this.DebugTab, "DebugTab"); - this.DebugTab.Name = "DebugTab"; + this.panel4.Controls.Add(this.groupBox1); + this.panel4.Controls.Add(this.n64004); + resources.ApplyResources(this.panel4, "panel4"); + this.panel4.Name = "panel4"; // - // DownloadBanners + // panel2 // - resources.ApplyResources(this.DownloadBanners, "DownloadBanners"); - this.DownloadBanners.Name = "DownloadBanners"; - this.DownloadBanners.UseVisualStyleBackColor = true; - this.DownloadBanners.Click += new System.EventHandler(this.DownloadBanners_Click); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.DefaultImageInterpolation); + this.panel2.Controls.Add(this.line2); + this.panel2.Controls.Add(this.AutoLibRetro); + resources.ApplyResources(this.panel2, "panel2"); + this.panel2.Name = "panel2"; + // + // leftSeparator + // + this.leftSeparator.BackColor = System.Drawing.SystemColors.ControlDark; + resources.ApplyResources(this.leftSeparator, "leftSeparator"); + this.leftSeparator.Name = "leftSeparator"; // // SettingsForm // this.AcceptButton = this.OK; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.CancelButton = this.Cancel; - this.Controls.Add(this.panel3); - this.Controls.Add(this.tabControl1); + resources.ApplyResources(this, "$this"); + this.Controls.Add(this.bottomPanel2); + this.Controls.Add(this.leftSeparator); + this.Controls.Add(this.TreeView); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel4); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.KeyPreview = true; this.MaximizeBox = false; @@ -273,39 +273,35 @@ private void InitializeComponent() this.Name = "SettingsForm"; this.ShowIcon = false; this.ShowInTaskbar = false; - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.tabPage1.PerformLayout(); - this.tabPage3.ResumeLayout(false); + this.Load += new System.EventHandler(this.Loading); + this.Shown += new System.EventHandler(this.Loading); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.n64004.ResumeLayout(false); + this.bottomPanel1.ResumeLayout(false); + this.bottomPanel2.ResumeLayout(false); this.panel1.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.DebugTab.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); this.ResumeLayout(false); } #endregion - - private TabControls.DotNetBarTabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button OK; private System.Windows.Forms.Button Cancel; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Panel bottomPanel1; + private System.Windows.Forms.Panel bottomPanel2; private System.Windows.Forms.ComboBox DefaultImageInterpolation; private System.Windows.Forms.Label label2; private System.Windows.Forms.CheckBox AutoLibRetro; - private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel line1; private System.Windows.Forms.ComboBox LanguageList; private System.Windows.Forms.CheckBox AutoOpenFolder; - private System.Windows.Forms.Panel panel4; - private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.TabPage tabPage4; + private System.Windows.Forms.Panel line2; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.CheckBox n64003; private System.Windows.Forms.CheckBox n64002; @@ -313,7 +309,12 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox n64000; private System.Windows.Forms.GroupBox n64004; private System.Windows.Forms.ComboBox ROMCType; - private System.Windows.Forms.TabPage DebugTab; private System.Windows.Forms.Button DownloadBanners; + private System.Windows.Forms.TreeView TreeView; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel leftSeparator; + private System.Windows.Forms.CheckBox checkBox1; } } \ No newline at end of file diff --git a/FriishProduce/Subforms/SettingsForm.cs b/FriishProduce/Subforms/SettingsForm.cs index a22654f9..585c7354 100644 --- a/FriishProduce/Subforms/SettingsForm.cs +++ b/FriishProduce/Subforms/SettingsForm.cs @@ -21,11 +21,40 @@ public SettingsForm() InitializeComponent(); isDirty = false; + // ------------------------------------------- + // Add all languages + // ------------------------------------------- + LanguageList.Items[0] = "<" + LanguageList.Items[0].ToString() + ">"; + foreach (var item in Language.List) + LanguageList.Items.Add(item.Value); + + RefreshForm(); + } + + public void RefreshForm() + { Language.AutoSetForm(this); Text = Language.Get("Settings"); - tabPage4.Text = string.Format(tabPage2.Text, Language.Get("PlatformGroup_1")); - tabPage3.Text = string.Format(tabPage2.Text, Language.Get("Platform_N64")); - tabPage2.Text = string.Format(tabPage2.Text, Language.Get("Platform_NES")); + TreeView.Nodes[1].Nodes[0].Text = Language.Get("Platform_NES"); + TreeView.Nodes[1].Nodes[1].Text = Language.Get("Platform_N64"); + TreeView.Nodes[1].Nodes[2].Text = Language.Get("PlatformGroup_1"); + TreeView.SelectedNode = TreeView.Nodes[0]; + + // ----------------------------- + + if (Default.UI_Language == "sys") LanguageList.SelectedIndex = 0; + else LanguageList.SelectedIndex = Language.List.Keys.ToList().IndexOf(Default.UI_Language) + 1; + + DefaultImageInterpolation.Items.Clear(); + DefaultImageInterpolation.Items.Add(Language.Get("ByDefault")); + DefaultImageInterpolation.Items.AddRange(Language.GetArray("List_ImageInterpolation")); + DefaultImageInterpolation.SelectedIndex = Default.ImageInterpolation; + + AutoLibRetro.Checked = Default.AutoLibRetro; + AutoOpenFolder.Checked = Default.AutoOpenFolder; + checkBox1.Checked = false; + + // ----------------------------- const string Name_N64 = "Options_VC_N64"; n64000.Text = Language.Get(n64000, Name_N64); @@ -34,36 +63,20 @@ public SettingsForm() n64003.Text = Language.Get(n64003, Name_N64); n64004.Text = Language.Get(n64004, Name_N64); groupBox1.Text = Language.Get(groupBox1, Name_N64); + ROMCType.Items.Clear(); ROMCType.Items.AddRange(new string[] { Language.Get($"{ROMCType.Name}.Items", Name_N64), Language.Get($"{ROMCType.Name}.Items1", Name_N64) }); + // ----------------------------- + n64000.Checked = Default.Default_N64_FixBrightness; n64001.Checked = Default.Default_N64_FixCrashes; n64002.Checked = Default.Default_N64_ExtendedRAM; n64003.Checked = Default.Default_N64_AllocateROM; ROMCType.SelectedIndex = Default.Default_N64_ROMC0 ? 0 : 1; - - // ----------------------------- - - // ------------------------------------------- - // Add all languages - // ------------------------------------------- - LanguageList.Items[0] = "<" + LanguageList.Items[0].ToString() + ">"; - foreach (var item in Language.List) - LanguageList.Items.Add(item.Value); - var x = Default.UI_Language; - - if (Default.UI_Language == "sys") LanguageList.SelectedIndex = 0; - else LanguageList.SelectedIndex = Language.List.Keys.ToList().IndexOf(Default.UI_Language) + 1; - - // ----------------------------- - - DefaultImageInterpolation.Items[0] = Language.Get("ByDefault"); - DefaultImageInterpolation.Items.AddRange(Language.GetArray("List_ImageInterpolation")); - DefaultImageInterpolation.SelectedIndex = Default.ImageInterpolation; - AutoLibRetro.Checked = Default.AutoLibRetro; - AutoOpenFolder.Checked = Default.AutoOpenFolder; } + private void Loading(object sender, EventArgs e) { TreeView.Select(); RefreshForm(); } + private void OK_Click(object sender, EventArgs e) { // ------------------------------------------- @@ -91,12 +104,19 @@ private void OK_Click(object sender, EventArgs e) Default.Default_N64_AllocateROM = n64003.Checked; Default.Default_N64_ROMC0 = ROMCType.SelectedIndex == 0; + // ------------------------------------------- + + if (checkBox1.Checked) + { + Default.DoNotShow_000 = false; + } + // ------------------------------------------- // Restart message box & save changes // ------------------------------------------- if (isDirty) { - if (MessageBox.Show(Language.Get("Message000"), ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + if (MessageBox.Show(Language.Get("Message000"), ProductName, MessageBoxButtons.YesNo) == DialogResult.Yes) { Default.Save(); Application.Restart(); @@ -109,7 +129,12 @@ private void OK_Click(object sender, EventArgs e) } } - private void Cancel_Click(object sender, EventArgs e) => DialogResult = DialogResult.Cancel; + private void Cancel_Click(object sender, EventArgs e) + { + Default.Reload(); + Language.Current = Default.UI_Language.ToLower() == "sys" ? Language.GetSystemLanguage() : new System.Globalization.CultureInfo(Default.UI_Language); + DialogResult = DialogResult.Cancel; + } private void DownloadBanners_Click(object sender, EventArgs e) { @@ -137,5 +162,51 @@ private void DownloadBanners_Click(object sender, EventArgs e) System.Media.SystemSounds.Beep.Play(); } + + private void TreeView_AfterSelect(object sender, TreeViewEventArgs e) + { + panel1.Hide(); + panel2.Hide(); + panel4.Hide(); + + switch (e.Node.Name.Substring(4)) + { + default: + case "0": + panel1.Show(); + break; + + case "1": + panel2.Show(); + break; + + case "NES": + break; + + case "N64": + panel4.Show(); + break; + + case "SEGA": + break; + }; + } + + private void LanguageList_SelectedIndexChanged(object sender, EventArgs e) + { + // ------------------------------------------- + // Language setting + // ------------------------------------------- + if (LanguageList.SelectedIndex == 0) + Default.UI_Language = "sys"; + else + foreach (var item in Language.List) + if (item.Value == LanguageList.SelectedItem.ToString()) + Default.UI_Language = item.Key; + + Language.Current = LanguageList.SelectedIndex == 0 ? Language.GetSystemLanguage() : new System.Globalization.CultureInfo(Default.UI_Language); + + RefreshForm(); + } } } diff --git a/FriishProduce/Subforms/SettingsForm.resx b/FriishProduce/Subforms/SettingsForm.resx index b6891941..c9f5b307 100644 --- a/FriishProduce/Subforms/SettingsForm.resx +++ b/FriishProduce/Subforms/SettingsForm.resx @@ -117,41 +117,37 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Left - - - 13, 120 + + 16, 40 - - 420, 1 + + 415, 1 - + 9 - - panel4 + + line2 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + panel2 - - 0 + + 2 null - 13, 87 + 16, 71 - 420, 21 + 416, 21 5 @@ -163,7 +159,7 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel2 1 @@ -174,11 +170,12 @@ TopLeft + NoControl - 13, 160 + 16, 77 221, 17 @@ -199,16 +196,16 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel1 - 2 + 4 True - 11, 69 + 14, 52 104, 13 @@ -226,19 +223,19 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel2 - 3 + 0 System default - 13, 25 + 16, 32 - 420, 21 + 416, 21 10 @@ -250,10 +247,10 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel1 - 4 + 5 True @@ -262,7 +259,7 @@ TopLeft - 13, 132 + 16, 13 255, 17 @@ -283,37 +280,37 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel2 - 5 + 3 - - 13, 58 + + 17, 65 - - 420, 1 + + 415, 1 - + 8 - - panel2 + + line1 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage1 + + panel1 - - 6 + + 3 True - 10, 7 + 14, 14 58, 13 @@ -334,60 +331,9 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage1 + panel1 - 7 - - - 159, 4 - - - 445, 454 - - - 0 - - - Application - - - tabPage1 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 0 - - - 159, 4 - - - 0, 0, 0, 0 - - - 445, 454 - - - 1 - - - Default (NES) - - - tabPage2 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - 1 @@ -547,7 +493,7 @@ 3 - 12, 8 + 14, 14 421, 110 @@ -565,7 +511,7 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage3 + panel4 0 @@ -592,7 +538,7 @@ 0 - 12, 124 + 14, 130 421, 50 @@ -610,64 +556,16 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage3 + panel4 1 - - 159, 4 - - - 445, 454 - - - 2 - - - Default (N64) - - - tabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 2 - - - 159, 4 - - - 445, 454 - - - 3 - - - Default (SEGA) - - - tabPage4 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 3 - - 12, 9 + 16, 155 - 421, 23 + 146, 25 0 @@ -682,67 +580,16 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - DebugTab + panel1 - 0 - - - 159, 4 - - - 3, 3, 3, 3 - - - 445, 454 - - - 4 - - - Debug - - - DebugTab - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 4 - - - 35, 155 - - - 0, 0 - - - 608, 462 - - - 0 - - - tabControl1 - - - TabControls.DotNetBarTabControl, FriishProduce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 + 2 System - 406, 12 + 411, 12 90, 23 @@ -760,7 +607,7 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel1 + bottomPanel1 1 @@ -769,7 +616,7 @@ System - 502, 12 + 507, 12 90, 23 @@ -787,22 +634,148 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel1 + bottomPanel1 0 - + Bottom - + 0, 1 + + 609, 47 + + + 3 + + + bottomPanel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bottomPanel2 + + + 0 + + + Bottom + + + 0, 364 + + + 609, 48 + + + 3 + + + bottomPanel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 0, 0 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5UcmVlTm9kZQkAAAAEVGV4dAtUb29sVGlwVGV4dAROYW1lCUlzQ2hlY2tl + ZApJbWFnZUluZGV4CEltYWdlS2V5ElNlbGVjdGVkSW1hZ2VJbmRleBBTZWxlY3RlZEltYWdlS2V5CkNo + aWxkQ291bnQBAQEAAAEAAQABCAgIAgAAAAYDAAAAC0FwcGxpY2F0aW9uBgQAAAAABgUAAAAFTm9kZTAA + /////wkEAAAA/////wkEAAAAAAAAAAs= + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB1TeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5UcmVlTm9kZQwAAAAEVGV4dAtUb29sVGlwVGV4dAROYW1lCUlzQ2hlY2tl + ZApJbWFnZUluZGV4CEltYWdlS2V5ElNlbGVjdGVkSW1hZ2VJbmRleBBTZWxlY3RlZEltYWdlS2V5CkNo + aWxkQ291bnQJY2hpbGRyZW4wCWNoaWxkcmVuMQljaGlsZHJlbjIBAQEAAAEAAQAEBAQBCAgIHVN5c3Rl + bS5XaW5kb3dzLkZvcm1zLlRyZWVOb2RlAgAAAB1TeXN0ZW0uV2luZG93cy5Gb3Jtcy5UcmVlTm9kZQIA + AAAdU3lzdGVtLldpbmRvd3MuRm9ybXMuVHJlZU5vZGUCAAAAAgAAAAYDAAAAEERlZmF1bHQgc2V0dGlu + Z3MGBAAAAAAGBQAAAAVOb2RlMQD/////CQQAAAD/////CQQAAAADAAAACQcAAAAJCAAAAAkJAAAABQcA + AAAdU3lzdGVtLldpbmRvd3MuRm9ybXMuVHJlZU5vZGUJAAAABFRleHQLVG9vbFRpcFRleHQETmFtZQlJ + c0NoZWNrZWQKSW1hZ2VJbmRleAhJbWFnZUtleRJTZWxlY3RlZEltYWdlSW5kZXgQU2VsZWN0ZWRJbWFn + ZUtleQpDaGlsZENvdW50AQEBAAABAAEAAQgICAIAAAAGCgAAAANORVMJBAAAAAYMAAAAB05vZGVORVMA + /////wkEAAAA/////wkEAAAAAAAAAAUIAAAAHVN5c3RlbS5XaW5kb3dzLkZvcm1zLlRyZWVOb2RlCQAA + AARUZXh0C1Rvb2xUaXBUZXh0BE5hbWUJSXNDaGVja2VkCkltYWdlSW5kZXgISW1hZ2VLZXkSU2VsZWN0 + ZWRJbWFnZUluZGV4EFNlbGVjdGVkSW1hZ2VLZXkKQ2hpbGRDb3VudAEBAQAAAQABAAEICAgCAAAABg4A + AAADTjY0CQQAAAAGEAAAAAdOb2RlTjY0AP////8JBAAAAP////8JBAAAAAAAAAAFCQAAAB1TeXN0ZW0u + V2luZG93cy5Gb3Jtcy5UcmVlTm9kZQkAAAAEVGV4dAtUb29sVGlwVGV4dAROYW1lCUlzQ2hlY2tlZApJ + bWFnZUluZGV4CEltYWdlS2V5ElNlbGVjdGVkSW1hZ2VJbmRleBBTZWxlY3RlZEltYWdlS2V5CkNoaWxk + Q291bnQBAQEAAAEAAQABCAgIAgAAAAYSAAAABFNFR0EJBAAAAAYUAAAACE5vZGVTRUdBAP////8JBAAA + AP////8JBAAAAAAAAAAL + + + + 160, 610 + + + 12 + + + TreeView + + + System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 16, 101 + + + 103, 17 + + + 12 + + + Reset all dialogs + + + checkBox1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + + 160, 0 + - 604, 47 + 449, 350 - 3 + 20 panel1 @@ -811,43 +784,79 @@ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - panel3 + $this - 0 + 3 - - Bottom + + 160, 0 - - 0, 414 + + 449, 350 - - 604, 48 + + 21 - - 3 + + panel4 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 - - panel3 + + 160, 0 - + + 449, 350 + + + 20 + + + panel2 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 0 + + 4 + + + 159, 0 + + + 1, 435 + + + 9 + + + leftSeparator + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 True - - 6, 13 - - 604, 462 + 609, 412 Tahoma, 8.25pt diff --git a/FriishProduce/_classes/Banner.cs b/FriishProduce/_classes/Banner.cs index 6aef9be6..1efcff2b 100644 --- a/FriishProduce/_classes/Banner.cs +++ b/FriishProduce/_classes/Banner.cs @@ -360,7 +360,7 @@ public static void ExportBanner(string tID, Console c) } catch (Exception ex) { - MessageBox.Show(Language.Get("Error"), ex.Message, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand); + MessageBox.Show(Language.Get("Error"), ex.Message, System.Windows.Forms.MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Error); } } diff --git a/FriishProduce/_classes/Injectors/WiiVC.cs b/FriishProduce/_classes/Injectors/WiiVC.cs index bb4ce318..806499bc 100644 --- a/FriishProduce/_classes/Injectors/WiiVC.cs +++ b/FriishProduce/_classes/Injectors/WiiVC.cs @@ -13,25 +13,7 @@ public abstract class InjectorWiiVC public int EmuType { get; set; } public IDictionary Settings { get; set; } - private string _rom; - private string ROMPath - { - get => _rom; - - set - { - // ----------------------- - // Check if raw ROM exists - // ----------------------- - if (!File.Exists(value)) - throw new FileNotFoundException(new FileNotFoundException().Message, value); - - _rom = value; - ROM = File.ReadAllBytes(_rom); - } - } - - protected byte[] ROM { get; private set; } + protected ROM ROM { get; set; } public string ManualPath { get; set; } protected string OrigManual { get; set; } @@ -48,6 +30,7 @@ private string ROMPath protected U8 MainContent { get; set; } public InjectorWiiVC() { } + protected virtual void Load() { Contents = new List(); @@ -237,9 +220,9 @@ public virtual WAD Write() return WAD; } - public WAD Inject(string ROM, string[] SaveDataTitle, TitleImage Img) + public WAD Inject(ROM ROM, string[] SaveDataTitle, TitleImage Img) { - ROMPath = ROM; + this.ROM = ROM; Load(); ReplaceROM(); diff --git a/FriishProduce/_classes/Injectors/WiiVC/N64.cs b/FriishProduce/_classes/Injectors/WiiVC/N64.cs index d25359d0..2e0b8f89 100644 --- a/FriishProduce/_classes/Injectors/WiiVC/N64.cs +++ b/FriishProduce/_classes/Injectors/WiiVC/N64.cs @@ -80,20 +80,20 @@ protected override void ReplaceROM() // Byte Swapped to Big Endian // **************** - if ((ROM[56] == 0x4E && ROM[57] == 0x00 && ROM[58] == 0x00 && ROM[59] == 0x00) - || (ROM[0] == 0x40 && ROM[1] == 0x12 && ROM[2] == 0x37 && ROM[3] == 0x80)) + if ((ROM.Bytes[56] == 0x4E && ROM.Bytes[57] == 0x00 && ROM.Bytes[58] == 0x00 && ROM.Bytes[59] == 0x00) + || (ROM.Bytes[0] == 0x40 && ROM.Bytes[1] == 0x12 && ROM.Bytes[2] == 0x37 && ROM.Bytes[3] == 0x80)) { - for (int i = 0; i < ROM.Length; i += 4) - (ROM[i], ROM[i + 1], ROM[i + 2], ROM[i + 3]) = (ROM[i + 3], ROM[i + 2], ROM[i + 1], ROM[i]); + for (int i = 0; i < ROM.Bytes.Length; i += 4) + (ROM.Bytes[i], ROM.Bytes[i + 1], ROM.Bytes[i + 2], ROM.Bytes[i + 3]) = (ROM.Bytes[i + 3], ROM.Bytes[i + 2], ROM.Bytes[i + 1], ROM.Bytes[i]); } // Little Endian to Big Endian // **************** - else if ((ROM[56] == 0x00 && ROM[57] == 0x00 && ROM[58] == 0x4E && ROM[59] == 0x00) - || (ROM[0] == 0x37 && ROM[1] == 0x80 && ROM[2] == 0x40 && ROM[3] == 0x12)) + else if ((ROM.Bytes[56] == 0x00 && ROM.Bytes[57] == 0x00 && ROM.Bytes[58] == 0x4E && ROM.Bytes[59] == 0x00) + || (ROM.Bytes[0] == 0x37 && ROM.Bytes[1] == 0x80 && ROM.Bytes[2] == 0x40 && ROM.Bytes[3] == 0x12)) { - for (int i = 0; i < ROM.Length; i += 2) - (ROM[i], ROM[i + 1]) = (ROM[i + 1], ROM[i]); + for (int i = 0; i < ROM.Bytes.Length; i += 2) + (ROM.Bytes[i], ROM.Bytes[i + 1]) = (ROM.Bytes[i + 1], ROM.Bytes[i]); } // ----------------------- @@ -101,7 +101,7 @@ protected override void ReplaceROM() // Maximum ROM limit allowed: 32 MB unless allocated in main.dol (maximum possible: ~56 MB) // ----------------------- double maxSize = Allocate ? 56623104 : 33554432; - if (ROM.Length > maxSize) + if (ROM.Bytes.Length > maxSize) throw new Exception(string.Format(Language.Get("Error003"), Math.Round(maxSize / 1048576).ToString(), Language.Get("Abbreviation_Megabytes"))); // ----------------------- @@ -110,7 +110,7 @@ protected override void ReplaceROM() switch (EmuType) { default: - MainContent.ReplaceFile(MainContent.GetNodeIndex("rom"), ROM); + MainContent.ReplaceFile(MainContent.GetNodeIndex("rom"), ROM.Bytes); break; case 3: @@ -118,14 +118,14 @@ protected override void ReplaceROM() // **************** if (WAD.UpperTitleID.ToUpper().StartsWith("NBD")) { - ROM[0x3B] = 0x4E; - ROM[0x3C] = 0x42; - ROM[0x3D] = 0x44; + ROM.Bytes[0x3B] = 0x4E; + ROM.Bytes[0x3C] = 0x42; + ROM.Bytes[0x3D] = 0x44; } // Temporary ROM file at working folder // **************** - File.WriteAllBytes(Paths.WorkingFolder + "rom", ROM); + File.WriteAllBytes(Paths.WorkingFolder + "rom", ROM.Bytes); // Compress using ROMC type // **************** @@ -355,8 +355,8 @@ private bool AllocateROM() // --------------------------------------------------------- // Check ROM size // **************** - int size_ROM = 1 + ROM.Length / 1024 / 1024; - if (size_ROM > 56) throw new Exception(string.Format(Language.Get("Error003"), "56", Language.Get("Abbreviation_Megabytes"))); + int NewSize = (1 + (ROM.Bytes.Length / 1048576)) * 1048576; + ROM.CheckSize(NewSize); // Check for offset // **************** @@ -369,7 +369,7 @@ private bool AllocateROM() // Set size value in bytes // **************** - var size = size_ROM.ToString("X2"); + var size = NewSize.ToString("X2"); var size_array = new byte[] { Convert.ToByte($"7{size[0]}", 16), diff --git a/FriishProduce/_classes/Injectors/WiiVC/NES.cs b/FriishProduce/_classes/Injectors/WiiVC/NES.cs index c76ae2b8..22a4b517 100644 --- a/FriishProduce/_classes/Injectors/WiiVC/NES.cs +++ b/FriishProduce/_classes/Injectors/WiiVC/NES.cs @@ -46,20 +46,15 @@ protected override void ReplaceROM() // ----------------------- int PRG = 16384 * Contents[1][offset + 4]; int CHR = 8192 * Contents[1][offset + 5]; - int ROMsize = PRG + CHR + 16; + ROM.MaxSize = PRG + CHR + 16; - // ----------------------- - // Check filesize of input ROM - // Maximum ROM limit allowed: 4 MB - // ----------------------- - if (ROM.Length > ROMsize) - throw new Exception(string.Format(Language.Get("Error003"), Math.Round((double)ROMsize / 1024).ToString(), Language.Get("Abbreviation_Kilobytes"))); + ROM.CheckSize(); // ----------------------- // Replace original ROM // ----------------------- - var targetROM = new byte[ROMsize]; - ROM.CopyTo(targetROM, 0); + var targetROM = new byte[ROM.MaxSize]; + ROM.Bytes.CopyTo(targetROM, 0); targetROM.CopyTo(Contents[1], offset); } diff --git a/FriishProduce/_classes/Injectors/WiiVC/NeoGeo.cs b/FriishProduce/_classes/Injectors/WiiVC/NeoGeo.cs index f35b9e82..0ca158b0 100644 --- a/FriishProduce/_classes/Injectors/WiiVC/NeoGeo.cs +++ b/FriishProduce/_classes/Injectors/WiiVC/NeoGeo.cs @@ -41,7 +41,7 @@ protected override void Load() if (Contents.Count >= 7) ManualIndex = U8.Load(WAD.Contents[5]); ReplaceManual(Contents.Count >= 7 ? ManualIndex : MainContent); - ZIP = ZipFile.Read(new MemoryStream(ROM)); + ZIP = ZipFile.Read(new MemoryStream(ROM.Bytes)); } /// diff --git a/FriishProduce/_classes/Injectors/WiiVC/SEGA.cs b/FriishProduce/_classes/Injectors/WiiVC/SEGA.cs index dc22fd46..67e3f908 100644 --- a/FriishProduce/_classes/Injectors/WiiVC/SEGA.cs +++ b/FriishProduce/_classes/Injectors/WiiVC/SEGA.cs @@ -368,12 +368,12 @@ protected override void ReplaceROM() // Maximum ROM limit allowed: 5.25 MB for Gen/MD or 512 KB for Master System // ----------------------- var maxSize = IsSMS ? 524288 : 5.25 * 1024 * 1024; - if (ROM.Length > maxSize) + if (ROM.Bytes.Length > maxSize) throw new Exception(string.Format(Language.Get("Error003"), IsSMS ? "512" : "5.25", IsSMS ? Language.Get("Abbreviation_Kilobytes") : Language.Get("Abbreviation_Megabytes"))); foreach (var item in Directory.EnumerateFiles(Paths.DataCCF)) if (Path.GetExtension(item).ToLower().StartsWith(".sgd") || Path.GetExtension(item).ToLower().StartsWith(".sms")) - File.WriteAllBytes(item, ROM); + File.WriteAllBytes(item, ROM.Bytes); } protected override void ReplaceSaveData(string[] lines, TitleImage tImg) diff --git a/FriishProduce/_classes/Injectors/WiiVC/SNES.cs b/FriishProduce/_classes/Injectors/WiiVC/SNES.cs index b9bfec19..be24b70b 100644 --- a/FriishProduce/_classes/Injectors/WiiVC/SNES.cs +++ b/FriishProduce/_classes/Injectors/WiiVC/SNES.cs @@ -15,9 +15,15 @@ public class SNES : InjectorWiiVC protected override void Load() { + // ----------------------- + // Maximum ROM limit allowed: 4 MB + // ----------------------- + NeedsMainDOL = true; MainContentIndex = 5; NeedsManualLoaded = true; + ROM.MaxSize = 4194304; + base.Load(); GetID(); @@ -28,12 +34,7 @@ protected override void Load() /// protected override void ReplaceROM() { - // ----------------------- - // Check filesize - // Maximum ROM limit allowed: 4 MB - // ----------------------- - if (ROM.Length > 4194304) - throw new Exception(string.Format(Language.Get("Error003"), "4", Language.Get("Abbreviation_Megabytes"))); + ROM.CheckSize(); // ----------------------- // Replace original ROM @@ -41,13 +42,13 @@ protected override void ReplaceROM() // Normal // **************** - if (Target.Length == 8) MainContent.ReplaceFile(MainContent.GetNodeIndex(Target), ROM); + if (Target.Length == 8) MainContent.ReplaceFile(MainContent.GetNodeIndex(Target), ROM.Bytes); // LZ77 compression // **************** else if (Target.ToUpper().StartsWith("LZ77")) { - File.WriteAllBytes(Paths.WorkingFolder + "rom", ROM); + File.WriteAllBytes(Paths.WorkingFolder + "rom", ROM.Bytes); File.WriteAllBytes(Paths.WorkingFolder + "LZ77orig.rom", MainContent.Data[MainContent.GetNodeIndex(Target)]); Process.Run diff --git a/FriishProduce/_classes/Language.cs b/FriishProduce/_classes/Language.cs index 86c3d3b6..1499e773 100644 --- a/FriishProduce/_classes/Language.cs +++ b/FriishProduce/_classes/Language.cs @@ -246,7 +246,7 @@ public static void Load() /// English version by default if no corresponding localized string is found, and "undefined" if all methods fail. public static string Get(string name, string source, bool isControl = false) { - if (isControl) name += ".Text"; + if (isControl && !name.EndsWith(".Text")) name += ".Text"; int index = -1; for (int i = 0; i < Sources.Count; i++) @@ -327,12 +327,34 @@ public static void AutoSetForm(Control c) } } } + } private static void GetControl(Control x, Control parent, bool customStrings = true) { if (x.GetType() == typeof(Form) && x.Name != parent.Name) return; else if (x.GetType() == typeof(MdiTabControl.TabPage) && (x as MdiTabControl.TabPage).Form.GetType().Name != parent.Name) return; + else if (x.GetType() == typeof(TreeView)) + { + foreach (TreeNode d in (x as TreeView).Nodes) + { + if (!string.IsNullOrWhiteSpace(d.Name) && Get(d.Name, parent) != "undefined") + d.Text = Get(d.Name, parent); + + foreach (TreeNode e in d.Nodes) + { + if (!string.IsNullOrWhiteSpace(e.Name) && Get(e.Name, parent) != "undefined") + e.Text = Get(e.Name, parent); + + foreach (TreeNode f in e.Nodes) + { + if (!string.IsNullOrWhiteSpace(f.Name) && Get(f.Name, parent) != "undefined") + f.Text = Get(f.Name, parent); + } + } + } + } + if (!string.IsNullOrWhiteSpace(x.Name) && Get(x.Name, parent) != "undefined") x.Text = Get(x.Name, parent); diff --git a/FriishProduce/_classes/MessageBox.cs b/FriishProduce/_classes/MessageBox.cs index f6bbca24..63b49e53 100644 --- a/FriishProduce/_classes/MessageBox.cs +++ b/FriishProduce/_classes/MessageBox.cs @@ -10,91 +10,86 @@ namespace FriishProduce { public static class MessageBox { - public static DialogResult Show(string mainText, string description, MessageBoxButtons buttons, MessageBoxIcon icon) + public static DialogResult Show(string mainText, string description, MessageBoxButtons buttons, TaskDialogIcon icon = 0, int dontShow = -1) { - TaskDialog t = new TaskDialog() + using (TaskDialog t = new TaskDialog() { WindowTitle = Language.Get("_AppTitle"), MainInstruction = mainText, Content = description, AllowDialogCancellation = false - }; - - var lines = mainText.Replace("\r\n", "\n").Split('\n'); - if (lines.Length >= 2) - { - var secondary = new List(); - - for (int i = 1; i < lines.Length; i++) - secondary.Add(lines[i]); - - t.MainInstruction = lines[0]; - t.Content = string.Join("\n", secondary.ToArray()); - } - - var O = new TaskDialogButton { Text = Language.Get("Button_OK") }; - var C = new TaskDialogButton { Text = Language.Get("Button_Cancel") }; - var Y = new TaskDialogButton { Text = Language.Get("Button_Yes") }; - var N = new TaskDialogButton { Text = Language.Get("Button_No") }; - - switch (buttons) + }) { - default: - case MessageBoxButtons.OK: - case MessageBoxButtons.AbortRetryIgnore: - case MessageBoxButtons.RetryCancel: - t.Buttons.Add(O); - break; - - case MessageBoxButtons.OKCancel: - t.Buttons.Add(O); - t.Buttons.Add(C); - break; - - case MessageBoxButtons.YesNo: - t.Buttons.Add(Y); - t.Buttons.Add(N); - break; - - case MessageBoxButtons.YesNoCancel: - t.Buttons.Add(Y); - t.Buttons.Add(N); - t.Buttons.Add(C); - break; + var lines = mainText.Replace("\r\n", "\n").Split('\n'); + if (lines.Length >= 2) + { + var secondary = new List(); + + for (int i = 1; i < lines.Length; i++) + secondary.Add(lines[i]); + + t.MainInstruction = lines[0]; + t.Content = string.Join("\n", secondary.ToArray()); + } + + var O = new TaskDialogButton { Text = Language.Get("Button_OK") }; + var C = new TaskDialogButton { Text = Language.Get("Button_Cancel") }; + var Y = new TaskDialogButton { Text = Language.Get("Button_Yes") }; + var N = new TaskDialogButton { Text = Language.Get("Button_No") }; + + switch (buttons) + { + default: + case MessageBoxButtons.OK: + case MessageBoxButtons.AbortRetryIgnore: + case MessageBoxButtons.RetryCancel: + t.Buttons.Add(O); + break; + + case MessageBoxButtons.OKCancel: + t.Buttons.Add(O); + t.Buttons.Add(C); + break; + + case MessageBoxButtons.YesNo: + t.Buttons.Add(Y); + t.Buttons.Add(N); + break; + + case MessageBoxButtons.YesNoCancel: + t.Buttons.Add(Y); + t.Buttons.Add(N); + t.Buttons.Add(C); + break; + } + + switch (icon) + { + case 0: + break; + + default: + t.MainIcon = icon; + break; + } + + if (dontShow >= 0) { t.VerificationText = Language.Get("DoNotShow"); } + + var text = t.ShowDialog().Text; + + if (t.IsVerificationChecked && dontShow >= 0) { Properties.Settings.Default[$"DoNotShow_{dontShow:000}"] = true; Properties.Settings.Default.Save(); } + + if (text == Language.Get("Button_Cancel")) return DialogResult.Cancel; + if (text == Language.Get("Button_Yes")) return DialogResult.Yes; + if (text == Language.Get("Button_No")) return DialogResult.No; + return DialogResult.OK; } - - switch (icon) - { - case MessageBoxIcon.None: - case MessageBoxIcon.Question: - break; - - case MessageBoxIcon.Hand: - t.MainIcon = TaskDialogIcon.Error; - break; - - case MessageBoxIcon.Exclamation: - t.MainIcon = TaskDialogIcon.Warning; - break; - - case MessageBoxIcon.Asterisk: - t.MainIcon = TaskDialogIcon.Information; - break; - } - - var text = t.ShowDialog().Text; - if (text == Language.Get("Button_Cancel")) return DialogResult.Cancel; - if (text == Language.Get("Button_Yes")) return DialogResult.Yes; - if (text == Language.Get("Button_No")) return DialogResult.No; - return DialogResult.OK; } - public static DialogResult Show(string mainText, MessageBoxButtons buttons, MessageBoxIcon icon) => Show(mainText, null, buttons, icon); - - public static DialogResult Show(string mainText, string description, MessageBoxButtons buttons) => Show(mainText, description, buttons, MessageBoxIcon.None); + public static DialogResult Show(string mainText, MessageBoxButtons buttons = MessageBoxButtons.OK, TaskDialogIcon icon = 0, int dontShow = -1) => Show(mainText, null, buttons, icon, dontShow); - public static DialogResult Show(string mainText, MessageBoxButtons buttons) => Show(mainText, null, buttons, MessageBoxIcon.None); + public static void Show(string mainText, string description, int dontShow = -1) => Show(mainText, description, MessageBoxButtons.OK, 0, dontShow); - public static void Show(string mainText, string description = null) => Show(mainText, description, MessageBoxButtons.OK, MessageBoxIcon.None); + public static void Show(string mainText, int dontShow) => Show(mainText, null, MessageBoxButtons.OK, 0, dontShow); } } diff --git a/FriishProduce/_classes/ROM.cs b/FriishProduce/_classes/ROM.cs index 96d4239c..967ac05b 100644 --- a/FriishProduce/_classes/ROM.cs +++ b/FriishProduce/_classes/ROM.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace FriishProduce { @@ -26,7 +23,25 @@ public string Path Bytes = File.ReadAllBytes(_rom); } } - public byte[] Bytes { get; set; } + + public int MaxSize { get; set; } + + public ROM(string path) => Path = path; + + public bool CheckSize(int length) + { + if (Bytes.Length > length) + { + bool isMB = length >= 1048576; + throw new Exception(string.Format(Language.Get("Error003"), + Math.Round((double)length / (isMB ? 1048576 : 1024)).ToString(), + isMB ? Language.Get("Abbreviation_Megabytes") : Language.Get("Abbreviation_Kilobytes"))); + } + + return true; + } + + public bool CheckSize() => CheckSize(MaxSize); } } diff --git a/FriishProduce/_classes/TitleImage.cs b/FriishProduce/_classes/TitleImage.cs index 302e7cb6..b1379798 100644 --- a/FriishProduce/_classes/TitleImage.cs +++ b/FriishProduce/_classes/TitleImage.cs @@ -83,7 +83,7 @@ public Bitmap LoadToSource(string path) } catch (Exception ex) { - MessageBox.Show(ex.Message, Language.Get("Error"), System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand); + MessageBox.Show(ex.Message, Language.Get("Error"), System.Windows.Forms.MessageBoxButtons.OK, Ookii.Dialogs.WinForms.TaskDialogIcon.Error); return null; } } diff --git a/FriishProduce/_classes/Update.cs b/FriishProduce/_classes/Update.cs new file mode 100644 index 00000000..8070f911 --- /dev/null +++ b/FriishProduce/_classes/Update.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Octokit; +using Ookii.Dialogs.WinForms; + +namespace FriishProduce +{ + public class Update + { + public static async void GetLatest() + { + var client = new GitHubClient(new ProductHeaderValue("FriishProduce")); + var releases = await client.Repository.Release.GetAll("CatmanFan", "FriishProduce"); + + System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); + System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location); + + Version latest = new Version(releases[0].TagName.Substring(1).Replace("-beta", "")); + Version current = new Version(fvi.FileVersion.Substring(0, 3)); + var diff = current.CompareTo(latest); + + if (current.CompareTo(latest) < 0) + { + if (MessageBox.Show( + "An update is available", + $"Version {latest} is available for download.\nYou are currently running version {current}.\n\nWould you like to update now?", + System.Windows.Forms.MessageBoxButtons.YesNo, + TaskDialogIcon.Shield) == System.Windows.Forms.DialogResult.Yes) + { + // ************************* + // TO-DO + // ************************* + ; + } + } + } + } +} diff --git a/FriishProduce/packages.config b/FriishProduce/packages.config index 2bb1c96c..daa0ebeb 100644 --- a/FriishProduce/packages.config +++ b/FriishProduce/packages.config @@ -5,6 +5,7 @@ +