private void CancelExtraction() { TerminateRunners(); if (loadingWindow != null) { if (!loadingWindow.IsDisposed && loadingWindow.Visible) { loadingWindow.Close(); } loadingWindow = null; } }
public void OnCDNSearchDone(object sender, EventArgs args) { CDNScanDoneArgs scanResult = (CDNScanDoneArgs)args; if (cdnWindow != null) { EventManager.CDNScanDone -= OnCDNSearchDone; cdnWindow.Close(); cdnWindow = null; } if (scanResult.BestHost != null) { Program.Settings.RemoteHost = scanResult.BestHost; Program.Settings.RemoteHostPath = scanResult.HostPath; Program.Settings.ShowSourceSelector = false; Program.Settings.UseRemote = selectedDirectory == null; Program.Settings.WoWDirectory = selectedDirectory; Program.Settings.Persist(); selectionDone = true; DeferToParent(); } else { Alert.Show("Unable to locate a responsive CDN server. Ensure you are connected to the internet and that the Blizzard servers are not under maintenance, then try again. Otherwise, use a different data source method."); } }
private void CloseLoadingWindow() { if (loadingWindow != null) { if (!loadingWindow.IsDisposed && loadingWindow.Visible) { loadingWindow.Close(); } loadingWindow = null; } }
private void OnFileExtractComplete(object sender, EventArgs rawArgs) { FileExtractCompleteArgs args = (FileExtractCompleteArgs)rawArgs; if (args.RunnerID == runnerID) { extractRunner = null; loadingWindow.Close(); loadingWindow = null; if (args.Success) { ShowDBCFile(Path.Combine(Constants.TEMP_DIRECTORY, args.File.FullName)); } else { throw new Exception("Unable to extract DBC file -> " + args.File.FullName); } } }
private void OnCASCLoadDone(object sender, EventArgs e) { EventManager.CASCLoadDone -= OnCASCLoadDone; if (loadingWindow != null) { loadingWindow.Close(); loadingWindow = null; } if (!((CASCLoadDoneArgs)e).Success) { throw new Exception("CASC engine blew up."); } UpdateRemoteVersionsField(); }