diff --git a/ServCreator/.vs/ServCreator/v16/.suo b/ServCreator/.vs/ServCreator/v16/.suo
index 731cb0a..757973f 100644
Binary files a/ServCreator/.vs/ServCreator/v16/.suo and b/ServCreator/.vs/ServCreator/v16/.suo differ
diff --git a/ServCreator/ServCreator/ControlPanelForm.Designer.cs b/ServCreator/ServCreator/ControlPanelForm.Designer.cs
index 9e57dc7..31385a3 100644
--- a/ServCreator/ServCreator/ControlPanelForm.Designer.cs
+++ b/ServCreator/ServCreator/ControlPanelForm.Designer.cs
@@ -30,84 +30,289 @@ namespace ServCreator
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlPanelForm));
- this.button1 = new System.Windows.Forms.Button();
- this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.button2 = new System.Windows.Forms.Button();
- this.button3 = new System.Windows.Forms.Button();
- this.button4 = new System.Windows.Forms.Button();
+ this.editProperties = new System.Windows.Forms.Button();
+ this.outputText = new System.Windows.Forms.RichTextBox();
+ 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.servMgmtBox = new System.Windows.Forms.GroupBox();
+ 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.ipBanBox = new System.Windows.Forms.GroupBox();
+ 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.servMgmtBox.SuspendLayout();
+ this.playerMgmtBox.SuspendLayout();
+ this.groupBox3.SuspendLayout();
+ this.ipBanBox.SuspendLayout();
this.SuspendLayout();
//
- // button1
+ // editProperties
//
- this.button1.Location = new System.Drawing.Point(12, 415);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(127, 23);
- this.button1.TabIndex = 0;
- this.button1.Text = "Edit properties";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
+ this.editProperties.ForeColor = System.Drawing.Color.Black;
+ this.editProperties.Location = new System.Drawing.Point(6, 48);
+ this.editProperties.Name = "editProperties";
+ this.editProperties.Size = new System.Drawing.Size(145, 23);
+ this.editProperties.TabIndex = 0;
+ this.editProperties.Text = "Edit properties";
+ this.editProperties.UseVisualStyleBackColor = true;
+ this.editProperties.Click += new System.EventHandler(this.button1_Click);
//
- // richTextBox1
+ // outputText
//
- this.richTextBox1.Location = new System.Drawing.Point(156, 12);
- this.richTextBox1.Name = "richTextBox1";
- this.richTextBox1.Size = new System.Drawing.Size(632, 399);
- this.richTextBox1.TabIndex = 1;
- this.richTextBox1.Text = "";
+ this.outputText.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.outputText.Location = new System.Drawing.Point(175, 12);
+ this.outputText.Name = "outputText";
+ this.outputText.Size = new System.Drawing.Size(613, 462);
+ this.outputText.TabIndex = 1;
+ this.outputText.Text = "";
+ this.outputText.TextChanged += new System.EventHandler(this.outputChanged);
//
- // textBox1
+ // commandInput
//
- this.textBox1.Location = new System.Drawing.Point(156, 417);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(537, 20);
- this.textBox1.TabIndex = 2;
+ this.commandInput.Location = new System.Drawing.Point(175, 482);
+ this.commandInput.Name = "commandInput";
+ this.commandInput.Size = new System.Drawing.Size(518, 20);
+ this.commandInput.TabIndex = 2;
+ this.commandInput.KeyUp += new System.Windows.Forms.KeyEventHandler(this.submitCommand);
//
- // button2
+ // submit
//
- this.button2.Location = new System.Drawing.Point(699, 415);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(89, 23);
- this.button2.TabIndex = 3;
- this.button2.Text = "Sumbit";
- this.button2.UseVisualStyleBackColor = true;
+ this.submit.Location = new System.Drawing.Point(699, 480);
+ this.submit.Name = "submit";
+ this.submit.Size = new System.Drawing.Size(89, 23);
+ this.submit.TabIndex = 3;
+ this.submit.Text = "Submit";
+ this.submit.UseVisualStyleBackColor = true;
+ this.submit.Click += new System.EventHandler(this.submit_Click);
//
- // button3
+ // startBtn
//
- this.button3.Location = new System.Drawing.Point(12, 12);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(75, 23);
- this.button3.TabIndex = 4;
- this.button3.Text = "Start";
- this.button3.UseVisualStyleBackColor = true;
- this.button3.Click += new System.EventHandler(this.button3_Click);
+ 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.TabIndex = 4;
+ this.startBtn.Text = "Start";
+ this.startBtn.UseVisualStyleBackColor = true;
+ this.startBtn.Click += new System.EventHandler(this.button3_Click);
//
- // button4
+ // stopBtn
//
- this.button4.Location = new System.Drawing.Point(12, 41);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(75, 23);
- this.button4.TabIndex = 5;
- this.button4.Text = "Stop";
- this.button4.UseVisualStyleBackColor = true;
+ this.stopBtn.Enabled = false;
+ this.stopBtn.ForeColor = System.Drawing.Color.Black;
+ this.stopBtn.Location = new System.Drawing.Point(83, 19);
+ this.stopBtn.Name = "stopBtn";
+ this.stopBtn.Size = new System.Drawing.Size(68, 23);
+ this.stopBtn.TabIndex = 5;
+ 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, 12);
+ 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);
+ this.playerMgmtBox.Controls.Add(this.opBtn);
+ this.playerMgmtBox.Controls.Add(this.label1);
+ this.playerMgmtBox.Controls.Add(this.nicknameTb);
+ this.playerMgmtBox.Enabled = false;
+ this.playerMgmtBox.ForeColor = System.Drawing.Color.White;
+ this.playerMgmtBox.Location = new System.Drawing.Point(12, 100);
+ this.playerMgmtBox.Name = "playerMgmtBox";
+ this.playerMgmtBox.Size = new System.Drawing.Size(157, 213);
+ this.playerMgmtBox.TabIndex = 7;
+ 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);
+ this.groupBox3.Controls.Add(this.banPlayerBtn);
+ this.groupBox3.Controls.Add(this.label2);
+ this.groupBox3.Controls.Add(this.reasonPlayerTxt);
+ this.groupBox3.ForeColor = System.Drawing.Color.White;
+ this.groupBox3.Location = new System.Drawing.Point(6, 91);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(145, 117);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Ban or Kick Player";
+ //
+ // 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 = "";
+ //
+ // 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:";
+ //
+ // banPlayerBtn
+ //
+ this.banPlayerBtn.ForeColor = System.Drawing.Color.Black;
+ this.banPlayerBtn.Location = new System.Drawing.Point(6, 85);
+ this.banPlayerBtn.Name = "banPlayerBtn";
+ this.banPlayerBtn.Size = new System.Drawing.Size(62, 23);
+ this.banPlayerBtn.TabIndex = 2;
+ this.banPlayerBtn.Text = "Ban";
+ this.banPlayerBtn.UseVisualStyleBackColor = true;
+ this.banPlayerBtn.Click += new System.EventHandler(this.banPlayerBtn_Click);
+ //
+ // kickBtn
+ //
+ 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;
+ //
+ // ipBanBox
+ //
+ this.ipBanBox.Controls.Add(this.label4);
+ this.ipBanBox.Controls.Add(this.ipTxt);
+ this.ipBanBox.Controls.Add(this.banIPBtn);
+ this.ipBanBox.Controls.Add(this.label3);
+ this.ipBanBox.Controls.Add(this.reasonIpTxt);
+ this.ipBanBox.Enabled = false;
+ this.ipBanBox.ForeColor = System.Drawing.Color.White;
+ this.ipBanBox.Location = new System.Drawing.Point(12, 321);
+ this.ipBanBox.Name = "ipBanBox";
+ this.ipBanBox.Size = new System.Drawing.Size(157, 153);
+ this.ipBanBox.TabIndex = 4;
+ this.ipBanBox.TabStop = false;
+ this.ipBanBox.Text = "Ban for Player IP";
+ //
+ // banIPBtn
+ //
+ this.banIPBtn.ForeColor = System.Drawing.Color.Black;
+ this.banIPBtn.Location = new System.Drawing.Point(6, 123);
+ this.banIPBtn.Name = "banIPBtn";
+ this.banIPBtn.Size = new System.Drawing.Size(145, 23);
+ this.banIPBtn.TabIndex = 2;
+ this.banIPBtn.Text = "Ban";
+ this.banIPBtn.UseVisualStyleBackColor = true;
+ this.banIPBtn.Click += new System.EventHandler(this.banIPBtn_Click);
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(3, 59);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(47, 13);
+ this.label3.TabIndex = 1;
+ this.label3.Text = "Reason:";
+ //
+ // reasonIpTxt
+ //
+ this.reasonIpTxt.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.reasonIpTxt.Location = new System.Drawing.Point(6, 75);
+ this.reasonIpTxt.Name = "reasonIpTxt";
+ this.reasonIpTxt.Size = new System.Drawing.Size(145, 42);
+ 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:";
//
// ControlPanelForm
//
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(800, 450);
- this.Controls.Add(this.button4);
- this.Controls.Add(this.button3);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.textBox1);
- this.Controls.Add(this.richTextBox1);
- this.Controls.Add(this.button1);
+ this.ClientSize = new System.Drawing.Size(800, 514);
+ this.Controls.Add(this.ipBanBox);
+ this.Controls.Add(this.playerMgmtBox);
+ this.Controls.Add(this.servMgmtBox);
+ this.Controls.Add(this.submit);
+ this.Controls.Add(this.commandInput);
+ this.Controls.Add(this.outputText);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ControlPanelForm";
this.Text = "Control Panel - ServManager for Minecraft";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ControlPanelForm_FormClosing);
this.Load += new System.EventHandler(this.ControlPanelForm_Load);
+ this.servMgmtBox.ResumeLayout(false);
+ this.playerMgmtBox.ResumeLayout(false);
+ this.playerMgmtBox.PerformLayout();
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.ipBanBox.ResumeLayout(false);
+ this.ipBanBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -115,11 +320,27 @@ namespace ServCreator
#endregion
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.RichTextBox richTextBox1;
- private System.Windows.Forms.TextBox textBox1;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button editProperties;
+ private System.Windows.Forms.RichTextBox outputText;
+ 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.GroupBox servMgmtBox;
+ private System.Windows.Forms.GroupBox playerMgmtBox;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.Button kickBtn;
+ private System.Windows.Forms.Button banPlayerBtn;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.RichTextBox reasonPlayerTxt;
+ private System.Windows.Forms.Button opBtn;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox nicknameTb;
+ private System.Windows.Forms.GroupBox ipBanBox;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.TextBox ipTxt;
+ private System.Windows.Forms.Button banIPBtn;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.RichTextBox reasonIpTxt;
}
}
\ No newline at end of file
diff --git a/ServCreator/ServCreator/ControlPanelForm.cs b/ServCreator/ServCreator/ControlPanelForm.cs
index 3d94f0a..498f89c 100644
--- a/ServCreator/ServCreator/ControlPanelForm.cs
+++ b/ServCreator/ServCreator/ControlPanelForm.cs
@@ -71,6 +71,7 @@ namespace ServCreator
private void button3_Click(object sender, EventArgs e)
{
+ enableBoxes(true);
process = new Process
{
StartInfo = new ProcessStartInfo
@@ -91,8 +92,20 @@ namespace ServCreator
while (!process.StandardOutput.EndOfStream)
{
- string line = process.StandardOutput.ReadLine();
- richTextBox1.Text += line;
+ string output = process.StandardOutput.ReadLine();
+ BeginInvoke(new Action(() =>
+ {
+ outputText.Text += output + Environment.NewLine;
+ }));
+ }
+
+ while (!process.StandardError.EndOfStream)
+ {
+ string line = process.StandardError.ReadToEnd();
+ BeginInvoke(new Action(() =>
+ {
+ outputText.Text += line + Environment.NewLine;
+ }));
}
});
@@ -101,8 +114,57 @@ namespace ServCreator
private void ControlPanelForm_FormClosing(object sender, FormClosingEventArgs e)
{
- process.Kill();
+ Process.Start("cmd.exe", "/c taskkill /f /im java.exe");
Application.Exit();
}
+
+ private void submit_Click(object sender, EventArgs e)
+ {
+ process.StandardInput.WriteLine(commandInput.Text);
+ }
+
+ private void outputChanged(object sender, EventArgs e)
+ {
+ outputText.SelectionStart = outputText.Text.Length;
+ outputText.ScrollToCaret();
+ commandInput.Focus();
+ }
+
+ private void submitCommand(object sender, KeyEventArgs e)
+ {
+ if(e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return)
+ {
+ process.StandardInput.WriteLine(commandInput.Text);
+ commandInput.Text = "";
+ commandInput.Focus();
+ }
+ }
+
+ void enableBoxes(bool value)
+ {
+ playerMgmtBox.Enabled = value;
+ ipBanBox.Enabled = value;
+ stopBtn.Enabled = value;
+ startBtn.Enabled = !value;
+ }
+
+ private void stopBtn_Click(object sender, EventArgs e) { process.StandardInput.WriteLine("stop"); enableBoxes(false); }
+ private void opBtn_Click(object sender, EventArgs e) { process.StandardInput.WriteLine("op " + nicknameTb.Text); }
+
+ private void banPlayerBtn_Click(object sender, EventArgs e)
+ {
+ if(reasonPlayerTxt.Text != "")
+ process.StandardInput.WriteLine("ban " + nicknameTb.Text + " " + reasonPlayerTxt.Text);
+ else
+ process.StandardInput.WriteLine("ban " + nicknameTb.Text);
+ }
+
+ private void banIPBtn_Click(object sender, EventArgs e)
+ {
+ if (reasonIpTxt.Text != "")
+ process.StandardInput.WriteLine("ban " + ipTxt.Text + " " + reasonIpTxt.Text);
+ else
+ process.StandardInput.WriteLine("ban " + ipTxt.Text);
+ }
}
}
diff --git a/ServCreator/ServCreator/ControlPanelForm.resx b/ServCreator/ServCreator/ControlPanelForm.resx
index 9c8acf5..315624f 100644
--- a/ServCreator/ServCreator/ControlPanelForm.resx
+++ b/ServCreator/ServCreator/ControlPanelForm.resx
@@ -117,9 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 17
-
diff --git a/ServCreator/ServCreator/CreateForm.Designer.cs b/ServCreator/ServCreator/CreateForm.Designer.cs
index 57431cd..79ff0d3 100644
--- a/ServCreator/ServCreator/CreateForm.Designer.cs
+++ b/ServCreator/ServCreator/CreateForm.Designer.cs
@@ -314,6 +314,7 @@ namespace ServCreator
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "CreateForm";
this.Text = "Server Creator - ServManager for Minecraft";
+ this.Load += new System.EventHandler(this.CreateForm_Load);
((System.ComponentModel.ISupportInitialize)(this.minRAM)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.maxRAM)).EndInit();
this.ResumeLayout(false);
diff --git a/ServCreator/ServCreator/CreateForm.cs b/ServCreator/ServCreator/CreateForm.cs
index 3b5085f..a34d87f 100644
--- a/ServCreator/ServCreator/CreateForm.cs
+++ b/ServCreator/ServCreator/CreateForm.cs
@@ -49,7 +49,10 @@ namespace ServCreator
progressBar1.Visible = true;
WebClient downloader = new WebClient();
downloader.DownloadProgressChanged += (s, v) => { progressBar1.Value = v.ProgressPercentage; };
- downloader.DownloadFileCompleted += (s, v) => { progressBar1.Visible = false; };
+ downloader.DownloadFileCompleted += (s, v) => {
+ progressBar1.Visible = false;
+ MessageBox.Show("Serwer " + serverNameTB.Text + " został utworzony w folderze: " + serverPathTB.Text + ". Za chwilę zostaniesz przekierowany do panelu kontrolnego.");
+ };
downloader.DownloadFileAsync(new Uri("https://file.siemv.pl/gry/minecraft/server/" + serverVersionCB.Text + "/" + serverEngineCB.Text + "/" + "server.jar"), serverPathTB.Text + "\\server.jar");
// Tworzenie pliku EULA
@@ -58,7 +61,7 @@ namespace ServCreator
eulaWriter.Close();
// Tworzenie pliku startowego serwera
- StreamWriter startWriter = new StreamWriter(serverPathTB.Text + "\\start.cmd");
+ StreamWriter startWriter = new StreamWriter(serverPathTB.Text + "\\start.bat");
startWriter.Write("@echo off" + Environment.NewLine + "java -Xms" + minRAM.Value + "M -Xmx" + maxRAM.Value + "M " + argumentsTB.Text + " -jar server.jar nogui");
startWriter.Close();
@@ -72,8 +75,6 @@ namespace ServCreator
configWriter.Write(JsonConvert.SerializeObject(server));
configWriter.Close();
- MessageBox.Show("Serwer " + serverNameTB.Text + " został utworzony w folderze: " + serverPathTB.Text + ". Za chwilę zostaniesz przekierowany do panelu kontrolnego.");
-
ControlPanelForm controlPanel = new ControlPanelForm(serverPathTB.Text + "\\servmanager.json");
controlPanel.Show();
@@ -111,5 +112,10 @@ namespace ServCreator
public string Engine { get; set; }
}
+
+ private void CreateForm_Load(object sender, EventArgs e)
+ {
+
+ }
}
}
diff --git a/ServCreator/ServCreator/bin/Debug/ServCreator.exe b/ServCreator/ServCreator/bin/Debug/ServCreator.exe
index 2c74351..6672d1b 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.pdb b/ServCreator/ServCreator/bin/Debug/ServCreator.pdb
index 914c0ab..33e21c5 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/ServCreator.csproj.FileListAbsolute.txt b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.FileListAbsolute.txt
index 3436f93..edafdfd 100644
--- a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.FileListAbsolute.txt
+++ b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.FileListAbsolute.txt
@@ -13,3 +13,18 @@ D:\GitHub (krzysiek-smaga@outlook.com)\ServCreator-for-Minecraft\ServCreator\Ser
D:\GitHub (krzysiek-smaga@outlook.com)\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.csproj.CopyComplete
D:\GitHub (krzysiek-smaga@outlook.com)\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.ControlPanelForm.resources
D:\GitHub (krzysiek-smaga@outlook.com)\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.PropertiesEditorForm.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\bin\Debug\ServCreator.exe.config
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\bin\Debug\ServCreator.exe
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\bin\Debug\ServCreator.pdb
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\bin\Debug\Newtonsoft.Json.dll
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.csprojAssemblyReference.cache
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.ControlPanelForm.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.CreateForm.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.Form1.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.PropertiesEditorForm.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.Properties.Resources.resources
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.csproj.GenerateResource.cache
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.csproj.CoreCompileInputs.cache
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.csproj.CopyComplete
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.exe
+C:\Users\Krzysiek\Documents\GitHub\ServCreator-for-Minecraft\ServCreator\ServCreator\obj\Debug\ServCreator.pdb
diff --git a/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache b/ServCreator/ServCreator/obj/Debug/ServCreator.csproj.GenerateResource.cache
index 0a4c9b9..edd1005 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 9011fd2..8fd6531 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 2c74351..6672d1b 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 914c0ab..33e21c5 100644
Binary files a/ServCreator/ServCreator/obj/Debug/ServCreator.pdb and b/ServCreator/ServCreator/obj/Debug/ServCreator.pdb differ