diff --git a/FriishProduce/MainForm.Designer.cs b/FriishProduce/MainForm.Designer.cs index 64b2728..38684fa 100644 --- a/FriishProduce/MainForm.Designer.cs +++ b/FriishProduce/MainForm.Designer.cs @@ -106,7 +106,7 @@ private void InitializeComponent() // // mainPanel // - this.mainPanel.BackColor = System.Drawing.SystemColors.Control; + this.mainPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(238))))); this.mainPanel.Controls.Add(this.Logo); resources.ApplyResources(this.mainPanel, "mainPanel"); this.mainPanel.Name = "mainPanel"; @@ -135,7 +135,6 @@ private void InitializeComponent() this.toolbarExport, this.toolbarPreferences}); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Paint += new System.Windows.Forms.PaintEventHandler(this.ToolStrip_Paint); // // toolbarNewProject // diff --git a/FriishProduce/MainForm.cs b/FriishProduce/MainForm.cs index 98d7c8e..f8a675c 100644 --- a/FriishProduce/MainForm.cs +++ b/FriishProduce/MainForm.cs @@ -94,12 +94,29 @@ private ToolStripItem[] platformsStripItemList() /// private void RefreshForm() { + #region -- Appearance -- + + if (Theme.ChangeColors(this, false)) + { + if (mainPanel.BackgroundImage == null) + tabControl.BackgroundImage = mainPanel.BackgroundImage = Theme.GenerateBG(ClientRectangle); + tabControl.BackgroundImageLayout = mainPanel.BackgroundImageLayout = ImageLayout.Stretch; + + toolStrip.Renderer = new Theme.CustomToolStrip(); + tabControl.BackHighColor = tabControl.BackLowColor = Color.Transparent; + tabControl.TabBackHighColor = Theme.Colors.Form.BG; + tabControl.TabBackLowColor = Theme.Colors.Form.BG; + } + + #endregion + new_project.MenuItems.Clear(); new_project.MenuItems.AddRange(platformsMenuItemList()); toolbarNewProject.DropDownItems.Clear(); toolbarNewProject.DropDownItems.AddRange(platformsStripItemList()); - #region Localization + #region -- Localization -- + Program.Lang.Control(this); Text = Program.Lang.ApplicationTitle; about.Text = Program.Lang.Format(("about_app", null), Program.Lang.ApplicationTitle); @@ -147,6 +164,7 @@ private void RefreshForm() try { BrowseProject.Filter = SaveProject.Filter = Program.Lang.String("filter.project"); } catch { MessageBox.Show("Warning!\nThe language strings have not been loaded correctly.\n\nSeveral items may show up as 'undefined'.\n\nOther exceptions related to strings or filters can also occur!", MessageBox.Buttons.Ok, MessageBox.Icons.Warning, false); } + #endregion if (Program.DebugMode) @@ -193,7 +211,6 @@ private void MainForm_Loading(object sender, EventArgs e) { ClientSize = new Size(pF.Width, pF.Height + h); MinimumSize = MaximumSize = Size; - tabControl.TabBackLowColor = pF.BackColor; } mainPanel.Size = tabControl.Size = new Size(Width - w, Height - h); @@ -225,21 +242,8 @@ private void MainForm_Closing(object sender, FormClosingEventArgs e) return; } - var collection = tabControl.TabPages; - - for (int i = 0; i < collection.Count; i++) - { - var p = tabControl.TabPages[i]; - var f = p.Form as ProjectForm; - - if (f.IsModified) - { - tabControl.TabPages[tabControl.TabPages.get_IndexOf(p)].Select(); - - if (!f.CheckUnsaved()) - e.Cancel = true; - } - } + CloseAll_Click(sender, new EventArgs()); + e.Cancel = tabControl.TabPages.Count > 0; } /// @@ -427,10 +431,10 @@ private void TabContextMenu_Opening(object sender, CancelEventArgs e) private void CloseAll_Click(object sender, EventArgs e) { - List
list = new(); + List list = new(); for (int i = 0; i < tabControl.TabPages.Count; i++) - list.Add(tabControl.TabPages[i].Form as Form); + list.Add(tabControl.TabPages[i].Form as ProjectForm); foreach (var tab in list) tab.Close(); @@ -438,7 +442,11 @@ private void CloseAll_Click(object sender, EventArgs e) private void About_Click(object sender, EventArgs e) { using var about = new About(); about.ShowDialog(); } - private void MenuItem_Exit_Click(object sender, EventArgs e) => Application.Exit(); + private void MenuItem_Exit_Click(object sender, EventArgs e) + { + Close(); + Application.Exit(); + } private void ExportWAD_Click(object sender, EventArgs e) { @@ -980,13 +988,6 @@ private void ExtractWAD_Click(object sender, EventArgs e) } } - private void ToolStrip_Paint(object sender, PaintEventArgs e) - { - Rectangle r = new(e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width, e.ClipRectangle.Height + 5); - using var b = new System.Drawing.Drawing2D.LinearGradientBrush(new Point(0, 0), new Point(0, r.Height), Color.White, Color.Gainsboro); - e.Graphics.FillRectangle(b, r); - } - private void TabControl_Paint(object sender, JacksiroKe.MdiTabCtrl.TabControl.TabPaintEventArgs e) { e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; diff --git a/FriishProduce/MainForm.resx b/FriishProduce/MainForm.resx index 0e54bc0..6e44240 100644 --- a/FriishProduce/MainForm.resx +++ b/FriishProduce/MainForm.resx @@ -120,24 +120,6 @@ 469, 17 - - - NoControl - - - - 0, 0 - - - 175, 175 - - - AutoSize - - - - 0 - Logo @@ -150,15 +132,18 @@ 0 + Fill + 0, 25 1008, 479 + 6 @@ -174,6 +159,33 @@ 0 + + NoControl + + + 0, 0 + + + 175, 175 + + + AutoSize + + + 0 + + + Logo + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mainPanel + + + 0 + 17, 17 @@ -441,105 +453,9 @@ 115, 17 - - CtrlN - - - new_project - - - - - - - CtrlO - - - open_project - - - open_recent - - - False - - - CtrlS - - - save_project - - - False - - - CtrlShiftS - - - save_project_as - - - - - - - False - - - CtrlF4 - - - close_project - - - False - - - CtrlShiftF4 - - - close_all - - - - - - - AltF4 - - - exit - file - - False - - - Ctrl0 - - - import_game_file - - - - - - - False - - - CtrlG - - - game_scan - - - False - - - CtrlE - - - export - project @@ -3177,36 +3093,12 @@ - - - extract_wad_banner - - - extract_wad_icon - - - extract_wad_sound - - - extract_wad_manual - extract_from_wad tools - - check_for_updates - - - auto_update - - - - - - - clear_update - updater @@ -3261,4 +3153,124 @@ help + + CtrlN + + + new_project + + + - + + + CtrlO + + + open_project + + + open_recent + + + False + + + CtrlS + + + save_project + + + False + + + CtrlShiftS + + + save_project_as + + + - + + + False + + + CtrlF4 + + + close_project + + + False + + + CtrlShiftF4 + + + close_all + + + - + + + AltF4 + + + exit + + + False + + + Ctrl0 + + + import_game_file + + + - + + + False + + + CtrlG + + + game_scan + + + False + + + CtrlE + + + export + + + extract_wad_banner + + + extract_wad_icon + + + extract_wad_sound + + + extract_wad_manual + + + check_for_updates + + + auto_update + + + - + + + clear_update + \ No newline at end of file diff --git a/FriishProduce/ProjectForm.cs b/FriishProduce/ProjectForm.cs index 303593c..e1e609f 100644 --- a/FriishProduce/ProjectForm.cs +++ b/FriishProduce/ProjectForm.cs @@ -464,6 +464,11 @@ public void RefreshForm() bool isMint = _isMint || !Program.MainForm.save_project_as.Enabled; + if (Theme.ChangeColors(this, false)) + { + BaseRegion.BackColor = Theme.Colors.Form.Bottom; + } + #region ------------------------------------------ Localization: Controls ------------------------------------------ Program.Lang.Control(this, "projectform"); Font = Program.MainForm.Font; @@ -1109,6 +1114,11 @@ private void isClosing(object sender, FormClosingEventArgs e) preview.Dispose(); preview = null; + + GC.Collect(); + GC.WaitForPendingFinalizers(); + + try { Dispose(); } catch { } } } @@ -1131,7 +1141,6 @@ public bool CheckUnsaved() case MessageBox.Result.No: case MessageBox.Result.Button2: - IsModified = false; return true; default: diff --git a/FriishProduce/SettingsForm.Designer.cs b/FriishProduce/SettingsForm.Designer.cs index 1d7953e..2e0abd8 100644 --- a/FriishProduce/SettingsForm.Designer.cs +++ b/FriishProduce/SettingsForm.Designer.cs @@ -152,6 +152,7 @@ private void InitializeComponent() this.vc_snes_patch_nodark = new System.Windows.Forms.CheckBox(); this.vc_snes_patch_nosuspend = new System.Windows.Forms.CheckBox(); this.vc_snes_patch_volume = new System.Windows.Forms.CheckBox(); + this.border = new System.Windows.Forms.Panel(); this.vc_n64_options.SuspendLayout(); this.bottomPanel2.SuspendLayout(); this.bottomPanel1.SuspendLayout(); @@ -296,6 +297,7 @@ private void InitializeComponent() // // TreeView // + this.TreeView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.TreeView.FullRowSelect = true; this.TreeView.HotTracking = true; resources.ApplyResources(this.TreeView, "TreeView"); @@ -1213,6 +1215,12 @@ private void InitializeComponent() this.vc_snes_patch_volume.Tag = "patch_volume"; this.vc_snes_patch_volume.UseVisualStyleBackColor = true; // + // border + // + this.border.BackColor = System.Drawing.SystemColors.ActiveBorder; + resources.ApplyResources(this.border, "border"); + this.border.Name = "border"; + // // SettingsForm // this.AcceptButton = this.b_ok; @@ -1221,7 +1229,6 @@ private void InitializeComponent() resources.ApplyResources(this, "$this"); this.ControlBox = false; this.Controls.Add(this.bottomPanel2); - this.Controls.Add(this.TreeView); this.Controls.Add(this.vc_pce); this.Controls.Add(this.vc_neo); this.Controls.Add(this.default_injection_methods); @@ -1234,6 +1241,8 @@ private void InitializeComponent() this.Controls.Add(this.vc_snes); this.Controls.Add(this.vc_n64); this.Controls.Add(this.vc_sega); + this.Controls.Add(this.border); + this.Controls.Add(this.TreeView); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.KeyPreview = true; this.MaximizeBox = false; @@ -1431,5 +1440,6 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox vc_snes_patch_wiimote; private System.Windows.Forms.CheckBox vc_snes_patch_gcremap; private ImageLabel vc_pce_note; + private System.Windows.Forms.Panel border; } } \ No newline at end of file diff --git a/FriishProduce/SettingsForm.cs b/FriishProduce/SettingsForm.cs index cefad9a..d29983f 100644 --- a/FriishProduce/SettingsForm.cs +++ b/FriishProduce/SettingsForm.cs @@ -33,6 +33,15 @@ public void RefreshForm() Program.Lang.Control(vc_neo); Program.Lang.Control(adobe_flash); + Theme.BtnSizes(b_ok, b_cancel); + Theme.BtnLayout(this, b_ok, b_cancel); + if (Theme.ChangeColors(this, false)) + { + border.BackColor = bottomPanel2.BackColor = Theme.Colors.Form.Border; + TreeView.ForeColor = ForeColor = Theme.Colors.Text; + TreeView.BackColor = Theme.Colors.Dialog.BG; + } + TreeView.Nodes[0].Text = Program.Lang.String(TreeView.Nodes[0].Tag.ToString(), Tag.ToString()); TreeView.Nodes[1].Text = Program.Lang.String(TreeView.Nodes[1].Tag.ToString(), Tag.ToString()); TreeView.Nodes[2].Text = Program.Lang.String(TreeView.Nodes[2].Tag.ToString(), Tag.ToString()); diff --git a/FriishProduce/SettingsForm.resx b/FriishProduce/SettingsForm.resx index 4210fc0..1d42c83 100644 --- a/FriishProduce/SettingsForm.resx +++ b/FriishProduce/SettingsForm.resx @@ -143,6 +143,90 @@ 0 + + vc_n64_patch_cleantextures + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64_options + + + 0 + + + vc_n64_patch_autosizerom + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64_options + + + 1 + + + vc_n64_patch_expandedram + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64_options + + + 2 + + + vc_n64_patch_fixcrashes + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64_options + + + 3 + + + vc_n64_patch_fixbrightness + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64_options + + + 4 + + + 12, 10 + + + 536, 134 + + + 18 + + + vc_options + + + vc_n64_options + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64 + + + 1 + True @@ -300,30 +384,6 @@ 4 - - 12, 10 - - - 536, 134 - - - 18 - - - vc_options - - - vc_n64_options - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - vc_n64 - - - 1 - 10, 18 @@ -345,23 +405,41 @@ 0 - - Bottom, Right + + bottomPanel1 - - NoControl + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 642, 9 + + bottomPanel2 - - 100, 23 + + 0 - - 2 + + Bottom - - &Cancel + + 0, 421 + + + 754, 41 + + + 3 + + + bottomPanel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 b_cancel @@ -375,24 +453,6 @@ 0 - - Bottom, Right - - - NoControl - - - 536, 9 - - - 100, 23 - - - 1 - - - &OK - b_ok @@ -412,7 +472,7 @@ 0, 1 - 754, 41 + 754, 40 3 @@ -429,35 +489,89 @@ 0 - - Bottom + + Bottom, Right - - 0, 420 + + True - - 754, 42 + + NoControl - - 3 + + 693, 8 - - bottomPanel2 + + 0, 24 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 24 - - $this + + 49, 24 - + + 2 + + + &Cancel + + + b_cancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bottomPanel1 + + 0 + + Bottom, Right + + + True + + + NoControl + + + 656, 8 + + + 0, 24 + + + 0, 24 + + + 31, 24 + + + 1 + + + &OK + + + b_ok + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bottomPanel1 + + + 1 + 15 - -1, -1 + 0, 0 @@ -536,7 +650,7 @@ - 195, 600 + 193, 500 12 @@ -551,28 +665,7 @@ $this - 1 - - - Bottom, Left - - - NoControl - - - 12, 258 - - - 536, 23 - - - 57 - - - Get VC banner files - - - False + 14 GetBanners @@ -586,7 +679,133 @@ 0 - + + use_online_wad_tip + + + FriishProduce.ImageLabel, FriishProduce, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null + + + panel1 + + + 1 + + + bypass_rom_size + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 2 + + + use_online_wad_enabled + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 3 + + + use_custom_database + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 4 + + + reset_all_dialogs + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 5 + + + language + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 6 + + + 194, 0 + + + 560, 410 + + + 20 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + Bottom, Left + + + NoControl + + + 12, 258 + + + 536, 23 + + + 57 + + + Get VC banner files + + + False + + + GetBanners + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + + 0 + + True @@ -769,26 +988,38 @@ 6 - + + vc_n64_romc_type + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_n64 + + + 0 + + 194, 0 - + 560, 410 - - 20 + + 21 - - panel1 + + vc_n64 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 7 + + 11 12, 150 @@ -814,41 +1045,50 @@ 0 - - 194, 0 + + forwarder_root_device - - 560, 410 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 21 + + forwarder - - vc_n64 + + 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + bios_settings - - $this + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 12 + + forwarder - - SD + + 1 - - USB + + 194, 0 - - 10, 18 + + 560, 410 - - 516, 21 + + 22 - - 27 + + forwarder + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 forwarder_type @@ -886,23 +1126,32 @@ 0 - - True + + SD - - NoControl + + USB - - 50, 20 + + 10, 18 - - 95, 13 + + 516, 21 - + 27 - - show_bios_screen + + forwarder_type + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + forwarder_root_device + + + 0 show_bios_screen @@ -916,15 +1165,6 @@ 0 - - 10, 20 - - - 35, 15 - - - 26 - toggleSwitch2 @@ -961,27 +1201,138 @@ 1 - + + True + + + NoControl + + + 50, 20 + + + 95, 13 + + + 27 + + + show_bios_screen + + + show_bios_screen + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_settings + + + 0 + + + 10, 20 + + + 35, 15 + + + 26 + + + toggleSwitch2 + + + JCS.ToggleSwitch, ToggleSwitch, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null + + + bios_settings + + + 1 + + + vc_nes_palette + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_nes + + + 0 + + 194, 0 - + 560, 410 - - 22 + + 23 - - forwarder + + vc_nes - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 9 + + vc_nes_palette_banner_usage + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_nes_palette + + + 0 + + + vc_nes_palettelist + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_nes_palette + + + 1 + + + 12, 10 + + + 536, 70 + + + 14 + + + palette + + + vc_nes_palette + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_nes + + + 0 + True @@ -1033,59 +1384,38 @@ 1 - - 12, 10 - - - 536, 70 - - - 14 - - - palette - - - vc_nes_palette + + vc_neo_bios - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - vc_nes + + vc_neo - + 0 - + 194, 0 - + 560, 410 - - 23 + + 24 - - vc_nes + + vc_neo - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 10 - - - 10, 18 - - - 516, 21 - - - 9 + + 2 vc_neo_bios_list @@ -1123,60 +1453,27 @@ 0 - - 194, 0 - - - 560, 410 - - - 24 - - - vc_neo - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - + 10, 18 - + 516, 21 - - 18 + + 9 - - vc_sega_countries + + vc_neo_bios_list - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - vc_sega_country + + vc_neo_bios - + 0 - - 12, 68 - - - 536, 50 - - - 22 - - - region - vc_sega_country @@ -1189,22 +1486,184 @@ 0 - - True + + vc_sega_system - - NoControl + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 10, 42 + + vc_sega - - 158, 17 + + 1 - - 20 + + vc_sega_display - + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega + + + 2 + + + 194, 0 + + + 560, 410 + + + 25 + + + vc_sega + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + + + vc_sega_countries + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_country + + + 0 + + + 12, 68 + + + 536, 50 + + + 22 + + + region + + + vc_sega_country + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega + + + 0 + + + 10, 18 + + + 516, 21 + + + 18 + + + vc_sega_countries + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_country + + + 0 + + + vc_sega_console_disableresetbutton + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_system + + + 0 + + + vc_sega_save_sram + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_system + + + 1 + + + vc_sega_dev_mdpad_enable_6b + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_system + + + 2 + + + 12, 124 + + + 536, 88 + + + 21 + + + vc_options + + + vc_sega_system + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega + + + 1 + + + True + + + NoControl + + + 10, 42 + + + 158, 17 + + + 20 + + console_disableresetbutton @@ -1279,29 +1738,53 @@ 2 - - 12, 124 + + label1 - - 536, 88 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 21 + + vc_sega_display - - vc_options + + 0 - - vc_sega_system + + SEGA_console_brightness - + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_sega_display + + + 1 + + + 12, 10 + + + 536, 52 + + + 15 + + + display + + + vc_sega_display + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + vc_sega - - 1 + + 2 True @@ -1360,50 +1843,74 @@ 1 - - 12, 10 + + vc_pce_note - - 536, 52 + + FriishProduce.ImageLabel, FriishProduce, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null - - 15 + + vc_pce - - display + + 0 - - vc_sega_display + + vc_pce_region_l - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - vc_sega - - - 2 + + vc_pce - - 194, 0 + + 1 - - 560, 410 + + vc_pce_system - - 25 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - vc_sega + + vc_pce - + + 2 + + + vc_pce_display + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce + + + 3 + + + 194, 0 + + + 560, 410 + + + 26 + + + vc_pce + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 13 + + 1 True @@ -1444,15 +1951,6 @@ 0 - - 10, 18 - - - 516, 21 - - - 18 - vc_pce_region @@ -1489,6 +1987,99 @@ 1 + + 10, 18 + + + 516, 21 + + + 18 + + + vc_pce_region + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_region_l + + + 0 + + + vc_pce_sgenable + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_system + + + 0 + + + vc_pce_backupram + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_system + + + 1 + + + vc_pce_padbutton_switch + + + JCS.ToggleSwitch, ToggleSwitch, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null + + + vc_pce_system + + + 2 + + + vc_pce_padbutton + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_system + + + 3 + + + 12, 66 + + + 536, 90 + + + 27 + + + vc_options + + + vc_pce_system + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce + + + 2 + True @@ -1600,29 +2191,89 @@ 3 - - 12, 66 + + vc_pce_y_offset_l - - 536, 90 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 27 + + vc_pce_display - - vc_options + + 0 - - vc_pce_system + + vc_pce_y_offset - + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_display + + + 1 + + + vc_pce_sprline + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_display + + + 2 + + + vc_pce_raster + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_display + + + 3 + + + vc_pce_hide_overscan + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_pce_display + + + 4 + + + 12, 162 + + + 536, 116 + + + 28 + + + display + + + vc_pce_display + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + vc_pce - - 2 + + 3 True @@ -1765,50 +2416,86 @@ 4 - - 12, 162 - - - 536, 116 + + auto_prefill - - 28 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - display + + panel2 - - vc_pce_display + + 0 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + auto_fill_save_data - - vc_pce + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + panel2 + + + 1 + + + image_interpolation_mode + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 2 + + + banner_region + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + 3 - + + default_target_filename + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 4 + + 194, 0 - + 560, 410 - - 26 + + 42 - - vc_pce + + panel2 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 2 + + 5 True @@ -1870,15 +2557,6 @@ 1 - - 10, 18 - - - 516, 21 - - - 45 - image_interpolation_modes @@ -1915,14 +2593,26 @@ 2 - + 10, 18 - + 516, 21 - - 47 + + 45 + + + image_interpolation_modes + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + image_interpolation_mode + + + 0 banner_regions @@ -1960,6 +2650,123 @@ 3 + + 10, 18 + + + 516, 21 + + + 47 + + + banner_regions + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + banner_region + + + 0 + + + default_target_project + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 0 + + + default_target_project_tb + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 1 + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 2 + + + default_target_wad + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 3 + + + default_target_wad_tb + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 4 + + + default_target_parameters + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + default_target_filename + + + 5 + + + 12, 122 + + + 536, 160 + + + 61 + + + default_target_filename + + + default_target_filename + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 4 + True @@ -2125,59 +2932,74 @@ 5 - - 12, 122 + + sega_default - - 536, 160 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 61 + + default_injection_methods - - default_target_filename + + 0 - - default_target_filename + + snes_default - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel2 - - - 4 + + default_injection_methods - - 194, 0 + + 1 - - 560, 410 + + nes_default - - 42 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel2 + + default_injection_methods - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 - - $this + + n64_default - - 6 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 10, 18 + + default_injection_methods - - 516, 21 + + 3 - - 18 + + 194, 0 + + + 560, 410 + + + 43 + + + default_injection_methods + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 injection_methods_sega @@ -2215,15 +3037,27 @@ 0 - + 10, 18 - + 516, 21 - + 18 + + injection_methods_sega + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + sega_default + + + 0 + injection_methods_snes @@ -2260,15 +3094,27 @@ 1 - + 10, 18 - + 516, 21 - + 18 + + injection_methods_snes + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + snes_default + + + 0 + injection_methods_nes @@ -2305,15 +3151,27 @@ 2 - + 10, 18 - + 516, 21 - + 18 + + injection_methods_nes + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + nes_default + + + 0 + injection_methods_n64 @@ -2350,27 +3208,120 @@ 3 - + + 10, 18 + + + 516, 21 + + + 18 + + + injection_methods_n64 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + n64_default + + + 0 + + + bios_neo + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_files + + + 0 + + + bios_psx + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_files + + + 1 + + 194, 0 - + 560, 410 - - 43 + + 3 - - default_injection_methods + + bios_files - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 4 + + browse_bios_neo + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_neo + + + 0 + + + bios_filename_neo + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_neo + + + 1 + + + 12, 10 + + + 536, 50 + + + 53 + + + neo + + + bios_neo + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_files + + + 0 + NoControl @@ -2419,29 +3370,53 @@ 1 - - 12, 10 + + browse_bios_psx - + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_psx + + + 0 + + + bios_filename_psx + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_psx + + + 1 + + + 12, 66 + + 536, 50 - - 53 + + 52 - - neo + + psx - - bios_neo + + bios_psx - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + bios_files - - 0 + + 1 NoControl @@ -2476,65 +3451,173 @@ 435, 21 - - 51 + + 51 + + + bios_filename_psx + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + bios_psx + + + 1 + + + display + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + adobe_flash + + + 0 + + + flash_strap_reminder + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + adobe_flash + + + 1 + + + flash_controls + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + adobe_flash + + + 2 + + + flash_save_data + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + adobe_flash + + + 3 + + + 194, 0 + + + 560, 410 + + + 4 + + + adobe_flash + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + flash_fullscreen + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + display + + + 0 + + + flash_update_frame_rate_l + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + display + + + 1 + + + flash_update_frame_rate - - bios_filename_psx + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + display - - bios_psx + + 2 - - 1 + + flash_quality_l - - 12, 66 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 536, 50 + + display - - 52 + + 3 - - psx + + flash_quality_list - - bios_psx + + System.Windows.Forms.ComboBox, 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 + + display - - bios_files + + 4 - - 1 + + 12, 66 - - 194, 0 + + 536, 90 - - 560, 410 + + 23 - - 3 + + display - - bios_files + + display - - 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 + + adobe_flash - - 5 + + 0 True @@ -2671,29 +3754,41 @@ 4 - - 12, 66 + + flash_strap_reminder_list - - 536, 90 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 23 + + flash_strap_reminder - - display + + 0 - - display + + 12, 10 - + + 536, 50 + + + 22 + + + strap_reminder + + + flash_strap_reminder + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + adobe_flash - - 0 + + 1 auto @@ -2719,29 +3814,53 @@ 0 - - 12, 10 + + flash_qwerty_keyboard - - 536, 50 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 22 + + flash_controls - - strap_reminder + + 0 - - flash_strap_reminder + + flash_mouse - + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_controls + + + 1 + + + 12, 263 + + + 536, 68 + + + 21 + + + controls + + + flash_controls + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + adobe_flash - - 1 + + 2 True @@ -2791,41 +3910,125 @@ mouse - - flash_mouse + + flash_mouse + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_controls + + + 1 + + + flash_vff_cache_size_l + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 0 + + + flash_vff_cache_size + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 1 + + + flash_persistent_storage_per_movie_l + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 2 + + + flash_persistent_storage_per_movie + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 3 + + + flash_persistent_storage_total_l + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 4 + + + flash_persistent_storage_total + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + flash_save_data + + + 5 + + + flash_save_data_enable - + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - flash_controls + + flash_save_data - - 1 + + 6 - - 12, 263 + + 12, 162 - - 536, 68 + + 536, 95 - - 21 + + 19 - - controls + + save_data - - flash_controls + + flash_save_data - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + adobe_flash - - 2 + + 3 True @@ -3136,51 +4339,171 @@ 6 - - 12, 162 + + vc_snes_options - - 536, 95 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 19 + + vc_snes - - save_data + + 0 - - flash_save_data + + 194, 0 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 560, 410 - - adobe_flash + + 22 - + + vc_snes + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + vc_snes_patch_gcremap + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + + 0 + + + vc_snes_patch_wiimote + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + + 1 + + + vc_snes_patch_nocheck + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + + 2 + + + vc_snes_patch_nosave + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + 3 - - 194, 0 + + vc_snes_patch_widescreen - - 560, 410 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + vc_snes_options + + 4 - - adobe_flash + + vc_snes_patch_nocc - - System.Windows.Forms.Panel, 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 - - $this + + vc_snes_options - + + 5 + + + vc_snes_patch_nodark + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + + 6 + + + vc_snes_patch_nosuspend + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + + 7 + + + vc_snes_patch_volume + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes_options + + 8 + + 12, 10 + + + 530, 221 + + + 40 + + + vc_options + + + vc_snes_options + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + vc_snes + + + 0 + True @@ -3487,50 +4810,26 @@ 8 - - 12, 10 - - - 530, 221 - - - 40 - - - vc_options - - - vc_snes_options - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - vc_snes - - - 0 - - - 194, 0 + + 193, 0 - - 560, 410 + + 1, 500 - - 22 + + 4 - - vc_snes + + border - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 11 + + 13 True diff --git a/FriishProduce/Subforms/About.Designer.cs b/FriishProduce/Subforms/About.Designer.cs index dcd9b3f..68d89f1 100644 --- a/FriishProduce/Subforms/About.Designer.cs +++ b/FriishProduce/Subforms/About.Designer.cs @@ -128,8 +128,8 @@ private void InitializeComponent() // htmlPanel1 // this.htmlPanel1.AutoScroll = true; - this.htmlPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); this.htmlPanel1.BaseStylesheet = ""; + this.htmlPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.htmlPanel1.Location = new System.Drawing.Point(17, 123); this.htmlPanel1.Name = "htmlPanel1"; this.htmlPanel1.Size = new System.Drawing.Size(600, 190); @@ -138,7 +138,7 @@ private void InitializeComponent() // // bottomPanel2 // - this.bottomPanel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223))))); + this.bottomPanel2.BackColor = System.Drawing.SystemColors.ActiveBorder; this.bottomPanel2.Controls.Add(this.bottomPanel1); this.bottomPanel2.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomPanel2.Location = new System.Drawing.Point(0, 331); @@ -149,7 +149,7 @@ private void InitializeComponent() // // bottomPanel1 // - this.bottomPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; this.bottomPanel1.Controls.Add(this.b_close); this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomPanel1.Location = new System.Drawing.Point(0, 1); @@ -167,7 +167,6 @@ private void InitializeComponent() this.b_close.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.b_close.Location = new System.Drawing.Point(565, 8); this.b_close.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.b_close.MaximumSize = new System.Drawing.Size(0, 31); this.b_close.Name = "b_close"; this.b_close.Size = new System.Drawing.Size(60, 24); this.b_close.TabIndex = 24; @@ -178,7 +177,6 @@ private void InitializeComponent() // this.AcceptButton = this.b_close; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); this.ClientSize = new System.Drawing.Size(634, 372); this.Controls.Add(this.bottomPanel2); this.Controls.Add(this.htmlPanel1); diff --git a/FriishProduce/Subforms/About.cs b/FriishProduce/Subforms/About.cs index eaa7711..69695ef 100644 --- a/FriishProduce/Subforms/About.cs +++ b/FriishProduce/Subforms/About.cs @@ -14,11 +14,13 @@ public About() labelDescription.Text = string.Format("{0}" + Environment.NewLine + "Current language: {1} ({2})", AssemblyDescription, System.Globalization.CultureInfo.CurrentUICulture.EnglishName, Program.Lang.Author); labelVersion.Text = "v" + System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion.ToString(); labelCopyright.Text = AssemblyCopyright; - b_close.Text = Program.Lang.String("b_close"); + + Theme.ChangeColors(this, false); Theme.BtnSizes(b_close); Theme.BtnLayout(this, b_close); + htmlPanel1.BackColor = BackColor; htmlPanel1.BaseStylesheet = HTML.BaseStylesheet + "\n" + "div { padding: 4px 6px !important; }"; htmlPanel1.Text = HTML.MarkdownToHTML(new string[] { diff --git a/FriishProduce/Subforms/ContentOptions.Designer.cs b/FriishProduce/Subforms/ContentOptions.Designer.cs index 9716746..93c7d31 100644 --- a/FriishProduce/Subforms/ContentOptions.Designer.cs +++ b/FriishProduce/Subforms/ContentOptions.Designer.cs @@ -45,8 +45,8 @@ private void InitializeComponent() // bottomPanel1 // this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; - this.bottomPanel1.Controls.Add(this.b_cancel); this.bottomPanel1.Controls.Add(this.b_ok); + this.bottomPanel1.Controls.Add(this.b_cancel); resources.ApplyResources(this.bottomPanel1, "bottomPanel1"); this.bottomPanel1.Name = "bottomPanel1"; // diff --git a/FriishProduce/Subforms/ContentOptions.cs b/FriishProduce/Subforms/ContentOptions.cs index 163faa8..391f4f2 100644 --- a/FriishProduce/Subforms/ContentOptions.cs +++ b/FriishProduce/Subforms/ContentOptions.cs @@ -25,6 +25,7 @@ public ContentOptions() controller_cb.Click += Controller_Toggle; b_controller.Click += OpenControllerMapping; Load += Form_Load; + Shown += SetupLayout; // ***************************************** // Program.Lang.Control(this); @@ -150,6 +151,15 @@ protected void Form_Load(object sender, EventArgs e) controller_box.Visible = controllerForm != null; b_controller.Enabled = controller_cb.Checked = UsesKeymap && controllerForm != null; + + SetupLayout(null, new EventArgs()); + } + + private void SetupLayout(object sender, EventArgs e) + { + Theme.ChangeColors(this, false); + Theme.BtnSizes(b_ok, b_cancel); + Theme.BtnLayout(this, b_ok, b_cancel); } protected void OpenControllerMapping(object sender, EventArgs e) diff --git a/FriishProduce/Subforms/ContentOptions.resx b/FriishProduce/Subforms/ContentOptions.resx index 276b69c..5cbd76f 100644 --- a/FriishProduce/Subforms/ContentOptions.resx +++ b/FriishProduce/Subforms/ContentOptions.resx @@ -118,66 +118,66 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Bottom, Right - + NoControl - - 442, 9 + + 336, 8 - + 100, 23 - - 4 + + 3 - - &Cancel + + &OK - - b_cancel + + b_ok - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + bottomPanel1 - + 0 - + Bottom, Right - + NoControl - - 336, 9 + + 442, 8 - + 100, 23 - - 3 + + 4 - - &OK + + &Cancel - - b_ok + + b_cancel - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + bottomPanel1 - + 1 @@ -187,7 +187,7 @@ 0, 1 - 554, 41 + 554, 40 12 @@ -257,10 +257,10 @@ Bottom - 0, 380 + 0, 381 - 554, 42 + 554, 41 37 diff --git a/FriishProduce/Subforms/MessageBox.Designer.cs b/FriishProduce/Subforms/MessageBox.Designer.cs index af8d89e..bd80cf8 100644 --- a/FriishProduce/Subforms/MessageBox.Designer.cs +++ b/FriishProduce/Subforms/MessageBox.Designer.cs @@ -111,11 +111,12 @@ private void InitializeComponent() // do_not_show // this.do_not_show.AutoSize = true; + this.do_not_show.FlatStyle = System.Windows.Forms.FlatStyle.System; this.do_not_show.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.do_not_show.Location = new System.Drawing.Point(14, 11); + this.do_not_show.Location = new System.Drawing.Point(14, 10); this.do_not_show.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.do_not_show.Name = "do_not_show"; - this.do_not_show.Size = new System.Drawing.Size(96, 19); + this.do_not_show.Size = new System.Drawing.Size(102, 20); this.do_not_show.TabIndex = 25; this.do_not_show.Tag = "do_not_show"; this.do_not_show.Text = "do_not_show"; diff --git a/FriishProduce/Subforms/MessageBox.cs b/FriishProduce/Subforms/MessageBox.cs index ac4abbb..91f339f 100644 --- a/FriishProduce/Subforms/MessageBox.cs +++ b/FriishProduce/Subforms/MessageBox.cs @@ -111,10 +111,8 @@ private void Msg_Load(object sender, EventArgs e) descriptionLabel.Text = Description; RightToLeft = Program.Lang.GetScript(MsgText) == Language.ScriptType.RTL || Program.Lang.GetScript(Description) == Language.ScriptType.RTL ? RightToLeft.Yes : RightToLeft.No; - BackColor = Theme.Colors.BG; - ForeColor = Theme.Colors.Text; - bottomPanel2.BackColor = Theme.Colors.BottomBorder; - bottomPanel1.BackColor = Theme.Colors.Bottom; + Theme.ChangeColors(this, true); + textLabel.ForeColor = Theme.Colors.Headline; // Set message box icon and play sound (if available) // **************** diff --git a/FriishProduce/Subforms/UpdaterForm.Designer.cs b/FriishProduce/Subforms/UpdaterForm.Designer.cs index d0103d5..1b4b2b0 100644 --- a/FriishProduce/Subforms/UpdaterForm.Designer.cs +++ b/FriishProduce/Subforms/UpdaterForm.Designer.cs @@ -31,9 +31,9 @@ private void InitializeComponent() { this.bottomPanel2 = new System.Windows.Forms.Panel(); this.bottomPanel1 = new System.Windows.Forms.Panel(); - this.desc2 = new System.Windows.Forms.Label(); this.b_no = new System.Windows.Forms.Button(); this.b_yes = new System.Windows.Forms.Button(); + this.desc2 = new System.Windows.Forms.Label(); this.Progress = new System.Windows.Forms.ProgressBar(); this.wait = new System.Windows.Forms.PictureBox(); this.htmlPanel1 = new TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel(); @@ -45,7 +45,7 @@ private void InitializeComponent() // // bottomPanel2 // - this.bottomPanel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(223)))), ((int)(((byte)(223))))); + this.bottomPanel2.BackColor = System.Drawing.SystemColors.ActiveBorder; this.bottomPanel2.Controls.Add(this.bottomPanel1); this.bottomPanel2.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomPanel2.Location = new System.Drawing.Point(0, 281); @@ -55,7 +55,7 @@ private void InitializeComponent() // // bottomPanel1 // - this.bottomPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight; this.bottomPanel1.Controls.Add(this.b_no); this.bottomPanel1.Controls.Add(this.b_yes); this.bottomPanel1.Controls.Add(this.desc2); @@ -67,16 +67,6 @@ private void InitializeComponent() this.bottomPanel1.Size = new System.Drawing.Size(468, 40); this.bottomPanel1.TabIndex = 12; // - // desc2 - // - this.desc2.AutoSize = true; - this.desc2.Location = new System.Drawing.Point(9, 13); - this.desc2.Name = "desc2"; - this.desc2.Size = new System.Drawing.Size(37, 15); - this.desc2.TabIndex = 40; - this.desc2.Tag = "desc2"; - this.desc2.Text = "desc2"; - // // b_no // this.b_no.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -109,6 +99,16 @@ private void InitializeComponent() this.b_yes.UseVisualStyleBackColor = true; this.b_yes.Click += new System.EventHandler(this.Yes_Click); // + // desc2 + // + this.desc2.AutoSize = true; + this.desc2.Location = new System.Drawing.Point(9, 13); + this.desc2.Name = "desc2"; + this.desc2.Size = new System.Drawing.Size(37, 15); + this.desc2.TabIndex = 40; + this.desc2.Tag = "desc2"; + this.desc2.Text = "desc2"; + // // Progress // this.Progress.Location = new System.Drawing.Point(12, 13); @@ -133,8 +133,8 @@ private void InitializeComponent() // htmlPanel1 // this.htmlPanel1.AutoScroll = true; - this.htmlPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); this.htmlPanel1.BaseStylesheet = ""; + this.htmlPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.htmlPanel1.Location = new System.Drawing.Point(14, 52); this.htmlPanel1.Name = "htmlPanel1"; this.htmlPanel1.Size = new System.Drawing.Size(440, 214); @@ -154,7 +154,6 @@ private void InitializeComponent() // UpdaterForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252))))); this.ClientSize = new System.Drawing.Size(468, 322); this.Controls.Add(this.desc1); this.Controls.Add(this.htmlPanel1); diff --git a/FriishProduce/Subforms/UpdaterForm.cs b/FriishProduce/Subforms/UpdaterForm.cs index b81a273..b9fe90a 100644 --- a/FriishProduce/Subforms/UpdaterForm.cs +++ b/FriishProduce/Subforms/UpdaterForm.cs @@ -24,17 +24,19 @@ public UpdaterForm(Release Latest, Version VerName) this.Latest = Latest; InitializeComponent(); - Program.Lang.Control(this); + Program.Lang.Control(b_yes); + Program.Lang.Control(b_no); Text = Program.Lang.String("update", "mainform"); desc1.Text = string.Format(Program.Lang.String("update1", "mainform"), VerName, Updater.AppVersion); desc2.Text = Program.Lang.String("update2", "mainform"); + Theme.ChangeColors(this, true); + b_yes.Visible = b_no.Visible = true; Theme.BtnSizes(b_yes, b_no); Theme.BtnLayout(this, b_yes, b_no); string[] body = Latest?.Body.Split('\n'); - htmlPanel1.BaseStylesheet = HTML.BaseStylesheet + "\n" + "div { padding: 4px 6px !important; }"; htmlPanel1.Text = body?.Length > 0 ? HTML.MarkdownToHTML(body) : "
" + Program.Lang.String("none") + "
"; } diff --git a/FriishProduce/Subforms/Wait.cs b/FriishProduce/Subforms/Wait.cs index fccc53a..b5c97f7 100644 --- a/FriishProduce/Subforms/Wait.cs +++ b/FriishProduce/Subforms/Wait.cs @@ -22,6 +22,9 @@ public Wait(bool showProgress, string msg = null) { InitializeComponent(); + Theme.ChangeColors(this, true); + label1.ForeColor = Theme.Colors.Headline; + Text = Program.Lang.ApplicationTitle; // if (Program.MainForm != null) label1.Font = Program.MainForm.Font; label1.Text = msg ?? Program.Lang.String("busy0"); diff --git a/FriishProduce/_classes/Helpers/BannerPreview.cs b/FriishProduce/_classes/Helpers/BannerPreview.cs index 9156263..3b73335 100644 --- a/FriishProduce/_classes/Helpers/BannerPreview.cs +++ b/FriishProduce/_classes/Helpers/BannerPreview.cs @@ -297,7 +297,6 @@ private void resetBG(Platform platform, int target, libWiiSharp.Region region) /// public Bitmap Banner(Bitmap img, string text, int year, int players, Platform platform, libWiiSharp.Region region, int lang = -1) { - if (banner != null) banner.Dispose(); banner = new Bitmap(width, height); if (lang < 0 || lang > 7) @@ -477,6 +476,8 @@ public Bitmap Banner(Bitmap img, string text, int year, int players, Platform pl g.Dispose(); } + GC.Collect(); + GC.WaitForPendingFinalizers(); return banner; } diff --git a/FriishProduce/_classes/Method.cs b/FriishProduce/_classes/Method.cs index f7691ea..a650700 100644 --- a/FriishProduce/_classes/Method.cs +++ b/FriishProduce/_classes/Method.cs @@ -343,6 +343,9 @@ public void Save() Logger.Log($"SUCCESS: Exported to {Out}."); _updateProgress(); _progress.step = _progress.max; + + GC.Collect(); + GC.WaitForPendingFinalizers(); } catch (Exception ex) diff --git a/FriishProduce/_classes/Program/Theme.cs b/FriishProduce/_classes/Program/Theme.cs index 3678e23..8b543a7 100644 --- a/FriishProduce/_classes/Program/Theme.cs +++ b/FriishProduce/_classes/Program/Theme.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Drawing.Drawing2D; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -10,43 +11,354 @@ namespace FriishProduce { public static class Theme { - public struct colors + public static bool Active { get; set; } = false; + + public class colors { - public Color BG { get; set; } - public Color Bottom { get; set; } - public Color BottomBorder { get; set; } - public Color Text { get; set; } + public Color ToolStrip_Top { get; set; } = Color.White; + public Color ToolStrip_Bottom { get; set; } = Color.Gainsboro; + public Color ToolStrip_Border { get; set; } = Color.FromArgb(200, 200, 200); + public Color LogoBG_Top { get; set; } = Color.FromArgb(228, 228, 228); + public Color LogoBG_Bottom { get; set; } = Color.FromArgb(250, 250, 250); + + + public struct form + { + public Color BG; + public Color Border; + public Color Bottom; + } + + public form? Controls { get; set; } = null; + + public form Form { get; set; } = new() + { + BG = Color.FromArgb(240, 240, 240), + Border = Color.FromArgb(200, 200, 200), + Bottom = Color.FromArgb(225, 225, 225) + }; + + public form Dialog { get; set; } = new() + { + BG = Color.White, + Border = Color.FromArgb(223, 223, 223), + Bottom = Color.FromArgb(240, 240, 240) + }; + + public Color Text { get; set; } = Color.Black; + public Color Headline { get; set; } = Color.FromArgb(0, 51, 153); + public Color TextBox { get; set; } = Color.FromArgb(237, 237, 237); + + public Color Highlight { get; set; } = Color.FromArgb(231, 238, 247); // Color.FromArgb(200, 225, 240); + public Color HighlightBorder { get; set; } = Color.FromArgb(174, 207, 247); // Color.FromArgb(180, 214, 234); } public static colors Colors { get; set; } public enum Scheme { - Light, + Default = 0, Dark } + /// + /// Changes the theme for the app. This is only used once, when the GUI starts. + /// public static void ChangeScheme(Scheme target = 0) { - switch (target) { default: - case Scheme.Light: + case 0: + Colors = new(); + break; + + case Scheme.Dark: Colors = new() { - BG = Color.FromArgb(255, 255, 255), - Bottom = Color.FromArgb(240, 240, 240), - BottomBorder = Color.FromArgb(223, 223, 223), - Text = Color.FromArgb(0, 0, 0) + ToolStrip_Top = Color.FromArgb(50, 50, 50), + ToolStrip_Bottom = Color.FromArgb(28, 28, 28), + ToolStrip_Border = Color.FromArgb(70, 70, 70), + LogoBG_Top = Color.FromArgb(26, 26, 26), + LogoBG_Bottom = Color.FromArgb(60, 60, 60), + + Controls = new() + { + BG = Color.FromArgb(53, 53, 53), + Border = Color.FromArgb(112, 112, 112), + }, + Form = new() + { + BG = Color.FromArgb(46, 46, 46), + Border = Color.FromArgb(70, 70, 70), + Bottom = Color.FromArgb(57, 57, 57) + }, + Dialog = new() + { + BG = Color.FromArgb(47, 47, 47), + Border = Color.FromArgb(70, 70, 70), + Bottom = Color.FromArgb(57, 57, 57) + }, + + Text = Color.White, + Headline = Color.FromArgb(15, 220, 255), + TextBox = Color.FromArgb(57, 57, 57), + + Highlight = Color.FromArgb(67, 110, 140), + HighlightBorder = Color.FromArgb(77, 139, 181), }; break; + } + } - case Scheme.Dark: - break; + /// + /// Generates background for main form. + /// + public static Bitmap GenerateBG(Rectangle r) + { + Bitmap b = new(r.Width, r.Height); + using (Graphics g = Graphics.FromImage(b)) + { + g.Clear(Colors.LogoBG_Bottom); + g.SmoothingMode = SmoothingMode.HighSpeed; + + using (SolidBrush brush = new(Colors.LogoBG_Top)) + g.FillRectangle(brush, new Rectangle(Point.Empty, new(r.Width, 30))); + + using (LinearGradientBrush brush = new(new Rectangle(0, 20, r.Width, 70), Colors.LogoBG_Top, Colors.LogoBG_Bottom, LinearGradientMode.Vertical)) + g.FillRectangle(brush, brush.Rectangle); + } + + /* Bitmap b = new(20, 20); + using (Graphics g = Graphics.FromImage(b)) + { + g.SmoothingMode = SmoothingMode.HighSpeed; + + using var b1 = new SolidBrush(Colors.LogoBG_Top); + using var b2 = new SolidBrush(Colors.LogoBG_Bottom); + + g.FillRectangle(b2, 0, 0, b.Width, b.Height); + g.FillPolygon(b1, new Point[] { new Point(10, 0), new Point(20, 10), new Point(10, 20), new Point(0, 10) }); + } */ + + return b; + } + + #region ## CHANGING COLORS OF FORMS AND CONTROLS ## + + /// + /// Sets main colors of form, and if also needed, the styling of relevant subcontrols. + /// + /// Determines whether to use the form or dialog color scheme. + public static bool ChangeColors(Form frm, bool isDialog) + { + if (!Active && !isDialog) return false; + + if (Active && Colors.Controls.HasValue) + { + foreach (Control item1 in frm.Controls) + { + colorize(item1); + foreach (Control item2 in item1.Controls) + { + colorize(item2); + foreach (Control item3 in item2.Controls) + { + colorize(item3); + foreach (Control item4 in item3.Controls) + { + colorize(item4); + foreach (Control item5 in item4.Controls) + { + colorize(item5); + } + } + } + } + } + } + + frm.BackColor = isDialog ? Colors.Dialog.BG : Colors.Form.BG; + frm.ForeColor = Colors.Text; + + foreach (var bottomPanel2 in frm.Controls.OfType().Where(x => x.Name.ToLower() == "bottompanel2")) + { + bottomPanel2.BackColor = isDialog ? Colors.Dialog.Border : Colors.Form.Border; + + foreach (var bottomPanel1 in bottomPanel2.Controls.OfType().Where(x => x.Name.ToLower() == "bottompanel1")) + bottomPanel1.BackColor = isDialog ? Colors.Dialog.Bottom : Colors.Form.Bottom; } + + return true; } + /// + /// Function for subcontrols + /// + private static void colorize(Control c) + { + bool isEligible = false; + bool useFormBG = false; + bool useTextBox = false; + + if (c.GetType() == typeof(Button)) + { + isEligible = true; + (c as Button).FlatStyle = FlatStyle.Flat; + (c as Button).FlatAppearance.BorderColor = Colors.Controls.Value.Border; + } + + if (c.GetType() == typeof(ComboBox)) + { + isEligible = true; + (c as ComboBox).FlatStyle = FlatStyle.Flat; + } + + if (c.GetType() == typeof(RadioButton)) + { + useFormBG = true; + isEligible = true; + (c as RadioButton).FlatStyle = FlatStyle.Flat; + } + + if (c.GetType() == typeof(CheckBox)) + { + useFormBG = true; + isEligible = true; + (c as CheckBox).FlatStyle = FlatStyle.Flat; + } + + if (c.GetType() == typeof(GroupBox)) + { + useFormBG = true; + isEligible = true; + (c as GroupBox).FlatStyle = FlatStyle.Flat; + } + + if (c.GetType() == typeof(TabPage)) + { + useFormBG = true; + isEligible = true; + } + + if (c.GetType() == typeof(TextBox)) + { + useTextBox = true; + isEligible = true; + } + + if (c.GetType() == typeof(TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel)) + { + useFormBG = true; + isEligible = true; + (c as TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel).BorderStyle = BorderStyle.Fixed3D; + } + + if (isEligible) + { + c.BackColor = useTextBox ? Colors.TextBox : useFormBG ? Colors.Form.BG : Colors.Controls.Value.BG; + c.ForeColor = Colors.Text; + } + } + + /// + /// Custom renderer for the main form's tool strip. + /// + public class CustomToolStrip : ToolStripSystemRenderer + { + protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) + { + if (e.ToolStrip.GetType() != typeof(ToolStripDropDownMenu)) + { + Rectangle r = new(e.AffectedBounds.X, e.AffectedBounds.Y, e.AffectedBounds.Width, e.AffectedBounds.Height + 5); + + using (LinearGradientBrush b = new(new(0, 0), new(0, r.Height), Colors.ToolStrip_Top, Colors.ToolStrip_Bottom)) + e.Graphics.FillRectangle(b, r); + } + + else + { + using (SolidBrush brush = new(Colors.Form.BG)) + e.Graphics.FillRectangle(brush, e.AffectedBounds); + } + } + + protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) + { + if (e.ToolStrip.GetType() != typeof(ToolStripDropDownMenu)) + { + using (Pen pen = new(Colors.ToolStrip_Border, 2f)) + e.Graphics.DrawLine(pen, new(0, e.AffectedBounds.Height), new(e.AffectedBounds.Width, e.AffectedBounds.Height)); + } + + else + base.OnRenderToolStripBorder(e); + } + + protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) + { + Rectangle rc = new Rectangle(Point.Empty, e.Item.Size); + + if (e.Item.Selected) + { + rc.X += 1; + rc.Width -= 1; + + using (SolidBrush brush = new(Colors.Highlight)) + e.Graphics.FillRectangle(brush, rc); + + Rectangle r = new(0, 6, rc.Width, rc.Height * 3); + using (LinearGradientBrush brush = new(r, Colors.Highlight, Colors.HighlightBorder, LinearGradientMode.Vertical)) + e.Graphics.FillRectangle(brush, new(r.X, r.Y + 1, r.Width, r.Height)); + + using (Pen pen = new(Colors.HighlightBorder, 2f)) + e.Graphics.DrawRectangle(pen, rc); + } + else + { + using (SolidBrush brush = new(Colors.Form.BG)) + e.Graphics.FillRectangle(brush, rc); + } + } + + protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) + { + e.Item.ForeColor = Colors.Text; + + base.OnRenderItemText(e); + } + + protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) + { + if ((e.Item as ToolStripSeparator) == null) + { + base.OnRenderSeparator(e); + return; + } + + Rectangle bounds = new Rectangle(Point.Empty, e.Item.Size); + bounds.Y += 3; + bounds.Height = Math.Max(0, bounds.Height - 6); + if (bounds.Height >= 4) + bounds.Inflate(0, -2); + + using (Pen pen = new Pen(Colors.Form.Border, 1.5f)) + { + int x = bounds.Width / 2; + if (e.Vertical) + e.Graphics.DrawLine(pen, x, bounds.Top, x, bounds.Bottom); + else + e.Graphics.DrawLine(pen, bounds.Left + 3, bounds.Bottom, bounds.Right - 3, bounds.Bottom); + } + } + } + + #endregion + + /// + /// Automatically sets the sizes of each dialog button, and forces the font to Segoe UI. + /// + /// The buttons from the dialog form. May only support a maximum of three. public static void BtnSizes(params Button[] btns) { const int extra = 8; @@ -56,10 +368,17 @@ public static void BtnSizes(params Button[] btns) var button2 = btns?.Length >= 2 ? btns[1] : null; var button3 = btns?.Length >= 3 ? btns[2] : null; + foreach (var btn in btns) + { + btn.Anchor = AnchorStyles.Top | AnchorStyles.Left; + btn.AutoSize = true; + btn.AutoSizeMode = AutoSizeMode.GrowAndShrink; + btn.Font = new Font("Segoe UI", 9f); + btn.MaximumSize = btn.MinimumSize = new(0, 24); + } + if (button1 != null) { - button1.AutoSize = true; - button1.AutoSizeMode = AutoSizeMode.GrowOnly; button1.Size = button1.MinimumSize = new Size(Math.Max(min, button1.Width + extra), button1.Height); } @@ -78,6 +397,11 @@ public static void BtnSizes(params Button[] btns) } } + /// + /// Automatically sets the positions of each dialog button. + /// + /// The dialog form, to use as a reference for the client size. + /// The buttons from the dialog form. May only support a maximum of three. public static void BtnLayout(Form frm, params Button[] btns) { const int spacing = 8; diff --git a/FriishProduce/_classes/Utilities.cs b/FriishProduce/_classes/Utilities.cs index cc33a37..b9d3fc4 100644 --- a/FriishProduce/_classes/Utilities.cs +++ b/FriishProduce/_classes/Utilities.cs @@ -44,13 +44,20 @@ public static class HTML { public static string BaseStylesheet { - get => string.Join("\n", - "div { font-size: 12px !important; line-height: 0.2 !important; }", - "ul li, h1, h2, h3, h4, h5 { margin-top: 5px !important; margin-bottom: 5px !important; }", - "hr { border-top: 1px solid black; }"); + get + { + string value = string.Join("\n", + "div { font-size: 12px !important; line-height: 0.2 !important; }", + "ul li, h1, h2, h3, h4, h5 { margin-top: 5px !important; margin-bottom: 5px !important; }", + "hr { border-top: 1px solid black; }"); + + if (Theme.Active) + value += "\ndiv { color: " + System.Drawing.ColorTranslator.ToHtml(Theme.Colors.Text).ToLower() + " !important }" + + "\na { color: " + System.Drawing.ColorTranslator.ToHtml(Theme.Colors.Headline).ToLower() + " !important }"; + return value; + } } - public static TheArtOfDev.HtmlRenderer.WinForms.HtmlToolTip CreateToolTip() => new() { BaseStylesheet = BaseStylesheet + "\n" +