private void GcDownloadStep1GameCenterCheckbox_Click(object sender, RoutedEventArgs e) { if ((bool)GcDownloadStep1GameCenterCheckbox.IsChecked) { Logging.Debug("GcDownloadStep1GameCenterCheckbox check true, checking for Wgc path"); if (string.IsNullOrWhiteSpace(WgcSavedpath)) { Logging.Debug("WgcSavedPath is null, getting from registry"); WgcSavedpath = RegistryUtils.AutoFindWgcDirectory(); Logging.Debug("WgcSavedPath retrieved as '{0}'", WgcSavedpath); } if (!string.IsNullOrWhiteSpace(WgcSavedpath)) { SelectedClient = Path.GetDirectoryName(WgcSavedpath); Logging.Debug("SelectedClient set as WGC path: {0}", SelectedClient); GcDownloadStep1ResetParams(true, true); GcDownloadStep1SetupArrayWGC(); GcDownloadStep1GetParams(); return; } else { Logging.Error("WgcSavedPath is null, resetting"); } } //reset GcDownloadStep1GameCenterCheckbox.Click -= GcDownloadStep1GameCenterCheckbox_Click; GcDownloadStep1GameCenterCheckbox.IsChecked = false; GcDownloadStep1GameCenterCheckbox.Click += GcDownloadStep1GameCenterCheckbox_Click; GcDownloadStep1ResetParams(true, true); }
private void InstallationCompleteStartGameCenterButton_Click(object sender, RoutedEventArgs e) { string actualLocation = RegistryUtils.AutoFindWgcDirectory(); if (string.IsNullOrEmpty(actualLocation) || !CommonUtils.StartProcess(actualLocation)) { Logging.Error("could not start wgc process using command line '{0}'", actualLocation); MessageBox.Show(Translations.GetTranslatedString("CouldNotStartProcess")); } else { Logging.Debug("wgc successfully started!"); } DialogResult = true; Close(); }