Пример #1
0
        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();
        }
Пример #2
0
        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;
        }
Пример #3
0
        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;
        }
Пример #4
0
        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();
        }