예제 #1
0
        private void BreakTimer(object source, EventArgs args)
        {
            clock.SecDecrement();
            alarmWindow.printClock(clock);
            if (clock.GetAllSecs() == 0)
            {
                alarmWindow.Dispose();
                alarmWindow = null;

                mainWindow.ShowAll();

                ResetTimer();
                UnsetAlarmTimer();
                SetTimer();
            }
        }
예제 #2
0
        public void Alarm()
        {
            alarmWindow = new AlarmWindow();
            alarmWindow.Show();

            mainWindow.HideAll();

            UnsetTimer();
            SetAlarmTimer();

            string alarmMessage = "";
            if (options.alarmMessage == true)
            {
                alarmMessage = "The alarm time has been reached. Starting alarm...";
            }
            options.alarm.Invoke(alarmMessage);
        }