private void DoStart() { //休息提醒 timer.Start(); //离开监听 leave_timer.Start(); //数据统计 if (config.options.General.Data) { //重置用眼计时 statistic.ResetStatisticTime(); //用眼统计 useeye_timer.Start(); } OnStart?.Invoke(this, 0); }
private void back_timer_Tick(object sender, EventArgs e) { if (IsCursorPosChanged()) { Debug.WriteLine("用户回来了"); //鼠标变化,停止计时器 back_timer.Stop(); leave_timer.Start(); timer.Start(); //事件响应 OnComeBackEvent?.Invoke(this, 0); if (config.options.General.Data) { statistic.ResetStatisticTime(); //启动用眼计时 useeye_timer.Start(); } } SaveCursorPos(); }
private void DoStart(bool isHard = true) { //允许硬启动,否则只有在关闭暂不提醒和番茄时钟模式时才允许启动工作计时 if (isHard || !config.options.General.Noreset && !config.options.General.IsTomatoMode) { //休息提醒 work_timer.Start(); workTimerStopwatch.Restart(); } //离开监听 leave_timer.Start(); //数据统计 if (config.options.General.Data) { //重置用眼计时 statistic.ResetStatisticTime(); //用眼统计 useeye_timer.Start(); } OnStart?.Invoke(this, 0); }