private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (files.Count == 0)
            {
                MessageBox.Show("Please select Raw Files!");
                return;
            }
            else if (!Directory.Exists(output))
            {
                MessageBox.Show("The directory not exists!");
                return;
            }

            ButtonRun.IsEnabled = false;

            Counter            counter     = new Counter();
            ProgressingCounter readCounter = new ProgressingCounter();
            IConverter         converter   = null;

            if (MGF.IsChecked == true)
            {
                converter = new MGFConverter(counter, readCounter);
            }
            else if (MZML.IsChecked == true)
            {
                converter = new MZMLConverter(counter, readCounter);
            }

            counter.progressChange     += SearchProgressChanged;
            readCounter.progressChange += ReadingProgressChanged;

            await Task.Run(() =>
            {
                foreach (string path in files)
                {
                    readingCounter = 0;
                    UpdateReadingProgress(100);
                    converter.ParallelRun(path, output, type, charger);
                }
            });

            ButtonRun.IsEnabled = true;
        }
 public MGFConverter(Counter progress, ProgressingCounter readingProgress)
 {
     this.progress        = progress;
     this.readingProgress = readingProgress;
 }
 public MZMLConverter(Counter progress, ProgressingCounter progressingCounter)
 {
     this.progress           = progress;
     this.progressingCounter = progressingCounter;
 }