private void timerGhost_Tick(object sender, EventArgs e) { timerGhost.Stop(); radioButtonAutomatic.Enabled = false; radioButtonManual.Enabled = false; labelAutomaticInProgress.Show(); MainGhost = new Ghost(); Ghosts.Add(MainGhost); MainGhost.OnUpdate += ThreadSafeUpdate; try { MainGhost.Start(); } catch (Exception ex) { MessageBox.Show(this, ex.Message); MainGhost = null; return; } timerUmount.Interval = (int)Properties.Settings.Default.MountDuration * 1000; timerUmount.Start(); }
private void buttonMount_Click(object sender, EventArgs e) { MainGhost = new Ghost(); Ghosts.Add(MainGhost); MainGhost.OnUpdate += ThreadSafeUpdate; try { MainGhost.Start(); } catch (Exception ex) { MessageBox.Show(this, ex.Message); MainGhost = null; return; } buttonMount.Enabled = false; buttonUmount.Enabled = true; radioButtonAutomatic.Enabled = false; radioButtonManual.Enabled = false; }