feat: 优化第一次启动时的弹窗提醒
This commit is contained in:
12
MainForm.cs
12
MainForm.cs
@@ -524,15 +524,14 @@ namespace TimerApp
|
||||
notifyIcon1.ShowBalloonTip(3000, "休息结束", "继续加油工作吧!", ToolTipIcon.Info);
|
||||
}
|
||||
|
||||
private bool _hasShownMinimizeTip = false;
|
||||
|
||||
private void btnHide_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
if (!_hasShownMinimizeTip)
|
||||
if (!_settings.HasShownMinimizeTip)
|
||||
{
|
||||
notifyIcon1.ShowBalloonTip(2000, "已隐藏", "程序仍在后台运行,双击托盘图标恢复。", ToolTipIcon.Info);
|
||||
_hasShownMinimizeTip = true;
|
||||
_settings.HasShownMinimizeTip = true;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,10 +541,11 @@ namespace TimerApp
|
||||
{
|
||||
e.Cancel = true;
|
||||
this.Hide();
|
||||
if (!_hasShownMinimizeTip)
|
||||
if (!_settings.HasShownMinimizeTip)
|
||||
{
|
||||
notifyIcon1.ShowBalloonTip(2000, "已隐藏", "程序仍在后台运行,双击托盘图标恢复。", ToolTipIcon.Info);
|
||||
_hasShownMinimizeTip = true;
|
||||
_settings.HasShownMinimizeTip = true;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user