public MainWindow() { if (!File.Exists(configFileName)) { createBlankConfigFile(); } AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", configFileName); InitializeComponent(); settings = new OriginGameLauncherSettings(); testButton.IsEnabled = false; detectedOriginGames = Origin.DetectOriginGames(); if (detectedOriginGames == null) { MessageBox.Show("No Origin games found on your system. Origin may not be installed properly.", "Oops", MessageBoxButton.OK, MessageBoxImage.Exclamation); Application.Current.Shutdown(); return; } DataContext = new ViewModel() { DetectedOriginGameNames = detectedOriginGames.Select(x => x.Name).ToList(), GameExeFileName = settings.GameProcessExe, Game = settings.Game }; }