/// <summary> /// /// </summary> private static void ExtractFiles() { if (Directory.Exists(Path.GetTempPath() + "platform-tools")) { Directory.Delete(Path.GetTempPath() + "platform-tools", true); } ZipFile.ExtractToDirectory(DownloadToTempPath1, Path.GetTempPath()); ExtractionCompleted?.Invoke(); }
public ProgressPage() { InitializeComponent(); //Configuring the workerThread workerThread.WorkerReportsProgress = true; workerThread.DoWork += ExtractFile; workerThread.ProgressChanged += delegate(object sender, ProgressChangedEventArgs e) { StatusMessage.Text = e.UserState as String; ProgressBar.Value = e.ProgressPercentage; }; workerThread.RunWorkerCompleted += delegate(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { System.Windows.MessageBox.Show(e.Error.Message); ExtractorLogic.Instance.exportResultString = (String)App.Current.Resources["Finish_Message_Failure"]; } ExtractionCompleted?.Invoke(null, null); }; }
private void OnExtractionCompleted() { ExtractionCompleted?.Invoke(this, EventArgs.Empty); }