Пример #1
0
 public void SetAliveLabel(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangeText(mainWindow.statusLabel, "ALIVE", ThreadSafe.TextChangeMode.changeText);
     }
 }
Пример #2
0
 public void SetAliveBulb(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive && a.newState)
     {
         ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyGreen);
     }
 }
Пример #3
0
 public void SetRingBulb(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyBlue);
     }
 }
Пример #4
0
 public void SetAliveIcon(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive && a.newState)
     {
         ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconGreen);
     }
 }
Пример #5
0
 public void SetRingIcon(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconBlue);
     }
 }
Пример #6
0
 public void StartRingTimer(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ringTimer.StartTimer();
     }
 }
Пример #7
0
 public void PlayRingSound(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         soundControl.PlaySound(Sounds.ring);
     }
 }
Пример #8
0
 public void SetErrorBulb(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive)
     {
         if (!a.newState)
         {
             ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyRed);
         }
     }
     else if (a.property == ConnectionStatus.Property.error)
     {
         if (a.newState)
         {
             ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyRed);
         }
     }
 }
Пример #9
0
 public void SetErrorLabel(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive)
     {
         if (!a.newState)
         {
             ThreadSafe.ChangeText(mainWindow.statusLabel, "ERROR", ThreadSafe.TextChangeMode.changeText);
         }
     }
     else if (a.property == ConnectionStatus.Property.error)
     {
         if (a.newState)
         {
             ThreadSafe.ChangeText(mainWindow.statusLabel, "ERROR", ThreadSafe.TextChangeMode.changeText);
         }
     }
 }
Пример #10
0
 public void SetErrorIcon(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive)
     {
         if (!a.newState)
         {
             ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconRed);
         }
     }
     else if (a.property == ConnectionStatus.Property.error)
     {
         if (a.newState)
         {
             ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconRed);
         }
     }
 }
Пример #11
0
 public void PlayErrorSound(object o, ConnectionArgs a)
 {
     if (settings.playError)
     {
         if (a.property == ConnectionStatus.Property.alive)
         {
             if (!a.newState)
             {
                 soundControl.PlaySound(Sounds.error);
             }
         }
         else
         {
             soundControl.PlaySound(Sounds.error);
         }
     }
 }