public LaunchProfilesEditor(Settings settings) { _manager = new LaunchProfileManager(settings); LaunchProfiles = new ObservableCollection <LaunchProfile>(_manager.GetAll()); InitializeComponent(); ProfilesListView.SelectedIndex = LaunchProfiles.IndexOf(_manager.GetDefault()); }
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(); }
private void SetProfileMenuItems() { foreach (var profile in _launchProfileManager.GetAll()) { var menuItem = new MenuItem { Header = profile.Name }; menuItem.Click += SetActiveProfileFromMenuItem; ProfilesOptions.Items.Add(menuItem); } }