All pastes #909756 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-19 14:00 UTC
rendered paste body
        private void stopServerButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (!logonProcess.HasExited)
                {
                    logonProcess.Kill();
                }
                if (!worldProcess.HasExited)
                {
                    worldProcess.Kill();
                }
                this.statusLabel.Text = "Offline";
                this.statusLabel.ForeColor = System.Drawing.Color.Maroon;
                this.stopServerButton.Enabled = false;
                this.startServerButton.Enabled = true;
            }
            catch (Exception err)
            {
                MessageBox.Show(err.ToString(), "An Error Has Occured", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }