public LaunchProfilesEditor(Settings settings)
 {
     _manager       = new LaunchProfileManager(settings);
     LaunchProfiles = new ObservableCollection <LaunchProfile>(_manager.GetAll());
     InitializeComponent();
     ProfilesListView.SelectedIndex = LaunchProfiles.IndexOf(_manager.GetDefault());
 }
 public MainWindow()
 {
     PersistentSettings.Settings.InitialiseFile();
     try
     {
         Settings = PersistentSettings.Settings.ReadFromFile();
     }
     catch (System.IO.FileFormatException)
     {
         MessageBox.Show("Settings file was corrupted and will now be reverted to default.", "Start Launcher loading error", MessageBoxButton.OK, MessageBoxImage.Warning);
         Settings = PersistentSettings.Settings.RestoreDefaultSettings();
     }
     _startObjectsManager  = new PersistentSettings.StartObjects.StartObjectsManager(Settings);
     _launchProfileManager = new PersistentSettings.LaunchProfiles.LaunchProfileManager(Settings);
     InitializeComponent();
     SetProfileName();
     SetProfileMenuItems();
     App.CurrentApp.SetTimer(Settings.ShutdownTimerSeconds, ShutdownProgressBar, Settings.ShutdownTimerAction, _startObjectsManager);
     LaunchOnStartup.IsChecked = Settings.LaunchOnStartup;
 }