예제 #1
0
        /// <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();
        }
예제 #2
0
        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);
            };
        }
예제 #3
0
 private void OnExtractionCompleted()
 {
     ExtractionCompleted?.Invoke(this, EventArgs.Empty);
 }