private void Tray_MouseMoveTrayIcon(object sender, System.Windows.Forms.MouseEventArgs e) { if (config.options.General.IsTomatoMode) { if (workTimer.IsEnabled) { //工作中 tray.SetText($"Project Tomato:[{(workCount + 1)}/4] 工作中"); } if (restTimer.IsEnabled) { //休息中 tray.SetText($"Project Tomato:[{(workCount + 1)}/4] 休息中"); } } }
private void Tray_MouseMoveTrayIcon(object sender, System.Windows.Forms.MouseEventArgs e) { if (config.options.General.IsTomatoMode) { if (workTimer.IsEnabled) { //工作中 string timestr = string.Format("{0:F}", workTimer.Interval.TotalMinutes - timerWatcher.Elapsed.TotalMinutes); tray.SetText($"Tomato:[{(workCount + 1)}/4] {Application.Current.Resources["Lang_Workingtime"]}\r\n{Application.Current.Resources["Lang_Remainingtime"]}: {timestr} {Application.Current.Resources["Lang_Minutes"]}"); } if (restTimer.IsEnabled) { //休息中 string timestr = string.Format("{0:F}", restTimer.Interval.TotalMinutes - timerWatcher.Elapsed.TotalMinutes); tray.SetText($"Tomato:[{(workCount + 1)}/4] {Application.Current.Resources["Lang_Breakingtime"]}\r\n{Application.Current.Resources["Lang_Remainingtime"]}: {timestr} {Application.Current.Resources["Lang_Minutes"]}"); } } }