From 4ee80608aa78a9434073a5ef19aeb18e39cf22f4 Mon Sep 17 00:00:00 2001 From: Bitl Date: Mon, 19 Sep 2022 12:46:19 -0700 Subject: [PATCH] ip and port are now 1 val, other changes --- .../StorageAndFunctions/GlobalPaths.cs | 2 + .../StorageAndFunctions/GlobalVars.cs | 18 +++ .../StorageAndFunctions/NovetusFuncs.cs | 5 +- .../NovetusCore/StorageAndFunctions/Util.cs | 17 +++ .../Compact/LauncherFormCompact.Designer.cs | 95 +++------------- .../Compact/LauncherFormCompact.cs | 21 +--- .../Compact/LauncherFormCompact.resx | 2 +- .../Extended/LauncherFormExtended.Designer.cs | 91 ++------------- .../Extended/LauncherFormExtended.cs | 21 +--- .../Extended/LauncherFormExtended.resx | 2 +- .../Forms/LauncherForm/LauncherFormShared.cs | 27 ++++- .../Stylish/LauncherFormStylish.cs | 1 - .../Stylish/LauncherFormStylishInterface.xaml | 17 ++- .../LauncherFormStylishInterface.xaml.cs | 16 +-- .../NovetusLauncher/Forms/NovetusConsole.cs | 105 ++++++++---------- .../NovetusLauncherEntryPoint.cs | 2 +- changelog.txt | 16 ++- consolehelp.txt | 51 +++++++++ documentation.txt | 1 + scripts/batch/clean_junk.bat | 1 + scripts/batch/github_sync.bat | 1 + scripts/launcher/info.ini | 2 +- 22 files changed, 222 insertions(+), 292 deletions(-) create mode 100644 consolehelp.txt diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs index 0af4614..436bb17 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs @@ -107,6 +107,8 @@ public class GlobalPaths public static readonly string FileDeleteFilterName = "FileDeleteFilter.txt"; public static readonly string InitialFileListIgnoreFilterName = "InitialFileListIgnoreFilter.txt"; public static readonly string ServerInfoFileName = "serverinfo.txt"; + public static readonly string ConsoleHelpFileName = "consolehelp.txt"; + public static readonly string ClientScriptDocumentationFileName = "documentation.txt"; #endregion } #endregion diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs index 2624301..83ccae7 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalVars.cs @@ -39,6 +39,24 @@ public class GameServer return ServerIP + ":" + ServerPort.ToString(); } + public void SetValues(string input) + { + try + { + string[] vals = input.Split(':'); + string ip = vals[0]; + int port = Convert.ToInt32(vals[1]); + + ServerIP = ip; + ServerPort = port; + } + catch (Exception) + { + ServerIP = input; + ServerPort = GlobalVars.DefaultRobloxPort; + } + } + public string ServerIP { get; set; } public int ServerPort { get; set; } } diff --git a/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs index 779acf1..06b7e7b 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/NovetusFuncs.cs @@ -189,10 +189,11 @@ public class NovetusFuncs SecurityFuncs.Base64Encode(GlobalVars.UserConfiguration.SelectedClient) }; string URI2 = "novetus://" + SecurityFuncs.Base64Encode(string.Join("|", lines2), true); + GameServer server = new GameServer((!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : GlobalVars.ExternalIP), + GlobalVars.UserConfiguration.RobloxPort); string[] text = { + "Address: " + server.ToString(), "Client: " + GlobalVars.UserConfiguration.SelectedClient, - "IP: " + (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : GlobalVars.ExternalIP), - "Port: " + GlobalVars.UserConfiguration.RobloxPort.ToString(), "Map: " + GlobalVars.UserConfiguration.Map, "Players: " + GlobalVars.UserConfiguration.PlayerLimit, "Version: Novetus " + GlobalVars.ProgramInformation.Version, diff --git a/Novetus/NovetusCore/StorageAndFunctions/Util.cs b/Novetus/NovetusCore/StorageAndFunctions/Util.cs index ea3d321..65ff220 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/Util.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/Util.cs @@ -766,6 +766,23 @@ public static class Util Console.Write(text); } } + + public static void ReadTextFileWithColor(string path) + { + var lines = File.ReadLines(path); + foreach (var line in lines) + { + try + { + string[] vals = line.Split('|'); + ConsolePrint(vals[0], Convert.ToInt32(vals[1]), true, true); + } + catch (Exception) + { + ConsolePrint(line, 1, true, true); + } + } + } #endregion #if !BASICLAUNCHER diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs index a4ab644..e5b3597 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.Designer.cs @@ -47,10 +47,6 @@ namespace NovetusLauncher this.tabPage1 = new System.Windows.Forms.TabPage(); this.button36 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); - this.button7 = new System.Windows.Forms.Button(); - this.label31 = new System.Windows.Forms.Label(); - this.button11 = new System.Windows.Forms.Button(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.button19 = new System.Windows.Forms.Button(); this.button10 = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); @@ -162,7 +158,6 @@ namespace NovetusLauncher this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.tabPage2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); @@ -184,12 +179,14 @@ namespace NovetusLauncher this.tabControl1.Controls.Add(this.tabPage8); this.tabControl1.Controls.Add(this.tabPage5); this.tabControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabControl1.ItemSize = new System.Drawing.Size(58, 18); this.tabControl1.Location = new System.Drawing.Point(2, 79); this.tabControl1.Multiline = true; this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; this.tabControl1.ShowToolTips = true; this.tabControl1.Size = new System.Drawing.Size(413, 284); + this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; this.tabControl1.TabIndex = 1; this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); // @@ -197,10 +194,6 @@ namespace NovetusLauncher // this.tabPage1.Controls.Add(this.button36); this.tabPage1.Controls.Add(this.label1); - this.tabPage1.Controls.Add(this.button7); - this.tabPage1.Controls.Add(this.label31); - this.tabPage1.Controls.Add(this.button11); - this.tabPage1.Controls.Add(this.numericUpDown1); this.tabPage1.Controls.Add(this.button19); this.tabPage1.Controls.Add(this.button10); this.tabPage1.Controls.Add(this.label4); @@ -219,11 +212,11 @@ namespace NovetusLauncher // // button36 // - this.button36.Location = new System.Drawing.Point(235, 32); + this.button36.Location = new System.Drawing.Point(235, 47); this.button36.Name = "button36"; - this.button36.Size = new System.Drawing.Size(164, 34); + this.button36.Size = new System.Drawing.Size(164, 19); this.button36.TabIndex = 51; - this.button36.Text = "JOIN SERVER FROM SERVER BROWSER"; + this.button36.Text = "BROWSE SERVERS"; this.button36.UseVisualStyleBackColor = true; this.button36.Click += new System.EventHandler(this.button36_Click); // @@ -235,63 +228,9 @@ namespace NovetusLauncher this.label1.Size = new System.Drawing.Size(393, 2); this.label1.TabIndex = 49; // - // button7 - // - this.button7.Location = new System.Drawing.Point(175, 47); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(54, 19); - this.button7.TabIndex = 48; - this.button7.Text = "RESET"; - this.button7.UseVisualStyleBackColor = true; - this.button7.Click += new System.EventHandler(this.Button7Click); - // - // label31 - // - this.label31.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label31.Location = new System.Drawing.Point(109, 5); - this.label31.Name = "label31"; - this.label31.Size = new System.Drawing.Size(120, 13); - this.label31.TabIndex = 47; - this.label31.Text = "Server Port"; - this.label31.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // button11 - // - this.button11.Location = new System.Drawing.Point(109, 47); - this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(60, 19); - this.button11.TabIndex = 46; - this.button11.Text = "SAVE"; - this.button11.UseVisualStyleBackColor = true; - this.button11.Click += new System.EventHandler(this.Button11Click); - // - // numericUpDown1 - // - this.numericUpDown1.Location = new System.Drawing.Point(109, 21); - this.numericUpDown1.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numericUpDown1.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(120, 20); - this.numericUpDown1.TabIndex = 18; - this.numericUpDown1.Value = new decimal(new int[] { - 53640, - 0, - 0, - 0}); - this.numericUpDown1.ValueChanged += new System.EventHandler(this.NumericUpDown1ValueChanged); - // // button19 // - this.button19.Location = new System.Drawing.Point(109, 72); + this.button19.Location = new System.Drawing.Point(106, 72); this.button19.Name = "button19"; this.button19.Size = new System.Drawing.Size(192, 29); this.button19.TabIndex = 16; @@ -301,9 +240,9 @@ namespace NovetusLauncher // // button10 // - this.button10.Location = new System.Drawing.Point(7, 47); + this.button10.Location = new System.Drawing.Point(235, 21); this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(96, 19); + this.button10.Size = new System.Drawing.Size(164, 20); this.button10.TabIndex = 15; this.button10.Text = "SAVE SERVER"; this.button10.UseVisualStyleBackColor = true; @@ -322,9 +261,9 @@ namespace NovetusLauncher // // button1 // - this.button1.Location = new System.Drawing.Point(235, 6); + this.button1.Location = new System.Drawing.Point(6, 47); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(164, 23); + this.button1.Size = new System.Drawing.Size(223, 19); this.button1.TabIndex = 3; this.button1.Text = "JOIN SERVER FROM IP"; this.button1.UseVisualStyleBackColor = true; @@ -334,20 +273,20 @@ namespace NovetusLauncher // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label3.Location = new System.Drawing.Point(4, 5); + this.label3.Location = new System.Drawing.Point(67, 5); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(99, 13); this.label3.TabIndex = 1; - this.label3.Text = "Server IP Address"; + this.label3.Text = "Server Address"; this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(6, 21); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(97, 20); + this.textBox1.Size = new System.Drawing.Size(223, 20); this.textBox1.TabIndex = 0; - this.textBox1.Text = "localhost"; + this.textBox1.Text = "localhost:53640"; this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.textBox1.TextChanged += new System.EventHandler(this.TextBox1TextChanged); this.textBox1.Enter += new System.EventHandler(this.textBox1_GotFocus); @@ -1420,7 +1359,6 @@ namespace NovetusLauncher this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); @@ -1479,7 +1417,6 @@ namespace NovetusLauncher launcherForm.SelectedMapLabel = label28; launcherForm.PlayerLimitBox = numericUpDown3; launcherForm.HostPortBox = numericUpDown2; - launcherForm.JoinPortBox = numericUpDown1; launcherForm.ClientWarningLabel = label30; launcherForm.ClientDescriptionBox = textBox6; launcherForm.IPBox = textBox1; @@ -1496,11 +1433,9 @@ namespace NovetusLauncher private System.Windows.Forms.Label label7; private System.Windows.Forms.TabPage tabPage5; private System.Windows.Forms.Button button22; - private System.Windows.Forms.Button button7; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.NumericUpDown numericUpDown3; private System.Windows.Forms.NumericUpDown numericUpDown2; - private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.Button button21; private System.Windows.Forms.Label label29; private System.Windows.Forms.RichTextBox richTextBox2; @@ -1517,7 +1452,6 @@ namespace NovetusLauncher private System.Windows.Forms.Label label37; private System.Windows.Forms.Label label39; private System.Windows.Forms.Label label38; - private System.Windows.Forms.Button button11; private System.Windows.Forms.Button button10; private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label21; @@ -1588,7 +1522,6 @@ namespace NovetusLauncher private System.Windows.Forms.CheckBox checkBox6; private System.Windows.Forms.Panel panel5; private System.Windows.Forms.ComboBox comboBox1; - private System.Windows.Forms.Label label31; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox comboBox3; diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs index fab3a3b..ff87595 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.cs @@ -73,16 +73,7 @@ namespace NovetusLauncher void TextBox1TextChanged(object sender, EventArgs e) { - if (textBox1.Text.Contains("`")) - { - textBox1.Text = launcherForm.OldIP; - return; - } - - GlobalVars.CurrentServer.ServerIP = textBox1.Text; - checkBox3.Enabled = false; - GlobalVars.LocalPlayMode = false; - label37.Text = GlobalVars.CurrentServer.ServerIP; + launcherForm.ChangeServerAddress(); } void CheckBox1CheckedChanged(object sender, EventArgs e) @@ -180,11 +171,6 @@ namespace NovetusLauncher launcherForm.AddIPPortListing(listBox4, GlobalPaths.ConfigDir + "\\ports.txt", GlobalVars.CurrentServer.ServerPort); } - void NumericUpDown1ValueChanged(object sender, EventArgs e) - { - launcherForm.ChangeJoinPort(); - } - void NumericUpDown2ValueChanged(object sender, EventArgs e) { launcherForm.ChangeServerPort(); @@ -195,11 +181,6 @@ namespace NovetusLauncher GlobalVars.UserConfiguration.PlayerLimit = Convert.ToInt32(numericUpDown3.Value); } - void Button7Click(object sender, EventArgs e) - { - launcherForm.ResetCurPort(numericUpDown1, GlobalVars.CurrentServer.ServerPort); - } - void Button22Click(object sender, EventArgs e) { launcherForm.ResetCurPort(numericUpDown2, GlobalVars.UserConfiguration.RobloxPort); diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.resx b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.resx index 301266d..9d74dbe 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.resx +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompact.resx @@ -136,7 +136,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB0 - CQAAAk1TRnQBSQFMAgEBAgEAAYABAAGAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAgEAAZABAAGQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs index aacfc7c..cbdd906 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.Designer.cs @@ -71,12 +71,8 @@ namespace NovetusLauncher this.tabControl1 = new TabControlWithoutHeader(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.button37 = new System.Windows.Forms.Button(); - this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.button7 = new System.Windows.Forms.Button(); - this.button11 = new System.Windows.Forms.Button(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.button19 = new System.Windows.Forms.Button(); this.button10 = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); @@ -154,7 +150,6 @@ namespace NovetusLauncher this.panel2.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.tabPage2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); @@ -448,12 +443,8 @@ namespace NovetusLauncher // tabPage1 // this.tabPage1.Controls.Add(this.button37); - this.tabPage1.Controls.Add(this.label24); this.tabPage1.Controls.Add(this.label23); this.tabPage1.Controls.Add(this.label1); - this.tabPage1.Controls.Add(this.button7); - this.tabPage1.Controls.Add(this.button11); - this.tabPage1.Controls.Add(this.numericUpDown1); this.tabPage1.Controls.Add(this.button19); this.tabPage1.Controls.Add(this.button10); this.tabPage1.Controls.Add(this.label4); @@ -471,31 +462,22 @@ namespace NovetusLauncher // // button37 // - this.button37.Location = new System.Drawing.Point(311, 49); + this.button37.Location = new System.Drawing.Point(311, 50); this.button37.Name = "button37"; - this.button37.Size = new System.Drawing.Size(293, 21); + this.button37.Size = new System.Drawing.Size(293, 20); this.button37.TabIndex = 53; - this.button37.Text = "JOIN SERVER FROM SERVER BROWSER"; + this.button37.Text = "BROWSE SERVERS"; this.button37.UseVisualStyleBackColor = true; this.button37.Click += new System.EventHandler(this.button37_Click); // - // label24 - // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(224, 7); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(60, 13); - this.label24.TabIndex = 52; - this.label24.Text = "Server Port"; - // // label23 // this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(59, 7); + this.label23.Location = new System.Drawing.Point(118, 7); this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(92, 13); + this.label23.Size = new System.Drawing.Size(79, 13); this.label23.TabIndex = 51; - this.label23.Text = "Server IP Address"; + this.label23.Text = "Server Address"; // // label1 // @@ -505,49 +487,6 @@ namespace NovetusLauncher this.label1.Size = new System.Drawing.Size(612, 2); this.label1.TabIndex = 49; // - // button7 - // - this.button7.Location = new System.Drawing.Point(254, 49); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(51, 21); - this.button7.TabIndex = 48; - this.button7.Text = "RESET"; - this.button7.UseVisualStyleBackColor = true; - this.button7.Click += new System.EventHandler(this.Button7Click); - // - // button11 - // - this.button11.Location = new System.Drawing.Point(203, 49); - this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(45, 21); - this.button11.TabIndex = 46; - this.button11.Text = "SAVE"; - this.button11.UseVisualStyleBackColor = true; - this.button11.Click += new System.EventHandler(this.Button11Click); - // - // numericUpDown1 - // - this.numericUpDown1.Location = new System.Drawing.Point(203, 23); - this.numericUpDown1.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numericUpDown1.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(102, 20); - this.numericUpDown1.TabIndex = 18; - this.numericUpDown1.Value = new decimal(new int[] { - 53640, - 0, - 0, - 0}); - this.numericUpDown1.ValueChanged += new System.EventHandler(this.NumericUpDown1ValueChanged); - // // button19 // this.button19.Location = new System.Drawing.Point(163, 76); @@ -560,9 +499,9 @@ namespace NovetusLauncher // // button10 // - this.button10.Location = new System.Drawing.Point(8, 49); + this.button10.Location = new System.Drawing.Point(311, 23); this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(189, 21); + this.button10.Size = new System.Drawing.Size(293, 21); this.button10.TabIndex = 15; this.button10.Text = "SAVE SERVER"; this.button10.UseVisualStyleBackColor = true; @@ -581,9 +520,9 @@ namespace NovetusLauncher // // button1 // - this.button1.Location = new System.Drawing.Point(311, 23); + this.button1.Location = new System.Drawing.Point(8, 50); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(293, 20); + this.button1.Size = new System.Drawing.Size(297, 20); this.button1.TabIndex = 3; this.button1.Text = "JOIN SERVER FROM IP"; this.button1.UseVisualStyleBackColor = true; @@ -593,9 +532,9 @@ namespace NovetusLauncher // this.textBox1.Location = new System.Drawing.Point(8, 23); this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(189, 20); + this.textBox1.Size = new System.Drawing.Size(297, 20); this.textBox1.TabIndex = 0; - this.textBox1.Text = "localhost"; + this.textBox1.Text = "localhost:53640"; this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.textBox1.TextChanged += new System.EventHandler(this.TextBox1TextChanged); this.textBox1.Enter += new System.EventHandler(this.textBox1_GotFocus); @@ -1380,7 +1319,6 @@ namespace NovetusLauncher this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); @@ -1442,7 +1380,6 @@ namespace NovetusLauncher launcherForm.SelectedMapLabel = label28; launcherForm.PlayerLimitBox = numericUpDown3; launcherForm.HostPortBox = numericUpDown2; - launcherForm.JoinPortBox = numericUpDown1; launcherForm.ClientWarningLabel = label30; launcherForm.ClientDescriptionBox = textBox6; launcherForm.IPBox = textBox1; @@ -1458,11 +1395,9 @@ namespace NovetusLauncher private System.Windows.Forms.Label label7; private System.Windows.Forms.TabPage tabPage5; private System.Windows.Forms.Button button22; - private System.Windows.Forms.Button button7; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.NumericUpDown numericUpDown3; private System.Windows.Forms.NumericUpDown numericUpDown2; - private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.Label label29; private System.Windows.Forms.RichTextBox richTextBox2; private System.Windows.Forms.TabPage tabPage8; @@ -1478,7 +1413,6 @@ namespace NovetusLauncher private System.Windows.Forms.Label label37; private System.Windows.Forms.Label label39; private System.Windows.Forms.Label label38; - private System.Windows.Forms.Button button11; private System.Windows.Forms.Button button10; private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label21; @@ -1540,7 +1474,6 @@ namespace NovetusLauncher private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel4; private System.Windows.Forms.RichTextBox richTextBox3; - private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label23; private System.Windows.Forms.Panel panel5; private System.Windows.Forms.Label label5; diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs index 03dd9c9..32f74b7 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs @@ -78,16 +78,7 @@ namespace NovetusLauncher void TextBox1TextChanged(object sender, EventArgs e) { - if (textBox1.Text.Contains("`")) - { - textBox1.Text = launcherForm.OldIP; - return; - } - - GlobalVars.CurrentServer.ServerIP = textBox1.Text; - checkBox3.Enabled = false; - GlobalVars.LocalPlayMode = false; - label37.Text = GlobalVars.CurrentServer.ServerIP; + launcherForm.ChangeServerAddress(); } void CheckBox1CheckedChanged(object sender, EventArgs e) @@ -184,11 +175,6 @@ namespace NovetusLauncher { launcherForm.AddIPPortListing(listBox4, GlobalPaths.ConfigDir + "\\ports.txt", GlobalVars.CurrentServer.ServerPort); } - - void NumericUpDown1ValueChanged(object sender, EventArgs e) - { - launcherForm.ChangeJoinPort(); - } void NumericUpDown2ValueChanged(object sender, EventArgs e) { @@ -200,11 +186,6 @@ namespace NovetusLauncher GlobalVars.UserConfiguration.PlayerLimit = Convert.ToInt32(numericUpDown3.Value); } - void Button7Click(object sender, EventArgs e) - { - launcherForm.ResetCurPort(numericUpDown1, GlobalVars.CurrentServer.ServerPort); - } - void Button22Click(object sender, EventArgs e) { launcherForm.ResetCurPort(numericUpDown2, GlobalVars.UserConfiguration.RobloxPort); diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.resx b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.resx index f8e32a7..d10d3da 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.resx +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.resx @@ -136,7 +136,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB0 - CQAAAk1TRnQBSQFMAgEBAgEAAdgBAAHYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAgEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 017e835..926ac4c 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -58,7 +58,7 @@ namespace NovetusLauncher public ComboBox StyleSelectorBox = null; public CheckBox CloseOnLaunchCheckbox, DiscordPresenceCheckbox, uPnPCheckBox, ShowServerNotifsCheckBox, LocalPlayCheckBox = null; public Button RegeneratePlayerIDButton = null; - public NumericUpDown PlayerLimitBox, HostPortBox, JoinPortBox = null; + public NumericUpDown PlayerLimitBox, HostPortBox = null; public string TabPageHost, TabPageMaps, TabPageClients, TabPageSaved, OldIP = ""; private ToolTip contextToolTip; #endregion @@ -571,7 +571,7 @@ namespace NovetusLauncher SelectedMapLabel.Text = GlobalVars.UserConfiguration.Map; Tree.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.UserConfiguration.Map, Tree.Nodes); Tree.Focus(); - JoinPortBox.Value = Convert.ToDecimal(GlobalVars.CurrentServer.ServerPort); + IPBox.Text = GlobalVars.CurrentServer.ToString(); HostPortBox.Value = Convert.ToDecimal(GlobalVars.UserConfiguration.RobloxPort); IPLabel.Text = GlobalVars.CurrentServer.ServerIP; PortLabel.Text = GlobalVars.CurrentServer.ServerPort.ToString(); @@ -906,16 +906,16 @@ namespace NovetusLauncher public void SelectIPListing() { GlobalVars.CurrentServer.ServerIP = ServerBox.SelectedItem.ToString(); - IPBox.Text = GlobalVars.CurrentServer.ServerIP; LocalPlayCheckBox.Enabled = false; GlobalVars.LocalPlayMode = false; IPLabel.Text = GlobalVars.CurrentServer.ServerIP; + IPBox.Text = GlobalVars.CurrentServer.ToString(); } public void SelectPortListing() { GlobalVars.CurrentServer.ServerPort = Convert.ToInt32(PortBox.SelectedItem.ToString()); - JoinPortBox.Value = Convert.ToDecimal(GlobalVars.CurrentServer.ServerPort); + IPBox.Text = GlobalVars.CurrentServer.ToString(); } public void ResetCurPort(NumericUpDown box, int value) @@ -924,10 +924,25 @@ namespace NovetusLauncher value = GlobalVars.DefaultRobloxPort; } - public void ChangeJoinPort() + public void ChangeServerAddress() { - GlobalVars.CurrentServer.ServerPort = Convert.ToInt32(JoinPortBox.Value); + GlobalVars.CurrentServer.SetValues(IPBox.Text); PortLabel.Text = GlobalVars.CurrentServer.ServerPort.ToString(); + IPLabel.Text = GlobalVars.CurrentServer.ServerIP; + + switch (GlobalVars.SelectedClientInfo.UsesID) + { + case true: + if (GlobalVars.CurrentServer.ServerIP.Equals("localhost")) + { + LocalPlayCheckBox.Enabled = true; + } + break; + case false: + LocalPlayCheckBox.Enabled = false; + GlobalVars.LocalPlayMode = false; + break; + } } public void ChangeServerPort() diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs index 8fc2377..49c5295 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylish.cs @@ -115,7 +115,6 @@ namespace NovetusLauncher launcherFormStylishInterface1.mapsBox.SelectedNode.BackColor = SystemColors.Highlight; launcherFormStylishInterface1.mapsBox.SelectedNode.ForeColor = SystemColors.HighlightText; } - launcherFormStylishInterface1.joinPortBox.Text = GlobalVars.CurrentServer.ServerPort.ToString(); launcherFormStylishInterface1.serverPortBox.Text = GlobalVars.UserConfiguration.RobloxPort.ToString(); launcherFormStylishInterface1.discordRichPresenceBox.IsChecked = GlobalVars.UserConfiguration.DiscordPresence; launcherFormStylishInterface1.uPnPBox.IsChecked = GlobalVars.UserConfiguration.UPnP; diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml index 941669d..9ffe03a 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml @@ -761,20 +761,18 @@