Skip to content

Commit

Permalink
修复统计用眼时长的一个bug
Browse files Browse the repository at this point in the history
  • Loading branch information
noberumotto committed Jun 21, 2019
1 parent ec1938f commit 82b63d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ProjectEye/Core/Service/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ private void back_timer_Tick(object sender, EventArgs e)
timer.Start();
//事件响应
OnComeBackEvent?.Invoke(this, 0);
if (config.options.General.Data)
{
statistic.useEyeStartTime = DateTime.Now;
//启动用眼计时
useeye_timer.Start();
}
}
SaveCursorPos();
}
Expand Down Expand Up @@ -203,6 +209,9 @@ public void OnLeave()
//事件响应
OnLeaveEvent?.Invoke(this, 0);

//停止用眼计时
useeye_timer.Stop();

}
#endregion

Expand Down Expand Up @@ -327,7 +336,7 @@ private void DoStop()

back_timer.Stop();


}
#endregion

Expand Down

0 comments on commit 82b63d2

Please sign in to comment.