diff --git a/ServCreator/.vs/ServCreator/v16/.suo b/ServCreator/.vs/ServCreator/v16/.suo index 37d7c19..57eb526 100644 Binary files a/ServCreator/.vs/ServCreator/v16/.suo and b/ServCreator/.vs/ServCreator/v16/.suo differ diff --git a/ServCreator/ServCreator/App.config b/ServCreator/ServCreator/App.config index 56efbc7..bf38180 100644 --- a/ServCreator/ServCreator/App.config +++ b/ServCreator/ServCreator/App.config @@ -1,6 +1,24 @@  + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServCreator/ServCreator/ControlPanelForm.Designer.cs b/ServCreator/ServCreator/ControlPanelForm.Designer.cs index 9b970f8..92afbc6 100644 --- a/ServCreator/ServCreator/ControlPanelForm.Designer.cs +++ b/ServCreator/ServCreator/ControlPanelForm.Designer.cs @@ -35,23 +35,24 @@ namespace ServCreator this.commandInput = new System.Windows.Forms.TextBox(); this.submit = new System.Windows.Forms.Button(); this.startBtn = new System.Windows.Forms.Button(); - this.stopBtn = new System.Windows.Forms.Button(); + this.killBtn = new System.Windows.Forms.Button(); this.servMgmtBox = new System.Windows.Forms.GroupBox(); + this.stopBtn = new System.Windows.Forms.Button(); this.playerMgmtBox = new System.Windows.Forms.GroupBox(); - this.nicknameTb = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.opBtn = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.reasonPlayerTxt = new System.Windows.Forms.RichTextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.banPlayerBtn = new System.Windows.Forms.Button(); this.kickBtn = new System.Windows.Forms.Button(); + this.banPlayerBtn = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.reasonPlayerTxt = new System.Windows.Forms.RichTextBox(); + this.opBtn = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.nicknameTb = new System.Windows.Forms.TextBox(); this.ipBanBox = new System.Windows.Forms.GroupBox(); + this.label4 = new System.Windows.Forms.Label(); + this.ipTxt = new System.Windows.Forms.TextBox(); this.banIPBtn = new System.Windows.Forms.Button(); this.label3 = new System.Windows.Forms.Label(); this.reasonIpTxt = new System.Windows.Forms.RichTextBox(); - this.ipTxt = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); this.serverLabel = new System.Windows.Forms.Label(); this.servMgmtBox.SuspendLayout(); this.playerMgmtBox.SuspendLayout(); @@ -62,7 +63,7 @@ namespace ServCreator // editProperties // this.editProperties.ForeColor = System.Drawing.Color.Black; - this.editProperties.Location = new System.Drawing.Point(6, 48); + this.editProperties.Location = new System.Drawing.Point(6, 77); this.editProperties.Name = "editProperties"; this.editProperties.Size = new System.Drawing.Size(145, 23); this.editProperties.TabIndex = 0; @@ -103,37 +104,53 @@ namespace ServCreator this.startBtn.ForeColor = System.Drawing.Color.Black; this.startBtn.Location = new System.Drawing.Point(6, 19); this.startBtn.Name = "startBtn"; - this.startBtn.Size = new System.Drawing.Size(68, 23); + this.startBtn.Size = new System.Drawing.Size(145, 23); this.startBtn.TabIndex = 4; this.startBtn.Text = "Start"; this.startBtn.UseVisualStyleBackColor = true; this.startBtn.Click += new System.EventHandler(this.button3_Click); // + // killBtn + // + this.killBtn.BackColor = System.Drawing.Color.Red; + this.killBtn.Enabled = false; + this.killBtn.FlatAppearance.BorderColor = System.Drawing.Color.Red; + this.killBtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.killBtn.ForeColor = System.Drawing.Color.White; + this.killBtn.Location = new System.Drawing.Point(83, 48); + this.killBtn.Name = "killBtn"; + this.killBtn.Size = new System.Drawing.Size(68, 23); + this.killBtn.TabIndex = 5; + this.killBtn.Text = "Kill"; + this.killBtn.UseVisualStyleBackColor = false; + this.killBtn.Click += new System.EventHandler(this.killBtn_Click); + // + // servMgmtBox + // + this.servMgmtBox.Controls.Add(this.stopBtn); + this.servMgmtBox.Controls.Add(this.startBtn); + this.servMgmtBox.Controls.Add(this.killBtn); + this.servMgmtBox.Controls.Add(this.editProperties); + this.servMgmtBox.ForeColor = System.Drawing.Color.White; + this.servMgmtBox.Location = new System.Drawing.Point(12, 109); + this.servMgmtBox.Name = "servMgmtBox"; + this.servMgmtBox.Size = new System.Drawing.Size(157, 107); + this.servMgmtBox.TabIndex = 6; + this.servMgmtBox.TabStop = false; + this.servMgmtBox.Text = "Server Management"; + // // stopBtn // this.stopBtn.Enabled = false; this.stopBtn.ForeColor = System.Drawing.Color.Black; - this.stopBtn.Location = new System.Drawing.Point(83, 19); + this.stopBtn.Location = new System.Drawing.Point(6, 48); this.stopBtn.Name = "stopBtn"; this.stopBtn.Size = new System.Drawing.Size(68, 23); - this.stopBtn.TabIndex = 5; + this.stopBtn.TabIndex = 6; this.stopBtn.Text = "Stop"; this.stopBtn.UseVisualStyleBackColor = true; this.stopBtn.Click += new System.EventHandler(this.stopBtn_Click); // - // servMgmtBox - // - this.servMgmtBox.Controls.Add(this.startBtn); - this.servMgmtBox.Controls.Add(this.stopBtn); - this.servMgmtBox.Controls.Add(this.editProperties); - this.servMgmtBox.ForeColor = System.Drawing.Color.White; - this.servMgmtBox.Location = new System.Drawing.Point(12, 134); - this.servMgmtBox.Name = "servMgmtBox"; - this.servMgmtBox.Size = new System.Drawing.Size(157, 82); - this.servMgmtBox.TabIndex = 6; - this.servMgmtBox.TabStop = false; - this.servMgmtBox.Text = "Server Management"; - // // playerMgmtBox // this.playerMgmtBox.Controls.Add(this.groupBox3); @@ -149,33 +166,6 @@ namespace ServCreator this.playerMgmtBox.TabStop = false; this.playerMgmtBox.Text = "Player Management"; // - // nicknameTb - // - this.nicknameTb.Location = new System.Drawing.Point(6, 35); - this.nicknameTb.Name = "nicknameTb"; - this.nicknameTb.Size = new System.Drawing.Size(145, 20); - this.nicknameTb.TabIndex = 0; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 19); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(90, 13); - this.label1.TabIndex = 1; - this.label1.Text = "Player Nickname:"; - // - // opBtn - // - this.opBtn.ForeColor = System.Drawing.Color.Black; - this.opBtn.Location = new System.Drawing.Point(6, 62); - this.opBtn.Name = "opBtn"; - this.opBtn.Size = new System.Drawing.Size(145, 23); - this.opBtn.TabIndex = 2; - this.opBtn.Text = "Give OP"; - this.opBtn.UseVisualStyleBackColor = true; - this.opBtn.Click += new System.EventHandler(this.opBtn_Click); - // // groupBox3 // this.groupBox3.Controls.Add(this.kickBtn); @@ -190,23 +180,15 @@ namespace ServCreator this.groupBox3.TabStop = false; this.groupBox3.Text = "Ban or Kick Player"; // - // reasonPlayerTxt + // kickBtn // - this.reasonPlayerTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.reasonPlayerTxt.Location = new System.Drawing.Point(6, 36); - this.reasonPlayerTxt.Name = "reasonPlayerTxt"; - this.reasonPlayerTxt.Size = new System.Drawing.Size(133, 42); - this.reasonPlayerTxt.TabIndex = 0; - this.reasonPlayerTxt.Text = ""; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(7, 20); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(47, 13); - this.label2.TabIndex = 1; - this.label2.Text = "Reason:"; + this.kickBtn.ForeColor = System.Drawing.Color.Black; + this.kickBtn.Location = new System.Drawing.Point(77, 85); + this.kickBtn.Name = "kickBtn"; + this.kickBtn.Size = new System.Drawing.Size(62, 23); + this.kickBtn.TabIndex = 3; + this.kickBtn.Text = "Kick"; + this.kickBtn.UseVisualStyleBackColor = true; // // banPlayerBtn // @@ -219,15 +201,50 @@ namespace ServCreator this.banPlayerBtn.UseVisualStyleBackColor = true; this.banPlayerBtn.Click += new System.EventHandler(this.banPlayerBtn_Click); // - // kickBtn + // label2 // - this.kickBtn.ForeColor = System.Drawing.Color.Black; - this.kickBtn.Location = new System.Drawing.Point(77, 85); - this.kickBtn.Name = "kickBtn"; - this.kickBtn.Size = new System.Drawing.Size(62, 23); - this.kickBtn.TabIndex = 3; - this.kickBtn.Text = "Kick"; - this.kickBtn.UseVisualStyleBackColor = true; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 20); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(47, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Reason:"; + // + // reasonPlayerTxt + // + this.reasonPlayerTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.reasonPlayerTxt.Location = new System.Drawing.Point(6, 36); + this.reasonPlayerTxt.Name = "reasonPlayerTxt"; + this.reasonPlayerTxt.Size = new System.Drawing.Size(133, 42); + this.reasonPlayerTxt.TabIndex = 0; + this.reasonPlayerTxt.Text = ""; + // + // opBtn + // + this.opBtn.ForeColor = System.Drawing.Color.Black; + this.opBtn.Location = new System.Drawing.Point(6, 62); + this.opBtn.Name = "opBtn"; + this.opBtn.Size = new System.Drawing.Size(145, 23); + this.opBtn.TabIndex = 2; + this.opBtn.Text = "Give OP"; + this.opBtn.UseVisualStyleBackColor = true; + this.opBtn.Click += new System.EventHandler(this.opBtn_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(90, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Player Nickname:"; + // + // nicknameTb + // + this.nicknameTb.Location = new System.Drawing.Point(6, 35); + this.nicknameTb.Name = "nicknameTb"; + this.nicknameTb.Size = new System.Drawing.Size(145, 20); + this.nicknameTb.TabIndex = 0; // // ipBanBox // @@ -245,6 +262,22 @@ namespace ServCreator this.ipBanBox.TabStop = false; this.ipBanBox.Text = "Ban for Player IP"; // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 20); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(61, 13); + this.label4.TabIndex = 4; + this.label4.Text = "IP Address:"; + // + // ipTxt + // + this.ipTxt.Location = new System.Drawing.Point(6, 36); + this.ipTxt.Name = "ipTxt"; + this.ipTxt.Size = new System.Drawing.Size(145, 20); + this.ipTxt.TabIndex = 3; + // // banIPBtn // this.banIPBtn.ForeColor = System.Drawing.Color.Black; @@ -274,29 +307,13 @@ namespace ServCreator this.reasonIpTxt.TabIndex = 0; this.reasonIpTxt.Text = ""; // - // ipTxt - // - this.ipTxt.Location = new System.Drawing.Point(6, 36); - this.ipTxt.Name = "ipTxt"; - this.ipTxt.Size = new System.Drawing.Size(145, 20); - this.ipTxt.TabIndex = 3; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 20); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(61, 13); - this.label4.TabIndex = 4; - this.label4.Text = "IP Address:"; - // // serverLabel // this.serverLabel.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.serverLabel.ForeColor = System.Drawing.Color.White; this.serverLabel.Location = new System.Drawing.Point(12, 12); this.serverLabel.Name = "serverLabel"; - this.serverLabel.Size = new System.Drawing.Size(157, 119); + this.serverLabel.Size = new System.Drawing.Size(157, 94); this.serverLabel.TabIndex = 8; // // ControlPanelForm @@ -336,7 +353,7 @@ namespace ServCreator private System.Windows.Forms.TextBox commandInput; private System.Windows.Forms.Button submit; private System.Windows.Forms.Button startBtn; - private System.Windows.Forms.Button stopBtn; + private System.Windows.Forms.Button killBtn; private System.Windows.Forms.GroupBox servMgmtBox; private System.Windows.Forms.GroupBox playerMgmtBox; private System.Windows.Forms.GroupBox groupBox3; @@ -354,5 +371,6 @@ namespace ServCreator private System.Windows.Forms.Label label3; private System.Windows.Forms.RichTextBox reasonIpTxt; private System.Windows.Forms.Label serverLabel; + private System.Windows.Forms.Button stopBtn; } } \ No newline at end of file diff --git a/ServCreator/ServCreator/ControlPanelForm.cs b/ServCreator/ServCreator/ControlPanelForm.cs index 68122e2..1d34441 100644 --- a/ServCreator/ServCreator/ControlPanelForm.cs +++ b/ServCreator/ServCreator/ControlPanelForm.cs @@ -43,7 +43,10 @@ namespace ServCreator private void ControlPanelForm_Load(object sender, EventArgs e) { string ip = null; - string port = null; + + Form1 frm1 = new Form1(); + frm1.Visible = false; + StreamReader jsonToString = new StreamReader(configFilePath); config = jsonToString.ReadToEnd(); Server server = JsonConvert.DeserializeObject(config); @@ -56,7 +59,6 @@ namespace ServCreator StreamReader streamReader = new StreamReader(serverPath + "\\server.properties"); string ipLine; - string portLine; while((ipLine = streamReader.ReadLine()) != null) { @@ -90,6 +92,7 @@ namespace ServCreator private void button3_Click(object sender, EventArgs e) { + outputText.Text = "Loading server. Please wait..."; enableBoxes(true); process = new Process { @@ -164,10 +167,11 @@ namespace ServCreator playerMgmtBox.Enabled = value; ipBanBox.Enabled = value; stopBtn.Enabled = value; + killBtn.Enabled = value; startBtn.Enabled = !value; } - private void stopBtn_Click(object sender, EventArgs e) { process.StandardInput.WriteLine("stop"); enableBoxes(false); } + private void stopBtn_Click(object sender, EventArgs e) { process.StandardInput.WriteLine("stop"); enableBoxes(false); outputText.Text += "Server has been stoped."; } private void opBtn_Click(object sender, EventArgs e) { process.StandardInput.WriteLine("op " + nicknameTb.Text); } private void banPlayerBtn_Click(object sender, EventArgs e) @@ -185,5 +189,12 @@ namespace ServCreator else process.StandardInput.WriteLine("ban " + ipTxt.Text); } + + private void killBtn_Click(object sender, EventArgs e) + { + Process.Start("cmd.exe", "/c taskkill /f /im java.exe"); + enableBoxes(false); + outputText.Text += "Server has been killed."; + } } } diff --git a/ServCreator/ServCreator/CreateForm.cs b/ServCreator/ServCreator/CreateForm.cs index 82c4001..da9dd85 100644 --- a/ServCreator/ServCreator/CreateForm.cs +++ b/ServCreator/ServCreator/CreateForm.cs @@ -16,6 +16,7 @@ namespace ServCreator { public partial class CreateForm : Form { + static Properties.Settings conf = new Properties.Settings(); public CreateForm() { InitializeComponent(); @@ -67,15 +68,15 @@ namespace ServCreator server.Path = serverPathTB.Text; server.Engine = serverEngineCB.Text; server.Version = serverVersionCB.Text; - StreamWriter configWriter = new StreamWriter(serverPathTB.Text + "\\servmanager.json"); + StreamWriter configWriter = new StreamWriter(serverPathTB.Text + "\\servmanager.srv"); configWriter.Write(JsonConvert.SerializeObject(server)); configWriter.Close(); downloader.DownloadFileCompleted += (s, v) => { progressBar1.Visible = false; - MessageBox.Show("Server " + serverNameTB.Text + " was created in a folder: " + serverPathTB.Text + ". After a short moment you will be redirected to the control panel."); + MessageBox.Show("Server " + serverNameTB.Text + " has been created in: " + serverPathTB.Text + ". After pressing the OK button you'll be taken to the control panel."); - ControlPanelForm controlPanel = new ControlPanelForm(serverPathTB.Text + "\\servmanager.json"); + ControlPanelForm controlPanel = new ControlPanelForm(serverPathTB.Text + "\\servmanager.srv"); controlPanel.Show(); this.Close(); @@ -102,13 +103,10 @@ namespace ServCreator { [JsonProperty] public string Name { get; set; } - [JsonProperty] public string Path { get; set; } - [JsonProperty] public string Version { get; set; } - [JsonProperty] public string Engine { get; set; } diff --git a/ServCreator/ServCreator/Form1.Designer.cs b/ServCreator/ServCreator/Form1.Designer.cs index d629f49..d210902 100644 --- a/ServCreator/ServCreator/Form1.Designer.cs +++ b/ServCreator/ServCreator/Form1.Designer.cs @@ -31,9 +31,7 @@ namespace ServCreator { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.label1 = new System.Windows.Forms.Label(); - this.serverList = new System.Windows.Forms.ComboBox(); this.createBtn = new System.Windows.Forms.Button(); - this.selectBtn = new System.Windows.Forms.Button(); this.loadBtn = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.SuspendLayout(); @@ -41,27 +39,16 @@ namespace ServCreator // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Location = new System.Drawing.Point(14, 30); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(166, 17); + this.label1.Size = new System.Drawing.Size(249, 17); this.label1.TabIndex = 0; - this.label1.Text = "Select a server, to manage:"; - // - // serverList - // - this.serverList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.serverList.FormattingEnabled = true; - this.serverList.Items.AddRange(new object[] { - "Hmm... There is no server. Create a new one."}); - this.serverList.Location = new System.Drawing.Point(12, 33); - this.serverList.Name = "serverList"; - this.serverList.Size = new System.Drawing.Size(312, 25); - this.serverList.TabIndex = 1; + this.label1.Text = "Load existing server or create a new one:"; // // createBtn // this.createBtn.ForeColor = System.Drawing.Color.Black; - this.createBtn.Location = new System.Drawing.Point(190, 64); + this.createBtn.Location = new System.Drawing.Point(141, 50); this.createBtn.Name = "createBtn"; this.createBtn.Size = new System.Drawing.Size(64, 25); this.createBtn.TabIndex = 2; @@ -69,20 +56,10 @@ namespace ServCreator this.createBtn.UseVisualStyleBackColor = true; this.createBtn.Click += new System.EventHandler(this.createBtn_Click); // - // selectBtn - // - this.selectBtn.ForeColor = System.Drawing.Color.Black; - this.selectBtn.Location = new System.Drawing.Point(260, 64); - this.selectBtn.Name = "selectBtn"; - this.selectBtn.Size = new System.Drawing.Size(64, 25); - this.selectBtn.TabIndex = 3; - this.selectBtn.Text = "Select"; - this.selectBtn.UseVisualStyleBackColor = true; - // // loadBtn // this.loadBtn.ForeColor = System.Drawing.Color.Black; - this.loadBtn.Location = new System.Drawing.Point(120, 64); + this.loadBtn.Location = new System.Drawing.Point(71, 50); this.loadBtn.Name = "loadBtn"; this.loadBtn.Size = new System.Drawing.Size(64, 25); this.loadBtn.TabIndex = 4; @@ -92,18 +69,18 @@ namespace ServCreator // // openFileDialog1 // - this.openFileDialog1.FileName = "openFileDialog1"; + this.openFileDialog1.FileName = "servmanager.srv"; + this.openFileDialog1.Filter = "ServManager File (servmanager.srv)|servmanager.srv"; + this.openFileDialog1.FilterIndex = 0; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.ClientSize = new System.Drawing.Size(336, 104); + this.ClientSize = new System.Drawing.Size(276, 104); this.Controls.Add(this.loadBtn); - this.Controls.Add(this.selectBtn); this.Controls.Add(this.createBtn); - this.Controls.Add(this.serverList); this.Controls.Add(this.label1); this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.ForeColor = System.Drawing.Color.White; @@ -121,9 +98,7 @@ namespace ServCreator #endregion private System.Windows.Forms.Label label1; - private System.Windows.Forms.ComboBox serverList; private System.Windows.Forms.Button createBtn; - private System.Windows.Forms.Button selectBtn; private System.Windows.Forms.Button loadBtn; private System.Windows.Forms.OpenFileDialog openFileDialog1; } diff --git a/ServCreator/ServCreator/Form1.cs b/ServCreator/ServCreator/Form1.cs index 139ba72..be6f3ea 100644 --- a/ServCreator/ServCreator/Form1.cs +++ b/ServCreator/ServCreator/Form1.cs @@ -14,6 +14,7 @@ namespace ServCreator { public partial class Form1 : Form { + static Properties.Settings conf = new Properties.Settings(); public Form1() { InitializeComponent(); @@ -55,7 +56,7 @@ namespace ServCreator private void Form1_Load(object sender, EventArgs e) { - serverList.SelectedIndex = 0; + } } } diff --git a/ServCreator/ServCreator/Properties/Settings.Designer.cs b/ServCreator/ServCreator/Properties/Settings.Designer.cs index 2dd3ea3..c1d9ba8 100644 --- a/ServCreator/ServCreator/Properties/Settings.Designer.cs +++ b/ServCreator/ServCreator/Properties/Settings.Designer.cs @@ -8,22 +8,55 @@ // //------------------------------------------------------------------------------ - -namespace ServCreator.Properties -{ +namespace ServCreator.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string lastUsed01 { + get { + return ((string)(this["lastUsed01"])); + } + set { + this["lastUsed01"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string lastUsed02 { + get { + return ((string)(this["lastUsed02"])); + } + set { + this["lastUsed02"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string lastUsed03 { + get { + return ((string)(this["lastUsed03"])); + } + set { + this["lastUsed03"] = value; + } + } } } diff --git a/ServCreator/ServCreator/Properties/Settings.settings b/ServCreator/ServCreator/Properties/Settings.settings index 3964565..73f8b00 100644 --- a/ServCreator/ServCreator/Properties/Settings.settings +++ b/ServCreator/ServCreator/Properties/Settings.settings @@ -1,7 +1,15 @@  - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs b/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs index 9d58a19..ebf5a6d 100644 --- a/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs +++ b/ServCreator/ServCreator/PropertiesEditorForm.Designer.cs @@ -35,13 +35,60 @@ namespace ServCreator this.panel1 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.advanced = new System.Windows.Forms.TabPage(); + this.simple = new System.Windows.Forms.TabPage(); + this.label2 = new System.Windows.Forms.Label(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.label4 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.checkBox6 = new System.Windows.Forms.CheckBox(); + this.checkBox7 = new System.Windows.Forms.CheckBox(); + this.label6 = new System.Windows.Forms.Label(); + this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); + this.label7 = new System.Windows.Forms.Label(); + this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); + this.label8 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.checkBox8 = new System.Windows.Forms.CheckBox(); + this.checkBox9 = new System.Windows.Forms.CheckBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.numericUpDown5 = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.checkBox10 = new System.Windows.Forms.CheckBox(); + this.checkBox11 = new System.Windows.Forms.CheckBox(); + this.checkBox12 = new System.Windows.Forms.CheckBox(); + this.checkBox13 = new System.Windows.Forms.CheckBox(); + this.label12 = new System.Windows.Forms.Label(); + this.richTextBox2 = new System.Windows.Forms.RichTextBox(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.panel3.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.advanced.SuspendLayout(); + this.simple.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit(); this.SuspendLayout(); // // label1 @@ -51,7 +98,7 @@ namespace ServCreator this.label1.ForeColor = System.Drawing.Color.White; this.label1.Location = new System.Drawing.Point(0, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(711, 45); + this.label1.Size = new System.Drawing.Size(532, 45); this.label1.TabIndex = 0; this.label1.Text = " You\'re editing properties for {SERVER_NAME}"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -61,15 +108,15 @@ namespace ServCreator this.panel1.Dock = System.Windows.Forms.DockStyle.Left; this.panel1.Location = new System.Drawing.Point(0, 45); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(12, 365); + this.panel1.Size = new System.Drawing.Size(12, 382); this.panel1.TabIndex = 1; // // panel2 // this.panel2.Dock = System.Windows.Forms.DockStyle.Right; - this.panel2.Location = new System.Drawing.Point(702, 45); + this.panel2.Location = new System.Drawing.Point(523, 45); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(9, 365); + this.panel2.Size = new System.Drawing.Size(9, 382); this.panel2.TabIndex = 2; // // panel3 @@ -77,23 +124,26 @@ namespace ServCreator this.panel3.Controls.Add(this.button2); this.panel3.Controls.Add(this.button1); this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel3.Location = new System.Drawing.Point(0, 410); + this.panel3.Location = new System.Drawing.Point(0, 427); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(711, 40); + this.panel3.Size = new System.Drawing.Size(532, 40); this.panel3.TabIndex = 3; // - // richTextBox1 + // button2 // - this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.richTextBox1.Location = new System.Drawing.Point(12, 45); - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(690, 365); - this.richTextBox1.TabIndex = 4; - this.richTextBox1.Text = ""; + this.button2.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.button2.Location = new System.Drawing.Point(342, 6); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(97, 23); + this.button2.TabIndex = 1; + this.button2.Text = "Save and Quit"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); // // button1 // - this.button1.Location = new System.Drawing.Point(624, 6); + this.button1.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.button1.Location = new System.Drawing.Point(445, 6); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; @@ -101,15 +151,14 @@ namespace ServCreator this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // - // button2 + // richTextBox1 // - this.button2.Location = new System.Drawing.Point(521, 6); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(97, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Save and Quit"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox1.Location = new System.Drawing.Point(3, 3); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(676, 350); + this.richTextBox1.TabIndex = 4; + this.richTextBox1.Text = ""; // // contextMenuStrip1 // @@ -124,13 +173,488 @@ namespace ServCreator this.copyToolStripMenuItem.Size = new System.Drawing.Size(102, 22); this.copyToolStripMenuItem.Text = "Copy"; // + // tabControl1 + // + this.tabControl1.Controls.Add(this.simple); + this.tabControl1.Controls.Add(this.advanced); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(12, 45); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(511, 382); + this.tabControl1.TabIndex = 5; + // + // advanced + // + this.advanced.Controls.Add(this.richTextBox1); + this.advanced.Location = new System.Drawing.Point(4, 22); + this.advanced.Name = "advanced"; + this.advanced.Padding = new System.Windows.Forms.Padding(3); + this.advanced.Size = new System.Drawing.Size(682, 356); + this.advanced.TabIndex = 0; + this.advanced.Text = "Full server.properties file"; + this.advanced.UseVisualStyleBackColor = true; + // + // simple + // + this.simple.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.simple.Controls.Add(this.linkLabel1); + this.simple.Controls.Add(this.richTextBox2); + this.simple.Controls.Add(this.label12); + this.simple.Controls.Add(this.checkBox12); + this.simple.Controls.Add(this.checkBox13); + this.simple.Controls.Add(this.checkBox10); + this.simple.Controls.Add(this.checkBox11); + this.simple.Controls.Add(this.numericUpDown5); + this.simple.Controls.Add(this.label11); + this.simple.Controls.Add(this.textBox3); + this.simple.Controls.Add(this.label10); + this.simple.Controls.Add(this.checkBox8); + this.simple.Controls.Add(this.checkBox9); + this.simple.Controls.Add(this.textBox2); + this.simple.Controls.Add(this.label9); + this.simple.Controls.Add(this.numericUpDown4); + this.simple.Controls.Add(this.label8); + this.simple.Controls.Add(this.numericUpDown3); + this.simple.Controls.Add(this.label7); + this.simple.Controls.Add(this.numericUpDown2); + this.simple.Controls.Add(this.label6); + this.simple.Controls.Add(this.checkBox7); + this.simple.Controls.Add(this.checkBox6); + this.simple.Controls.Add(this.checkBox5); + this.simple.Controls.Add(this.checkBox4); + this.simple.Controls.Add(this.checkBox3); + this.simple.Controls.Add(this.comboBox2); + this.simple.Controls.Add(this.label5); + this.simple.Controls.Add(this.comboBox1); + this.simple.Controls.Add(this.label4); + this.simple.Controls.Add(this.checkBox2); + this.simple.Controls.Add(this.checkBox1); + this.simple.Controls.Add(this.textBox1); + this.simple.Controls.Add(this.label3); + this.simple.Controls.Add(this.numericUpDown1); + this.simple.Controls.Add(this.label2); + this.simple.ForeColor = System.Drawing.Color.White; + this.simple.Location = new System.Drawing.Point(4, 22); + this.simple.Name = "simple"; + this.simple.Padding = new System.Windows.Forms.Padding(3); + this.simple.Size = new System.Drawing.Size(503, 356); + this.simple.TabIndex = 1; + this.simple.Text = "Simple configuration"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(31, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(94, 13); + this.label2.TabIndex = 0; + this.label2.Text = "Spawn Protection:"; + // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(131, 7); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(60, 20); + this.numericUpDown1.TabIndex = 1; + this.numericUpDown1.Value = new decimal(new int[] { + 16, + 0, + 0, + 0}); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(27, 36); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(98, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Generator Settings:"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(131, 33); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(121, 20); + this.textBox1.TabIndex = 3; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox1.Location = new System.Drawing.Point(32, 59); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(113, 17); + this.checkBox1.TabIndex = 4; + this.checkBox1.Text = "Force Gamemode:"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox2.Checked = true; + this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox2.Location = new System.Drawing.Point(163, 59); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(89, 17); + this.checkBox2.TabIndex = 5; + this.checkBox2.Text = "Allow Nether:"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(61, 85); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(64, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Gamemode:"; + // + // comboBox1 + // + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "survival", + "adventure", + "creative"}); + this.comboBox1.Location = new System.Drawing.Point(131, 82); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(121, 21); + this.comboBox1.TabIndex = 1; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(75, 112); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(50, 13); + this.label5.TabIndex = 8; + this.label5.Text = "Difficulty:"; + // + // comboBox2 + // + this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Items.AddRange(new object[] { + "peaceful", + "easy", + "normal", + "hard"}); + this.comboBox2.Location = new System.Drawing.Point(131, 109); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(121, 21); + this.comboBox2.TabIndex = 9; + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox3.Checked = true; + this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox3.Location = new System.Drawing.Point(37, 136); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(108, 17); + this.checkBox3.TabIndex = 10; + this.checkBox3.Text = "Spawn Monsters:"; + this.checkBox3.UseVisualStyleBackColor = true; + // + // checkBox4 + // + this.checkBox4.AutoSize = true; + this.checkBox4.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox4.Checked = true; + this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox4.Location = new System.Drawing.Point(167, 136); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(85, 17); + this.checkBox4.TabIndex = 11; + this.checkBox4.Text = "Enable PvP:"; + this.checkBox4.UseVisualStyleBackColor = true; + // + // checkBox5 + // + this.checkBox5.AutoSize = true; + this.checkBox5.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox5.Location = new System.Drawing.Point(72, 159); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.Size = new System.Drawing.Size(73, 17); + this.checkBox5.TabIndex = 12; + this.checkBox5.Text = "Hardcore:"; + this.checkBox5.UseVisualStyleBackColor = true; + // + // checkBox6 + // + this.checkBox6.AutoSize = true; + this.checkBox6.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox6.Checked = true; + this.checkBox6.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox6.Location = new System.Drawing.Point(159, 159); + this.checkBox6.Name = "checkBox6"; + this.checkBox6.Size = new System.Drawing.Size(93, 17); + this.checkBox6.TabIndex = 13; + this.checkBox6.Text = "Enable status:"; + this.checkBox6.UseVisualStyleBackColor = true; + // + // checkBox7 + // + this.checkBox7.AutoSize = true; + this.checkBox7.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox7.Location = new System.Drawing.Point(105, 182); + this.checkBox7.Name = "checkBox7"; + this.checkBox7.Size = new System.Drawing.Size(147, 17); + this.checkBox7.TabIndex = 14; + this.checkBox7.Text = "Enable Command Blocks:"; + this.checkBox7.UseVisualStyleBackColor = true; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(58, 207); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(67, 13); + this.label6.TabIndex = 15; + this.label6.Text = "Max Players:"; + // + // numericUpDown2 + // + this.numericUpDown2.Location = new System.Drawing.Point(131, 205); + this.numericUpDown2.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.numericUpDown2.Name = "numericUpDown2"; + this.numericUpDown2.Size = new System.Drawing.Size(60, 20); + this.numericUpDown2.TabIndex = 16; + this.numericUpDown2.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // + // numericUpDown3 + // + this.numericUpDown3.Location = new System.Drawing.Point(131, 231); + this.numericUpDown3.Maximum = new decimal(new int[] { + 1410065408, + 2, + 0, + 0}); + this.numericUpDown3.Name = "numericUpDown3"; + this.numericUpDown3.Size = new System.Drawing.Size(121, 20); + this.numericUpDown3.TabIndex = 18; + this.numericUpDown3.Value = new decimal(new int[] { + 29999984, + 0, + 0, + 0}); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(41, 233); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(84, 13); + this.label7.TabIndex = 17; + this.label7.Text = "Max World Size:"; + // + // numericUpDown4 + // + this.numericUpDown4.Location = new System.Drawing.Point(131, 257); + this.numericUpDown4.Maximum = new decimal(new int[] { + 69420, + 0, + 0, + 0}); + this.numericUpDown4.Name = "numericUpDown4"; + this.numericUpDown4.Size = new System.Drawing.Size(60, 20); + this.numericUpDown4.TabIndex = 20; + this.numericUpDown4.Value = new decimal(new int[] { + 25565, + 0, + 0, + 0}); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(62, 259); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(63, 13); + this.label8.TabIndex = 19; + this.label8.Text = "Server Port:"; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(131, 283); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(121, 20); + this.textBox2.TabIndex = 22; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(69, 286); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(54, 13); + this.label9.TabIndex = 21; + this.label9.Text = "Server IP:"; + // + // checkBox8 + // + this.checkBox8.AutoSize = true; + this.checkBox8.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox8.Location = new System.Drawing.Point(170, 309); + this.checkBox8.Name = "checkBox8"; + this.checkBox8.Size = new System.Drawing.Size(82, 17); + this.checkBox8.TabIndex = 24; + this.checkBox8.Text = "Allow Flight:"; + this.checkBox8.UseVisualStyleBackColor = true; + // + // checkBox9 + // + this.checkBox9.AutoSize = true; + this.checkBox9.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox9.Checked = true; + this.checkBox9.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox9.Location = new System.Drawing.Point(53, 309); + this.checkBox9.Name = "checkBox9"; + this.checkBox9.Size = new System.Drawing.Size(92, 17); + this.checkBox9.TabIndex = 23; + this.checkBox9.Text = "Spawn NPCs:"; + this.checkBox9.UseVisualStyleBackColor = true; + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(369, 6); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(121, 20); + this.textBox3.TabIndex = 26; + this.textBox3.Text = "world"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(296, 9); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(67, 13); + this.label10.TabIndex = 25; + this.label10.Text = "Level Name:"; + // + // numericUpDown5 + // + this.numericUpDown5.Location = new System.Drawing.Point(369, 33); + this.numericUpDown5.Maximum = new decimal(new int[] { + 64, + 0, + 0, + 0}); + this.numericUpDown5.Name = "numericUpDown5"; + this.numericUpDown5.Size = new System.Drawing.Size(60, 20); + this.numericUpDown5.TabIndex = 28; + this.numericUpDown5.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(287, 36); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(76, 13); + this.label11.TabIndex = 27; + this.label11.Text = "View distance:"; + // + // checkBox10 + // + this.checkBox10.AutoSize = true; + this.checkBox10.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox10.Location = new System.Drawing.Point(418, 59); + this.checkBox10.Name = "checkBox10"; + this.checkBox10.Size = new System.Drawing.Size(72, 17); + this.checkBox10.TabIndex = 30; + this.checkBox10.Text = "White-list:"; + this.checkBox10.UseVisualStyleBackColor = true; + // + // checkBox11 + // + this.checkBox11.AutoSize = true; + this.checkBox11.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox11.Checked = true; + this.checkBox11.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox11.Location = new System.Drawing.Point(281, 59); + this.checkBox11.Name = "checkBox11"; + this.checkBox11.Size = new System.Drawing.Size(101, 17); + this.checkBox11.TabIndex = 29; + this.checkBox11.Text = "Spawn Animals:"; + this.checkBox11.UseVisualStyleBackColor = true; + // + // checkBox12 + // + this.checkBox12.AutoSize = true; + this.checkBox12.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox12.Location = new System.Drawing.Point(401, 82); + this.checkBox12.Name = "checkBox12"; + this.checkBox12.Size = new System.Drawing.Size(89, 17); + this.checkBox12.TabIndex = 32; + this.checkBox12.Text = "Online-Mode:"; + this.checkBox12.UseVisualStyleBackColor = true; + // + // checkBox13 + // + this.checkBox13.AutoSize = true; + this.checkBox13.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.checkBox13.Checked = true; + this.checkBox13.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox13.Location = new System.Drawing.Point(258, 81); + this.checkBox13.Name = "checkBox13"; + this.checkBox13.Size = new System.Drawing.Size(124, 17); + this.checkBox13.TabIndex = 31; + this.checkBox13.Text = "Generate Structures:"; + this.checkBox13.UseVisualStyleBackColor = true; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(258, 109); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(137, 13); + this.label12.TabIndex = 33; + this.label12.Text = "Message of the Day (motd):"; + // + // richTextBox2 + // + this.richTextBox2.Location = new System.Drawing.Point(261, 126); + this.richTextBox2.Name = "richTextBox2"; + this.richTextBox2.Size = new System.Drawing.Size(229, 96); + this.richTextBox2.TabIndex = 34; + this.richTextBox2.Text = "A Minecraft Server"; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.linkLabel1.LinkColor = System.Drawing.Color.White; + this.linkLabel1.Location = new System.Drawing.Point(402, 225); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(88, 13); + this.linkLabel1.TabIndex = 35; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "MOTD Creator"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // // PropertiesEditorForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); - this.ClientSize = new System.Drawing.Size(711, 450); - this.Controls.Add(this.richTextBox1); + this.ClientSize = new System.Drawing.Size(532, 467); + this.Controls.Add(this.tabControl1); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.label1); @@ -141,6 +665,15 @@ namespace ServCreator this.Load += new System.EventHandler(this.PropertiesEditorForm_Load); this.panel3.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.advanced.ResumeLayout(false); + this.simple.ResumeLayout(false); + this.simple.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit(); this.ResumeLayout(false); } @@ -156,5 +689,44 @@ namespace ServCreator private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage simple; + private System.Windows.Forms.TabPage advanced; + private System.Windows.Forms.CheckBox checkBox6; + private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox checkBox4; + private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.CheckBox checkBox7; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.RichTextBox richTextBox2; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.CheckBox checkBox12; + private System.Windows.Forms.CheckBox checkBox13; + private System.Windows.Forms.CheckBox checkBox10; + private System.Windows.Forms.CheckBox checkBox11; + private System.Windows.Forms.NumericUpDown numericUpDown5; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.CheckBox checkBox8; + private System.Windows.Forms.CheckBox checkBox9; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown numericUpDown4; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.NumericUpDown numericUpDown3; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.NumericUpDown numericUpDown2; } } \ No newline at end of file diff --git a/ServCreator/ServCreator/PropertiesEditorForm.cs b/ServCreator/ServCreator/PropertiesEditorForm.cs index bc6cde2..1835532 100644 --- a/ServCreator/ServCreator/PropertiesEditorForm.cs +++ b/ServCreator/ServCreator/PropertiesEditorForm.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Diagnostics; using System.Windows.Forms; using System.IO; @@ -37,5 +38,10 @@ namespace ServCreator private void button1_Click(object sender, EventArgs e) { saveIt(); } private void button2_Click(object sender, EventArgs e) { saveIt(); this.Close(); } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://minecraft.tools/en/motd.php"); + } } } diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.exe b/ServCreator/ServCreator/bin/Debug/ServCreator.exe index 0bffb39..b151fe3 100644 Binary files a/ServCreator/ServCreator/bin/Debug/ServCreator.exe and b/ServCreator/ServCreator/bin/Debug/ServCreator.exe differ diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.exe.config b/ServCreator/ServCreator/bin/Debug/ServCreator.exe.config index 56efbc7..bf38180 100644 --- a/ServCreator/ServCreator/bin/Debug/ServCreator.exe.config +++ b/ServCreator/ServCreator/bin/Debug/ServCreator.exe.config @@ -1,6 +1,24 @@  + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.pdb b/ServCreator/ServCreator/bin/Debug/ServCreator.pdb index 0e9a24c..cce4c63 100644 Binary files a/ServCreator/ServCreator/bin/Debug/ServCreator.pdb and b/ServCreator/ServCreator/bin/Debug/ServCreator.pdb differ diff --git a/ServCreator/ServCreator/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ServCreator/ServCreator/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 53f6a01..a33d438 100644 Binary files a/ServCreator/ServCreator/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/ServCreator/ServCreator/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache index ccf7681..d7550e2 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache and b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache b/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache index 8fd6531..7b1eafb 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache and b/ServCreator/ServCreator/obj/Debug/ServCreator.csprojAssemblyReference.cache differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.exe b/ServCreator/ServCreator/obj/Debug/ServCreator.exe index 0bffb39..b151fe3 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.exe and b/ServCreator/ServCreator/obj/Debug/ServCreator.exe differ diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.pdb b/ServCreator/ServCreator/obj/Debug/ServCreator.pdb index 0e9a24c..cce4c63 100644 Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.pdb and b/ServCreator/ServCreator/obj/Debug/ServCreator.pdb differ