feat: 添加暂停和恢复功能以优化工作计时管理

This commit is contained in:
2026-01-17 14:12:52 +08:00
parent 694b40e06b
commit 50955e84c7
3 changed files with 114 additions and 7 deletions

29
MainForm.Designer.cs generated
View File

@@ -41,6 +41,7 @@ namespace TimerApp
this.btnStartStop = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnPause = new System.Windows.Forms.Button();
this.lblStatus = new System.Windows.Forms.Label();
this.lblTimeLeft = new System.Windows.Forms.Label();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
@@ -169,6 +170,7 @@ namespace TimerApp
// pnlSettings
//
this.pnlSettings.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
this.pnlSettings.Controls.Add(this.btnPause);
this.pnlSettings.Controls.Add(this.btnReset);
this.pnlSettings.Controls.Add(this.btnStartStop);
this.pnlSettings.Controls.Add(this.btnRestPlus);
@@ -305,11 +307,11 @@ namespace TimerApp
this.btnStartStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartStop.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnStartStop.ForeColor = System.Drawing.Color.White;
this.btnStartStop.Location = new System.Drawing.Point(170, 110);
this.btnStartStop.Location = new System.Drawing.Point(210, 110);
this.btnStartStop.Name = "btnStartStop";
this.btnStartStop.Size = new System.Drawing.Size(110, 35);
this.btnStartStop.Size = new System.Drawing.Size(70, 35);
this.btnStartStop.TabIndex = 4;
this.btnStartStop.Text = "应用设置";
this.btnStartStop.Text = "应用";
this.btnStartStop.UseVisualStyleBackColor = false;
this.btnStartStop.Click += new System.EventHandler(this.btnStartStop_Click);
@@ -323,12 +325,28 @@ namespace TimerApp
this.btnReset.ForeColor = System.Drawing.Color.White;
this.btnReset.Location = new System.Drawing.Point(40, 110);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(110, 35);
this.btnReset.Size = new System.Drawing.Size(70, 35);
this.btnReset.TabIndex = 8;
this.btnReset.Text = "重置计时";
this.btnReset.Text = "重置";
this.btnReset.UseVisualStyleBackColor = false;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnPause
//
this.btnPause.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(63)))), ((int)(((byte)(70)))));
this.btnPause.FlatAppearance.BorderSize = 0;
this.btnPause.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPause.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnPause.ForeColor = System.Drawing.Color.White;
this.btnPause.Location = new System.Drawing.Point(125, 110);
this.btnPause.Name = "btnPause";
this.btnPause.Size = new System.Drawing.Size(70, 35);
this.btnPause.TabIndex = 9;
this.btnPause.Text = "暂停";
this.btnPause.UseVisualStyleBackColor = false;
this.btnPause.Click += new System.EventHandler(this.btnPause_Click);
//
// btnHide
//
@@ -419,6 +437,7 @@ namespace TimerApp
private System.Windows.Forms.Button btnRestPlus;
private System.Windows.Forms.Button btnStartStop;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnPause;
private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.Label lblTimeLeft;
private System.Windows.Forms.NotifyIcon notifyIcon1;