Exemple #1
0
 /// <summary>
 /// Saves the current state time spent on.
 /// </summary>
 void SaveTimer()
 {
     StateTimer.Stop();
     if (StateTimer.ElapsedMilliseconds >= 1000)
     {
         TimerList.Add(new Tuple <string, double> (currentState, StateTimer.ElapsedSeconds));
     }
     StateTimer.Reset();
 }
Exemple #2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     StateTimer.Stop();
     try
     {
         _ = _server.ShutDown();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }