Example #1
0
 void DekrementirajBonus(object sender, ElapsedEventArgs e)
 {
     bonusPoeni--;
     if (bonusPoeni == 0)
     {
         bonusTimer.Stop();
     }
     // Setiraj go bonusot (thread safe)
     try
     {
         if (this.InvokeRequired)
         {
             PerformActivityCallback d = new PerformActivityCallback(PostaviBonus);
             this.Invoke(d);
         }
         else
         {
             PostaviBonus();
         }
     }
     catch (ObjectDisposedException) { }
 }
Example #2
0
 void DisplayHelpLetter(object sender, ElapsedEventArgs e)
 {
     // Pretstavuvanje na bukva vo gridot (thread safe)
     if (dadenaEkstraBukva || momentalnaSostojba == GameState.prvObid || momentalnaSostojba >= GameState.maximumObidi) return;
     try
     {
         if (this.InvokeRequired)
         {
             PerformActivityCallback d = new PerformActivityCallback(DisplayLetter);
             this.Invoke(d);
         }
         else
         {
             DisplayLetter();
         }
     }
     catch (ObjectDisposedException) { }
 }
Example #3
0
 void fadeTimer_Tick(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         PerformActivityCallback d = new PerformActivityCallback(FadeControl);
         this.Invoke(d);
     }
     else
     {
         FadeControl();
     }
 }