Пример #1
0
 private void SetAirframe()
 {
     if (IsLoaded && ComboBoxAirframe.SelectedItem != null)
     {
         _dcsfpProfile = (DCSFPProfile)ComboBoxAirframe.SelectedItem;
         DCSBIOSControlLocator.Profile = _dcsfpProfile;
         _dcsfpProfile.UseGenericRadio = CheckBoxUseGenericRadio.IsChecked == true;
     }
 }
Пример #2
0
 private void ComboBoxAirframe_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         SetAirframe();
         if (!DCSFPProfile.IsFlamingCliff(_dcsfpProfile) &&
             !DCSFPProfile.IsKeyEmulator(_dcsfpProfile))
         {
             //User has chosen a DCS-BIOS compatible module
             StackPanelUseGenericRadio.Visibility = Visibility.Visible;
         }
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex);
     }
 }
Пример #3
0
        private void PopulateAirframeCombobox()
        {
            if (!IsLoaded)
            {
                return;
            }

            var itemsSource = new List <DCSFPProfile>();

            ComboBoxAirframe.SelectionChanged -= ComboBoxAirframe_OnSelectionChanged;
            ComboBoxAirframe.Items.Clear();
            foreach (var module in DCSFPProfile.Modules)
            {
                if (!DCSFPProfile.IsNoFrameLoadedYet(module)) //!DCSFPProfile.IsNS430(module) &&
                {
                    itemsSource.Add(module);
                }
            }

            ComboBoxAirframe.DisplayMemberPath = "Description";
            ComboBoxAirframe.ItemsSource       = itemsSource;
            ComboBoxAirframe.SelectedIndex     = 0;
            ComboBoxAirframe.SelectionChanged += ComboBoxAirframe_OnSelectionChanged;
        }
 public static void ProfileEvent(object sender, ProfileEventEnum profileEventType, GenericPanelBinding genericPanelBinding, DCSFPProfile dcsfpProfile)
 {
     OnProfileEvent?.Invoke(sender, new ProfileEventArgs {
         PanelBinding = genericPanelBinding, ProfileEventType = profileEventType, DCSProfile = dcsfpProfile
     });
 }