예제 #1
0
 private void NotifyIcon_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left && !backgroundWorker.IsBusy)
     {
         //双击托盘图标进入或退出番茄时钟模式
         config.SaveOldOptions();
         config.options.General.IsTomatoMode = !config.options.General.IsTomatoMode;
         config.OnChanged();
     }
 }
예제 #2
0
 public void Close()
 {
     workCount = 0;
     restartCount++;
     workTimer.Stop();
     restTimer.Stop();
     config.SaveOldOptions();
     config.options.General.IsTomatoMode = false;
     config.OnChanged();
     SaveData();
 }