Exemple #1
0
 private void animationTimer_Tick(object source, EventArgs e)
 {
     for (int i = 0; i != DigitCount; i++)
     {
         CounterDigit cd = digits[i] as CounterDigit;
         cd.NextFrame();
     }
     Invalidate();
 }
Exemple #2
0
 private void SetDigits()
 {
     int[] newDig = GetDigits(val);
     for (int i = 0; i != DigitCount; i++)
     {
         CounterDigit cd = digits[i] as CounterDigit;
         cd.Digit = newDig[i];
         if (cd.PrevDigit != newDig[i])
         {
             if (animationSpeed == 0)
             {
                 cd.Frame = totalFrames;
             }
             else
             {
                 cd.Frame = 0;
             }
         }
     }
     Invalidate();
 }
Exemple #3
0
 private void CreateDigits()
 {
     if (null != digits)
     {
         for (int i = 0; i != digits.Count; i++)
         {
             CounterDigit cd = digits[i] as CounterDigit;
             if (null != cd)
             {
                 cd.Dispose();
             }
         }
         digits.Clear();
         digits = null;
     }
     digits = new ArrayList(DigitCount);
     for (int i = 0; i != DigitCount; i++)
     {
         digits.Add(new CounterDigit(numbersBitmap));
     }
 }