private void EnableButton_Click(object sender, EventArgs e) { Ide.StatusBar_Set("Enable starts..."); if (ServerManager.CanEnable()) { Thread.Sleep(250); XLog.DeleteLogfile(); Thread.Sleep(1250); ServerManager.EnableServer(); Ide.StatusBar_Set("Enable succeeded"); } else { Ide.StatusBar_Set("Enable failed, because the settings are invalid."); } }
private void DisableButton_Click(object sender, EventArgs e) { Ide.StatusBar_Set("Disable starts..."); ServerManager.DisableServer(); Ide.StatusBar_Set("Disable succeeded"); }