feat: 优化第一次启动时的弹窗提醒

This commit is contained in:
2026-01-18 20:55:31 +08:00
parent 4b5609d275
commit 78c07a12d0
2 changed files with 7 additions and 6 deletions

View File

@@ -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