private void resetValues() { timer.Enabled = false; cpsBar.Text = CurrentInterval.ToString(@"mm\:ss"); cpsBar.AnimationSpeed = 500; cpsBar.Value = 0; setToolEnable(true); paused = false; mediaType = MediaType.Play; updateTheme(); }
private void Form1_Load(object sender, EventArgs e) { FilePomodoro.CheckFiles(); //Pomodoro.ComplatedWorksCount = 0; //Pomodoro.EndBreakCount = 0; //Pomodoro.TotalPomodoroCount = 0; showValues(); //Application.Exit(); btnPlayPause.Click += new EventHandler(PlayPause_Click); panelPlayPause.Controls.Add(btnPlayPause); this.AcceptButton = btnPlayPause; getRes(new CultureInfo(CultureInfo)); intervalType = IntervalType.Work; mediaType = MediaType.Play; // Values clearing if current day is diffrent from last record if (!String.Equals(DateTime.Today.ToShortDateString(), Settings.Default.CurrentDate)) { Pomodoro.ComplatedWorksCount = 0; Pomodoro.EndBreakCount = 0; Settings.Default.CurrentDate = DateTime.Today.ToShortDateString(); Settings.Default.Save(); } else { if (Pomodoro.ComplatedWorksCount > Pomodoro.EndBreakCount) { changeIntervalType(); } } cpsBar.Value = 0; cpsBar.Text = CurrentInterval.ToString(@"mm\:ss"); updateSounds(); updateTheme(); updateTodayDesign(); }