コード例 #1
0
 private void ButtonAddConverter_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var window = new StreamDeckDCSBIOSConverterWindow(_dcsbiosDecoder.StreamDeckButtonName, _panelHash);
         window.ShowDialog();
         if (window.DialogResult == true)
         {
             _dcsbiosDecoder.Add(window.DCSBIOSConverter.DeepClone());
             window.DCSBIOSConverter = null;
             ShowConverters();
             SetFormState();
         }
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex);
     }
 }
コード例 #2
0
 private void ButtonAddConverter_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var window = new StreamDeckDCSBIOSConverterWindow(_dcsbiosDecoder.StreamDeckButtonName, _streamDeckPanel);
         window.ShowDialog();
         if (window.DialogResult == true)
         {
             DCSBIOSConverter dcsbiosConverter = window.DCSBIOSConverter.CloneJson();
             dcsbiosConverter.StreamDeckPanelInstance = _streamDeckPanel;
             _dcsbiosDecoder.Add(dcsbiosConverter);
             window.DCSBIOSConverter = null;
             ShowConverters();
             SetFormState();
         }
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex);
     }
 }
コード例 #3
0
 private void ButtonEditConverter_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         if (DataGridConverters.SelectedItems.Count != 1)
         {
             return;
         }
         var converter = (DCSBIOSConverter)DataGridConverters.SelectedItems[0];
         var window    = new StreamDeckDCSBIOSConverterWindow(_dcsbiosDecoder.StreamDeckButtonName, converter, _streamDeckPanel);
         window.ShowDialog();
         if (window.DialogResult == true)
         {
             _dcsbiosDecoder.Replace((DCSBIOSConverter)DataGridConverters.SelectedItems[0], window.DCSBIOSConverter);
             SetIsDirty();
             ShowConverters();
             SetFormState();
         }
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex);
     }
 }