Esempio n. 1
0
        /// <summary>
        /// Change the name on startButton to "Stop" or "Start"
        /// </summary>
        public void changeNameOnStartButton()
        {
            if (presenter.activitySelected && startButton.Text == "Start")
            {
                startButton.Text = "Stop";
            }

            else if (startButton.Text == "Stop")
            {
                StopTimer();
                DialogResult dialogResult = MessageBox.Show("Do you really wanna quit?", "Quit", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    startButton.Text = "Start";
                    hideAndStopTimer();
                    presenter.dropActivity();
                    presenter.activitySelected = false;
                }
                else
                {
                    StartTimer();
                }
            }
        }