fix: 精简优化代码

This commit is contained in:
2026-01-18 20:41:10 +08:00
parent 4ef611dc21
commit 4b5609d275
3 changed files with 18 additions and 62 deletions

67
.gitignore vendored
View File

@@ -4,22 +4,6 @@
[Bb]in/
[Oo]bj/
[Oo]ut/
# Visual Studio 用户特定文件
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# Visual Studio 缓存/选项目录
.vs/
.vscode/
# Visual Studio 代码分析结果
*.sln.iml
# 构建结果
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
@@ -30,17 +14,25 @@ x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# .NET Core
project.lock.json
project.fragment.lock.json
[Dd]ist/
artifacts/
# NuGet 包
# Visual Studio / IDE
.vs/
.vscode/
.idea/
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
*.sln.iml
# .NET Core / NuGet
project.lock.json
project.fragment.lock.json
*.nupkg
*.snupkg
**/packages/*
@@ -52,29 +44,14 @@ artifacts/
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# .NET Core 项目文件
project.lock.json
project.fragment.lock.json
artifacts/
# Rider
.idea/
*.sln.iml
# VS Code
.vscode/
# 用户特定文件
*.user
*.suo
*.userosscache
*.sln.docstates
# 临时文件
*.tmp
*.temp
*.log
*.cache
*.bak
*.swp
*~
# 操作系统文件
.DS_Store
@@ -82,13 +59,5 @@ Thumbs.db
ehthumbs.db
Desktop.ini
# 备份文件
*.bak
*.swp
*~
# 设置文件(如果包含敏感信息)
# settings.json
# 发布/打包输出
[Dd]ist/

View File

@@ -161,14 +161,6 @@ namespace TimerApp
}
}
// 用于强制重置或测试
public void ForceRest()
{
_restElapsedSeconds = 0; // 重置休息计数器
ChangeState(MonitorState.Resting);
RestStarted?.Invoke(this, EventArgs.Empty);
}
public void RefreshStatus()
{
if (CurrentState == MonitorState.Working)

View File

@@ -69,11 +69,6 @@
- 你在看视频/会议播放:倾向不推进工作计时,避免把“被动观看”算作高强度连续工作
- 你刚好在关键时刻被提醒:可以跳过本次休息,稍后再通过节奏回到下一轮
## 设置与发布形态
- 设置会持久化保存:重启后仍保持你的节奏与偏好
- 支持便携形态:适合拷贝到不同电脑或 U 盘随身使用,设置也可随程序一起迁移
## 运行逻辑(从用户视角)
- 启动后读取上次的时长与偏好,进入后台常驻