Prettify gui.

This commit is contained in:
UnknownShadow200 2016-03-12 22:01:54 +11:00
parent 561c3bf597
commit 2f2a62cf45
6 changed files with 361 additions and 412 deletions

View File

@ -195,7 +195,6 @@ namespace MCGalaxy.Commands
//for the limiting no. of guests:
Server.maxGuests = 10;
Server.maps = 5;
Server.port = 25565;
Server.pub = true;
Server.verify = true;

File diff suppressed because it is too large Load Diff

View File

@ -307,21 +307,6 @@ namespace MCGalaxy.Gui {
numGuests.Value = 10;
}
break;
case "max-maps":
try {
if ( Convert.ToByte(value) > 100 ) {
value = "100";
}
else if ( Convert.ToByte(value) < 1 ) {
value = "1";
}
txtMaps.Text = value;
}
catch {
Server.s.Log("max-maps invalid! setting to default.");
txtMaps.Text = "5";
}
break;
case "irc":
chkIRC.Checked = ( value.ToLower() == "true" );
break;
@ -677,7 +662,6 @@ namespace MCGalaxy.Gui {
Server.pub = chkPublic.Checked;
Server.players = (byte)numPlayers.Value;
Server.maxGuests = (byte)numGuests.Value;
Server.maps = byte.Parse(txtMaps.Text);
Server.worldChat = chkWorld.Checked;
Server.autonotify = chkNotifyOnJoinLeave.Checked;
Server.AutoLoad = chkAutoload.Checked;
@ -817,7 +801,6 @@ namespace MCGalaxy.Gui {
}
private void txtPort_TextChanged(object sender, EventArgs e) { removeDigit(txtPort); }
private void txtMaps_TextChanged(object sender, EventArgs e) { removeDigit(txtMaps); }
private void txtBackup_TextChanged(object sender, EventArgs e) { removeDigit(txtBackup); }
private void btnSave_Click(object sender, EventArgs e) { saveStuff(); Dispose(); }

View File

@ -120,22 +120,6 @@ namespace MCGalaxy {
}
catch { Server.s.Log("max-guests invalid! setting to default."); }
break;
case "max-maps":
try {
if ( Convert.ToByte(value) > 100 ) {
value = "100";
Server.s.Log("Max maps has been lowered to 100.");
}
else if ( Convert.ToByte(value) < 1 ) {
value = "1";
Server.s.Log("Max maps has been increased to 1.");
}
Server.maps = Convert.ToByte(value);
}
catch {
Server.s.Log("max-maps invalid! setting to default.");
}
break;
case "irc":
Server.irc = value.ToLower() == "true";
break;
@ -750,7 +734,6 @@ namespace MCGalaxy {
w.WriteLine("public = " + Server.pub.ToString().ToLower());
w.WriteLine("max-players = " + Server.players.ToString());
w.WriteLine("max-guests = " + Server.maxGuests.ToString());
w.WriteLine("max-maps = " + Server.maps.ToString());
w.WriteLine("world-chat = " + Server.worldChat.ToString().ToLower());
w.WriteLine("check-updates = " + Server.checkUpdates.ToString().ToLower());
w.WriteLine("auto-update = " + Server.autoupdate.ToString().ToLower());

View File

@ -28,7 +28,7 @@ namespace MCGalaxy {
void LoadMainLevel() {
try {
levels = new List<Level>(maps);
levels = new List<Level>(5);
if (LevelInfo.ExistsOffline(level)) {
mainLevel = Level.Load(level);

View File

@ -179,7 +179,6 @@ namespace MCGalaxy
//for the limiting no. of guests:
public static byte maxGuests = 10;
public static byte maps = 5;
public static int port = 25565;
public static bool pub = true;
public static bool verify = true;