Esempio n. 1
0
 private double ToBillable(SettableStopwatch stopwatch) {
   double billable = 0.0;
   if(stopwatch.ElapsedTimeSpan.TotalHours == 0.0f) {
     billable = 0.0f;
   }
   else if (stopwatch.ElapsedTimeSpan.TotalHours < .05f && stopwatch.ElapsedTimeSpan.TotalHours > 0.0f) {
     billable = 0.1f;
   }
   else {
     billable = CeilingTo((stopwatch.ElapsedTimeSpan.TotalHours), .05);        
   }
   return billable;
 }
Esempio n. 2
0
    private void ManualInit() {
      this.FormBorderStyle = FormBorderStyle.FixedSingle;
      this.stopwatches = new SettableStopwatch[5];
      for (int x = 0; x < 5; x++) {
        stopwatches[x] = new SettableStopwatch(TimeSpan.Zero);
      }
          
      _timer = new Timer();
      _timer.Interval = 100;
      _timer.Tick += new EventHandler(_update);
      _timer.Start();

      playButton1.TabStop = false;
      playButton1.FlatStyle = FlatStyle.Flat;
      playButton1.FlatAppearance.BorderSize = 0;
      restartButton1.TabStop = false;
      restartButton1.FlatStyle = FlatStyle.Flat;
      restartButton1.FlatAppearance.BorderSize = 0;

      playButton2.TabStop = false;
      playButton2.FlatStyle = FlatStyle.Flat;
      playButton2.FlatAppearance.BorderSize = 0;
      restartButton2.TabStop = false;
      restartButton2.FlatStyle = FlatStyle.Flat;
      restartButton2.FlatAppearance.BorderSize = 0;

      playButton3.TabStop = false;
      playButton3.FlatStyle = FlatStyle.Flat;
      playButton3.FlatAppearance.BorderSize = 0;
      restartButton3.TabStop = false;
      restartButton3.FlatStyle = FlatStyle.Flat;
      restartButton3.FlatAppearance.BorderSize = 0;

      playButton4.TabStop = false;
      playButton4.FlatStyle = FlatStyle.Flat;
      playButton4.FlatAppearance.BorderSize = 0;
      restartButton4.TabStop = false;
      restartButton4.FlatStyle = FlatStyle.Flat;
      restartButton4.FlatAppearance.BorderSize = 0;

      playButton5.TabStop = false;
      playButton5.FlatStyle = FlatStyle.Flat;
      playButton5.FlatAppearance.BorderSize = 0;
      restartButton5.TabStop = false;
      restartButton5.FlatStyle = FlatStyle.Flat;
      restartButton5.FlatAppearance.BorderSize = 0;
    }