示例#1
0
文件: Form1.cs 项目: Rizhiy825/Timer
 private void PauseButton_Click(object sender, EventArgs e)
 {
     stopwatch.Pause();
     PauseButton.Enabled    = false;
     StartButton.Enabled    = true;
     StopWorkButton.Enabled = true;
 }
示例#2
0
 public void StopwatchStart()
 {
     if (Stopwatch != null)
     {
         if (Stopwatch.Paused)
         {
             Stopwatch.Resume();
             return;
         }
         if (!Stopwatch.Running)
         {
             Stopwatch.Start();
         }
         else
         {
             Stopwatch.Pause();
         }
     }
 }