示例#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) { }
 }
示例#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) { }
 }
示例#3
0
 void fadeTimer_Tick(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         PerformActivityCallback d = new PerformActivityCallback(FadeControl);
         this.Invoke(d);
     }
     else
     {
         FadeControl();
     }
 }