From 9330ac430b2dc84adc34bc6bf0c09ec05a67117a Mon Sep 17 00:00:00 2001 From: Bitl Date: Thu, 9 Jul 2020 11:27:18 -0700 Subject: [PATCH] fixed some designer woes. more renaming. --- ...CharacterCustomizationCompact.Designer.cs} | 14 +++++------ .../CharacterCustomizationCompact.cs} | 4 ++-- .../CharacterCustomizationCompact.resx} | 0 ...haracterCustomizationExtended.Designer.cs} | 12 ++++------ .../CharacterCustomizationExtended.cs} | 4 ++-- .../CharacterCustomizationExtended.resx} | 0 .../WinForms/TabControlWithoutHeader.cs | 23 +------------------ .../Compact/LauncherFormCompact.Designer.cs | 6 ++--- .../Compact/LauncherFormCompact.cs | 2 +- .../Extended/LauncherFormExtended.cs | 2 +- .../NovetusLauncher/Novetus.Launcher.csproj | 20 ++++++++-------- Novetus/NovetusURI/Forms/QuickConfigure.cs | 15 ++++++++++-- 12 files changed, 43 insertions(+), 59 deletions(-) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization_legacy.Designer.cs => Compact/CharacterCustomizationCompact.Designer.cs} (99%) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization_legacy.cs => Compact/CharacterCustomizationCompact.cs} (99%) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization_legacy.resx => Compact/CharacterCustomizationCompact.resx} (100%) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization.Designer.cs => Extended/CharacterCustomizationExtended.Designer.cs} (99%) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization.cs => Extended/CharacterCustomizationExtended.cs} (99%) rename Novetus/NovetusLauncher/CharacterCustomization/{CharacterCustomization.resx => Extended/CharacterCustomizationExtended.resx} (100%) diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs b/Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs similarity index 99% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs rename to Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs index d87a549..7500cad 100644 --- a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.Designer.cs +++ b/Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.Designer.cs @@ -6,11 +6,9 @@ * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ -//this.tabControl1 = new TabControlWithoutHeader(2); -//this.tabControl2 = new TabControlWithoutHeader(2); namespace NovetusLauncher { - partial class CharacterCustomization_legacy + partial class CharacterCustomizationCompact { /// /// Designer variable used to keep track of non-visual components. @@ -41,9 +39,9 @@ namespace NovetusLauncher private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CharacterCustomization_legacy)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CharacterCustomizationCompact)); this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.tabControl1 = new TabControlWithoutHeader(2); + this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.button61 = new System.Windows.Forms.Button(); @@ -101,7 +99,7 @@ namespace NovetusLauncher this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.tabControl2 = new TabControlWithoutHeader(2); + this.tabControl2 = new System.Windows.Forms.TabControl(); this.tabPage10 = new System.Windows.Forms.TabPage(); this.textBox2 = new System.Windows.Forms.TextBox(); this.listBox1 = new System.Windows.Forms.ListBox(); @@ -1776,7 +1774,7 @@ namespace NovetusLauncher private System.Windows.Forms.TabPage tabPage12; private System.Windows.Forms.TabPage tabPage11; private System.Windows.Forms.TabPage tabPage10; - private TabControlWithoutHeader tabControl2; + private System.Windows.Forms.TabControl tabControl2; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.ListBox listBox9; private System.Windows.Forms.PictureBox pictureBox9; @@ -1874,7 +1872,7 @@ namespace NovetusLauncher private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage1; - private TabControlWithoutHeader tabControl1; + private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.Button button60; private System.Windows.Forms.Label label8; private System.Windows.Forms.PictureBox pictureBox10; diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs b/Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.cs similarity index 99% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs rename to Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.cs index e7bc80e..6ee3278 100644 --- a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs +++ b/Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.cs @@ -19,7 +19,7 @@ namespace NovetusLauncher /// /// Description of CharacterCustomization. /// - public partial class CharacterCustomization_legacy : Form + public partial class CharacterCustomizationCompact : Form { private string SelectedPart = "Head"; private string Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id="; @@ -27,7 +27,7 @@ namespace NovetusLauncher private string Custom_Pants_URL = "http://www.roblox.com/asset/?id="; List PartColorList; - public CharacterCustomization_legacy() + public CharacterCustomizationCompact() { // // The InitializeComponent() call is required for Windows Forms designer support. diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx b/Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.resx similarity index 100% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.resx rename to Novetus/NovetusLauncher/CharacterCustomization/Compact/CharacterCustomizationCompact.resx diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs b/Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs similarity index 99% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs rename to Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs index 2132cb9..2b165f0 100644 --- a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.Designer.cs +++ b/Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.Designer.cs @@ -6,12 +6,10 @@ * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ -//this.tabControl1 = new TabControlWithoutHeader(1); -//this.tabControl2 = new TabControlWithoutHeader(1); namespace NovetusLauncher { - partial class CharacterCustomization - { + partial class CharacterCustomizationExtended + { /// /// Designer variable used to keep track of non-visual components. /// @@ -39,7 +37,7 @@ namespace NovetusLauncher private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CharacterCustomization)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CharacterCustomizationExtended)); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.panel1 = new System.Windows.Forms.Panel(); this.label9 = new System.Windows.Forms.Label(); @@ -55,7 +53,7 @@ namespace NovetusLauncher this.button73 = new System.Windows.Forms.Button(); this.button72 = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); - this.tabControl1 = new TabControlWithoutHeader(1); + this.tabControl1 = new TabControlWithoutHeader(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.button61 = new System.Windows.Forms.Button(); @@ -113,7 +111,7 @@ namespace NovetusLauncher this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.tabControl2 = new TabControlWithoutHeader(1); + this.tabControl2 = new TabControlWithoutHeader(); this.tabPage10 = new System.Windows.Forms.TabPage(); this.label10 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs b/Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.cs similarity index 99% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs rename to Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.cs index 8164ceb..4897f72 100644 --- a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs +++ b/Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.cs @@ -19,7 +19,7 @@ namespace NovetusLauncher /// /// Description of CharacterCustomization. /// - public partial class CharacterCustomization : Form + public partial class CharacterCustomizationExtended : Form { private string SelectedPart = "Head"; private string Custom_T_Shirt_URL = "http://www.roblox.com/asset/?id="; @@ -27,7 +27,7 @@ namespace NovetusLauncher private string Custom_Pants_URL = "http://www.roblox.com/asset/?id="; List PartColorList; - public CharacterCustomization() + public CharacterCustomizationExtended() { // // The InitializeComponent() call is required for Windows Forms designer support. diff --git a/Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx b/Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.resx similarity index 100% rename from Novetus/NovetusLauncher/CharacterCustomization/CharacterCustomization.resx rename to Novetus/NovetusLauncher/CharacterCustomization/Extended/CharacterCustomizationExtended.resx diff --git a/Novetus/NovetusLauncher/Classes/WinForms/TabControlWithoutHeader.cs b/Novetus/NovetusLauncher/Classes/WinForms/TabControlWithoutHeader.cs index 0e17912..3d46a80 100644 --- a/Novetus/NovetusLauncher/Classes/WinForms/TabControlWithoutHeader.cs +++ b/Novetus/NovetusLauncher/Classes/WinForms/TabControlWithoutHeader.cs @@ -8,34 +8,13 @@ using System.Windows.Forms; public partial class TabControlWithoutHeader : TabControl { - int layoutval = 1; - - public TabControlWithoutHeader(int layout) - { - SetLayout(layout); - } public TabControlWithoutHeader() { - SetLayout(1); - } - - private void SetLayout(int layout) - { - layoutval = layout; - if (layoutval == 1) - { - if (!DesignMode) Multiline = true; - } + if (!DesignMode) Multiline = true; } protected override void WndProc(ref Message m) { - if (layoutval == 2) - { - base.WndProc(ref m); - return; - } - if (m.Msg == 0x1328 && !DesignMode) m.Result = new IntPtr(1); else diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs index 07ec8e0..f138b53 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs @@ -6,8 +6,6 @@ * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ -//this.tabControl1 = new TabControlWithoutHeader(2); -//This ALWAYS gets lost whenever I compile. WTF VS? namespace NovetusLauncher { partial class LauncherFormCompact @@ -44,7 +42,7 @@ namespace NovetusLauncher private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherFormCompact)); - this.tabControl1 = new TabControlWithoutHeader(2); + this.tabControl1 = new System.Windows.Forms.TabControl(); this.button25 = new System.Windows.Forms.Button(); this.button21 = new System.Windows.Forms.Button(); this.textBox5 = new System.Windows.Forms.TextBox(); @@ -1456,7 +1454,7 @@ namespace NovetusLauncher private System.Windows.Forms.Label label1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage1; - private TabControlWithoutHeader tabControl1; + private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TreeView _fieldsTreeCache; private System.Windows.Forms.Button button24; private System.Windows.Forms.Button button25; diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs index b29699f..a62e924 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs @@ -679,7 +679,7 @@ namespace NovetusLauncher void Button8Click(object sender, EventArgs e) { - CharacterCustomization_legacy ccustom = new CharacterCustomization_legacy(); + CharacterCustomizationCompact ccustom = new CharacterCustomizationCompact(); ccustom.Show(); } diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs index 5a4813a..18166b1 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs @@ -715,7 +715,7 @@ namespace NovetusLauncher void Button8Click(object sender, EventArgs e) { - CharacterCustomization ccustom = new CharacterCustomization(); + CharacterCustomizationExtended ccustom = new CharacterCustomizationExtended(); ccustom.Show(); } diff --git a/Novetus/NovetusLauncher/Novetus.Launcher.csproj b/Novetus/NovetusLauncher/Novetus.Launcher.csproj index fc7d715..3f244ca 100644 --- a/Novetus/NovetusLauncher/Novetus.Launcher.csproj +++ b/Novetus/NovetusLauncher/Novetus.Launcher.csproj @@ -122,17 +122,17 @@ - + Form - - CharacterCustomization_legacy.cs + + CharacterCustomizationCompact.cs - + Form - - CharacterCustomization.cs + + CharacterCustomizationExtended.cs @@ -221,11 +221,11 @@ - - CharacterCustomization_legacy.cs + + CharacterCustomizationCompact.cs - - CharacterCustomization.cs + + CharacterCustomizationExtended.cs LauncherFormCompact.cs diff --git a/Novetus/NovetusURI/Forms/QuickConfigure.cs b/Novetus/NovetusURI/Forms/QuickConfigure.cs index 8c0214b..d925f05 100644 --- a/Novetus/NovetusURI/Forms/QuickConfigure.cs +++ b/Novetus/NovetusURI/Forms/QuickConfigure.cs @@ -82,8 +82,19 @@ namespace NovetusURI void Button1Click(object sender, EventArgs e) { - CharacterCustomization ccustom = new CharacterCustomization(); - ccustom.Show(); + switch(GlobalVars.UserConfiguration.LauncherStyle) + { + case Settings.UIOptions.Style.Extended: + CharacterCustomizationExtended ccustom = new CharacterCustomizationExtended(); + ccustom.Show(); + break; + case Settings.UIOptions.Style.Compact: + CharacterCustomizationCompact ccustom2 = new CharacterCustomizationCompact(); + ccustom2.Show(); + break; + default: + break; + } } void Button2Click(object sender, EventArgs e)