Esempio n. 1
0
 public void LedLightChanged(object sender, LedLightChangeEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(2012, ex);
     }
 }
Esempio n. 2
0
 public void LedLightChanged(object sender, LedLightChangeEventArgs e)
 {
     try
     {
         //nada zip zilch
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(1021, ex);
     }
 }
Esempio n. 3
0
 public void LedLightChanged(object sender, LedLightChangeEventArgs e)
 {
     try
     {
         if (!_loaded)
         {
             return;
         }
         Dispatcher.BeginInvoke((Action)(ShowGraphicConfiguration));
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(2033, ex);
     }
 }
Esempio n. 4
0
        public void LedLightChanged(object sender, LedLightChangeEventArgs e)
        {
            try
            {
                if (!UserControlLoaded || _backlitPanelBIP.HIDInstance.Equals(e.HIDInstance))
                {
                    return;
                }

                Dispatcher?.BeginInvoke((Action)(ShowGraphicConfiguration));
            }
            catch (Exception ex)
            {
                Common.ShowErrorMessageBox(ex);
            }
        }
Esempio n. 5
0
 public void LedLightChanged(object sender, LedLightChangeEventArgs e)
 {
 }
        public void LedLightChanged(object sender, LedLightChangeEventArgs e)
        {
            try
            {
                if (_switchPanelPZ55.HIDInstance.Equals(e.HIDInstance))
                {
                    var   position = (SwitchPanelPZ55LEDPosition)e.LEDPosition.Position;
                    Image image;

                    switch (position)
                    {
                    case SwitchPanelPZ55LEDPosition.UP:
                    {
                        image = ImagePZ55LEDUpper;
                        break;
                    }

                    case SwitchPanelPZ55LEDPosition.LEFT:
                    {
                        image = ImagePZ55LEDLeft;
                        break;
                    }

                    case SwitchPanelPZ55LEDPosition.RIGHT:
                    {
                        image = ImagePZ55LEDRight;
                        break;
                    }

                    default:
                    {
                        image = ImagePZ55LEDRight;
                        break;
                    }
                    }

                    switch (e.LEDColor)
                    {
                    case PanelLEDColor.DARK:
                    {
                        void Action()
                        {
                            image.Source = _darkImage;
                            image.Tag    = "DARK";
                        }

                        Dispatcher?.Invoke((Action)Action);
                        break;
                    }

                    case PanelLEDColor.GREEN:
                    {
                        void Action()
                        {
                            image.Source = _greenImage;
                            image.Tag    = "GREEN";
                        }

                        Dispatcher?.Invoke((Action)Action);
                        break;
                    }

                    case PanelLEDColor.YELLOW:
                    {
                        void Action()
                        {
                            image.Source = _yellowImage;
                            image.Tag    = "YELLOW";
                        }

                        Dispatcher?.Invoke((Action)Action);
                        break;
                    }

                    case PanelLEDColor.RED:
                    {
                        void Action()
                        {
                            image.Source = _redImage;
                            image.Tag    = "RED";
                        }

                        Dispatcher?.Invoke((Action)Action);
                        break;
                    }
                    }
                }
            }
            catch (Exception ex)
            {
                Common.ShowErrorMessageBox(ex);
            }
        }