private void EditButton_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var dcsOutputAndColorBinding   = (DcsOutputAndColorBinding)DataGridValues.SelectedItem;
         var dcsBiosOutputTriggerWindow = new DCSBiosOutputTriggerWindow(_dcsAirframe, "Set hook for color " + dcsOutputAndColorBinding.LEDColor, dcsOutputAndColorBinding.DCSBiosOutputLED);
         if (dcsBiosOutputTriggerWindow.ShowDialog() == true)
         {
             _colorOutputBindings.Remove(dcsOutputAndColorBinding);
             _colorOutputBindings.Add(_callingPanel.CreateDcsOutputAndColorBinding(_saitekPanelLEDPosition, dcsOutputAndColorBinding.LEDColor, dcsBiosOutputTriggerWindow.DCSBiosOutput));
             ShowItems();
         }
         ShowItems();
         SetFormState();
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(1072, ex);
     }
 }
        private void NewButton_OnClick(object sender, RoutedEventArgs e)
        {
            try
            {
                var button     = (Button)sender;
                var panelColor = PanelLEDColor.DARK;
                if (button.Name.Contains("Dark"))
                {
                    panelColor = PanelLEDColor.DARK;
                }
                if (button.Name.Contains("Green"))
                {
                    panelColor = PanelLEDColor.GREEN;
                }
                if (button.Name.Contains("Yellow"))
                {
                    panelColor = PanelLEDColor.YELLOW;
                }
                if (button.Name.Contains("Red"))
                {
                    panelColor = PanelLEDColor.RED;
                }

                var dcsBiosOutputTriggerWindow = new DCSBiosOutputTriggerWindow(_dcsAirframe, "Set hook for color " + panelColor);
                if (dcsBiosOutputTriggerWindow.ShowDialog() == true)
                {
                    _colorOutputBindings.Add(_callingPanel.CreateDcsOutputAndColorBinding(_saitekPanelLEDPosition, panelColor, dcsBiosOutputTriggerWindow.DCSBiosOutput));
                    ShowItems();
                }

                SetFormState();
            }
            catch (Exception ex)
            {
                Common.ShowErrorMessageBox(1016, ex);
            }
        }