コード例 #1
0
 public LaunchProfilesEditor(Settings settings)
 {
     _manager       = new LaunchProfileManager(settings);
     LaunchProfiles = new ObservableCollection <LaunchProfile>(_manager.GetAll());
     InitializeComponent();
     ProfilesListView.SelectedIndex = LaunchProfiles.IndexOf(_manager.GetDefault());
 }
コード例 #2
0
 private void HandleChange()
 {
     LaunchProfiles = new ObservableCollection <LaunchProfile>(_manager.GetAll());
     ProfilesListView.SelectedIndex = DeleteMode.IsChecked.Value ? -1 : LaunchProfiles.IndexOf(_manager.GetDefault());
     ProfilesListView.ItemsSource   = LaunchProfiles;
     ProfilesListView.Items.Refresh();
 }
コード例 #3
0
 private void SetProfileMenuItems()
 {
     foreach (var profile in _launchProfileManager.GetAll())
     {
         var menuItem = new MenuItem
         {
             Header = profile.Name
         };
         menuItem.Click += SetActiveProfileFromMenuItem;
         ProfilesOptions.Items.Add(menuItem);
     }
 }