forked from Lilyy2565/Minecraft-Server-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainForm.cs
More file actions
92 lines (86 loc) · 2.98 KB
/
MainForm.cs
File metadata and controls
92 lines (86 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Minecraft_Server_GUI
{
public partial class MainForm : Form
{
#region Form Definition
License license = new License();
GetServer getServer = new GetServer();
Settings settings = new Settings();
#endregion
#region Server Settings
string spawnprotection = "16";
string generatorsettings = "";
string forcegamemode = "false";
string allownether = "true";
string gamemode = "0";
string broadcastconsoletoops = "true";
string enablequery = "false";
string playeridletimeout = "0";
string difficulty = "1";
string spawnmonsters = "true";
string oppermissionlevel = "4";
string resourcepackhash = "";
string announceplayerachievements = "true";
string pvp = "true";
string snooperenabled = "true";
string leveltype = "DEFAULT";
string hardcore = "false";
string enablecommandblock = "false";
string maxplayers = "20";
string networkcompressionthreshold = "256";
string maxworldsize = "29999984";
string serverport = "25565";
string debug = "false";
string serverip = "";
string spawnnpcs = "true";
string allowflight = "false";
string levelname = "world";
string viewdistance = "10";
string resourcepack = "";
string spawnanimals = "true";
string whitelist = "false";
string generatestructures = "true";
string onlinemode = "true";
string maxbuildheight = "256";
string levelseed = "";
string enablercon = "false";
string motd = "";
#endregion
public MainForm()
{
InitializeComponent();
if(Settings1.Default.licenseShown == false)
{
// Show the license dialogue if the user has not seen the license dialogue yet
license.ShowDialog();
}
if (Settings1.Default.serverPath == null || Settings1.Default.serverPath == "")
{
// If the user has not navigated to a server before then show open server dialogue
getServer.ShowDialog();
}
if(Settings1.Default.serverPath == null || Settings1.Default.serverPath == "")
{
toolStripProgressBar1.Style = ProgressBarStyle.Blocks;
toolStripStatusLabel1.Text = "Done!";
return;
}
toolStripStatusLabel1.Text = "Loading: " + Settings1.Default.serverPath + "server.properties";
}
private void settingsButton_Click(object sender, EventArgs e)
{
// Show the settings form
settings.Show();
}
}
}