Ejemplo n.º 1
0
 public void SetAliveBulb(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive && a.newState)
     {
         ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyGreen);
     }
 }
Ejemplo n.º 2
0
 public void SetRingBulb(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangePicture(mainWindow.statusPictureControl, Properties.Resources.notifyBlue);
     }
 }
Ejemplo n.º 3
0
 public void SetAliveLabel(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangeText(mainWindow.statusLabel, "ALIVE", ThreadSafe.TextChangeMode.changeText);
     }
 }
Ejemplo n.º 4
0
 public void SetAliveIcon(object o, ConnectionArgs a)
 {
     if (a.property == ConnectionStatus.Property.alive && a.newState)
     {
         ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconGreen);
     }
 }
Ejemplo n.º 5
0
 public void SetRingIcon(object o, ConnectionArgs a)
 {
     if (a.newState)
     {
         ThreadSafe.ChangeIcon((Form)mainWindow, Properties.Resources.notifyIconBlue);
     }
 }
Ejemplo n.º 6
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);
         }
     }
 }
Ejemplo n.º 7
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);
         }
     }
 }
Ejemplo n.º 8
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);
         }
     }
 }
Ejemplo n.º 9
0
        public void Log(object o, MessageEventArgs a)
        {
            string message = string.Format("{0}:\t{1}\n", DateTime.Now.ToLongTimeString(), a.message);

            ThreadSafe.ChangeText(mainWindow.logBoxControl, message, ThreadSafe.TextChangeMode.addText);
        }