From 7c3e90a39b6589ae12dc99f330e308719e7d93b3 Mon Sep 17 00:00:00 2001 From: Bitl Date: Mon, 17 Jun 2019 19:08:33 -0700 Subject: [PATCH] RC4 part 3 --- .../NovetusLauncher/MainForm.Designer.cs | 22 +++++++++++++---- NovetusLauncher/NovetusLauncher/MainForm.cs | 24 ++++++++++++++++++- NovetusLauncher/NovetusLauncher/ServerInfo.cs | 17 +++++++------ 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs index 67eb72f..e1d5dcb 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs @@ -52,6 +52,7 @@ namespace NovetusLauncher this.label3 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.button24 = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.checkBox4 = new System.Windows.Forms.CheckBox(); this.button6 = new System.Windows.Forms.Button(); @@ -307,6 +308,7 @@ namespace NovetusLauncher // // tabPage2 // + this.tabPage2.Controls.Add(this.button24); this.tabPage2.Controls.Add(this.label17); this.tabPage2.Controls.Add(this.checkBox4); this.tabPage2.Controls.Add(this.button6); @@ -330,6 +332,16 @@ namespace NovetusLauncher this.tabPage2.ToolTipText = "Start a server for other players to play"; this.tabPage2.UseVisualStyleBackColor = true; // + // button24 + // + this.button24.Location = new System.Drawing.Point(204, 4); + this.button24.Name = "button24"; + this.button24.Size = new System.Drawing.Size(75, 23); + this.button24.TabIndex = 59; + this.button24.Text = "Refresh List"; + this.button24.UseVisualStyleBackColor = true; + this.button24.Click += new System.EventHandler(this.Button24Click); + // // label17 // this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -355,11 +367,12 @@ namespace NovetusLauncher // // button6 // - this.button6.Location = new System.Drawing.Point(317, 4); + this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button6.Location = new System.Drawing.Point(284, 4); this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(75, 23); + this.button6.Size = new System.Drawing.Size(108, 23); this.button6.TabIndex = 56; - this.button6.Text = "Open Folder"; + this.button6.Text = "Open Maps Folder"; this.button6.UseVisualStyleBackColor = true; this.button6.Click += new System.EventHandler(this.Button6Click); // @@ -367,7 +380,7 @@ namespace NovetusLauncher // this.textBox3.Location = new System.Drawing.Point(10, 6); this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(301, 20); + this.textBox3.Size = new System.Drawing.Size(188, 20); this.textBox3.TabIndex = 55; this.textBox3.TextChanged += new System.EventHandler(this.TextBox3TextChanged); // @@ -1136,5 +1149,6 @@ namespace NovetusLauncher private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TreeView _fieldsTreeCache; + private System.Windows.Forms.Button button24; } } diff --git a/NovetusLauncher/NovetusLauncher/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm.cs index 0b76301..d947463 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.cs @@ -269,6 +269,7 @@ namespace NovetusLauncher if (GlobalVars.CloseOnLaunch == true) { this.Visible = false; + textBox3.Text = ""; } } @@ -280,6 +281,7 @@ namespace NovetusLauncher if (GlobalVars.CloseOnLaunch == true) { this.Visible = false; + textBox3.Text = ""; } } @@ -294,6 +296,7 @@ namespace NovetusLauncher if (GlobalVars.CloseOnLaunch == true) { this.Visible = false; + textBox3.Text = ""; } } @@ -667,6 +670,7 @@ namespace NovetusLauncher if (GlobalVars.CloseOnLaunch == true) { this.Visible = false; + textBox3.Text = ""; } } @@ -678,6 +682,7 @@ namespace NovetusLauncher if (GlobalVars.CloseOnLaunch == true) { this.Visible = false; + textBox3.Text = ""; } } @@ -1432,6 +1437,11 @@ namespace NovetusLauncher void Button6Click(object sender, EventArgs e) { + + DialogResult result = MessageBox.Show("If you want to install a place into a folder, add the name of the folder as a prefix with a '-' seperator to your map's name. (Ex. [2008 - ]Thrillvile) If you want to put your place in the roor maps folder, remove ANY prefix in the map's name if it has any. Maps won't load in the root folder if they have a prefix. Maps with a prefix that's different from the folder's name will not load as well.","Novetus - Open Maps Folder", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (result == DialogResult.Cancel) + return; + Process.Start("explorer.exe", GlobalVars.MapsDir.Replace(@"\\",@"\")); } @@ -1449,7 +1459,19 @@ namespace NovetusLauncher void CheckBox4Click(object sender, EventArgs e) { - MessageBox.Show("Please restart the Novetus launcher for UPnP to take effect.","Novetus - UPnP", MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show("Please restart the Novetus launcher for the UPnP changes to take effect.","Novetus - UPnP", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + void Button24Click(object sender, EventArgs e) + { + treeView1.Nodes.Clear(); + _fieldsTreeCache.Nodes.Clear(); + textBox3.Text = ""; + string mapdir = GlobalVars.MapsDir; + TreeNodeHelper.ListDirectory(treeView1, mapdir); + TreeNodeHelper.CopyNodes(treeView1.Nodes,_fieldsTreeCache.Nodes); + treeView1.SelectedNode = TreeNodeHelper.SearchTreeView(GlobalVars.Map, treeView1.Nodes); + treeView1.Focus(); } } } diff --git a/NovetusLauncher/NovetusLauncher/ServerInfo.cs b/NovetusLauncher/NovetusLauncher/ServerInfo.cs index 1b5fb91..4aaa6a0 100644 --- a/NovetusLauncher/NovetusLauncher/ServerInfo.cs +++ b/NovetusLauncher/NovetusLauncher/ServerInfo.cs @@ -65,14 +65,17 @@ namespace NovetusLauncher textBox1.AppendText("Local URI Link:"); textBox1.AppendText(Environment.NewLine); textBox1.AppendText(URI2); - textBox1.AppendText(Environment.NewLine); - textBox1.AppendText("Web Server URL:"); textBox1.AppendText(Environment.NewLine); - textBox1.AppendText("http://" + IP + ":" + GlobalVars.WebServer.Port.ToString()); - textBox1.AppendText(Environment.NewLine); - textBox1.AppendText("Local Web Server URL:"); - textBox1.AppendText(Environment.NewLine); - textBox1.AppendText(GlobalVars.LocalWebServerURI); + if (GlobalVars.IsWebServerOn == true) + { + textBox1.AppendText("Web Server URL:"); + textBox1.AppendText(Environment.NewLine); + textBox1.AppendText("http://" + IP + ":" + GlobalVars.WebServer.Port.ToString()); + textBox1.AppendText(Environment.NewLine); + textBox1.AppendText("Local Web Server URL:"); + textBox1.AppendText(Environment.NewLine); + textBox1.AppendText(GlobalVars.LocalWebServerURI); + } } string GetExternalIPAddress()