Пример #1
0
 void process_Output(object sender, ProcessOutputArgs e)
 {
     if (e.OutputLine == null)
     {
         return;
     }
     if (Output != null)
     {
         Output(this, e);
     }
     if (couldNotFindModeRegex.IsMatch(e.OutputLine) && !couldNotFindMode)
     {
         couldNotFindMode = true;
         if (Output != null)
         {
             Output(this, new ProcessOutputArgs(
                        "Could not find mode, so switching to simplified arguments."));
         }
         process.Cancel();
         process.Dispose();
         process = new F2TVideoConverterProcess(this.fileName, true);
         AddEventHandlersToProcess(process);
         process.Start();
     }
 }
 private void converter_FFMPEGOutput(object sender, ProcessOutputArgs e)
 {
     if (this.Dispatcher.CheckAccess()) {
         ffmpegOutput.Add(e.OutputLine);
         if (ffmpegOutputViewer != null)
             ffmpegOutputViewer.AddOutput(e.OutputLine);
     }
     else
         this.Dispatcher.Invoke((Action)(() => this.converter_FFMPEGOutput(sender, e)));
 }
Пример #3
0
 void process_Output(object sender, ProcessOutputArgs e)
 {
     if (e.OutputLine == null)
         return;
     if (Output != null)
         Output(this, e);
     if (couldNotFindModeRegex.IsMatch(e.OutputLine) && !couldNotFindMode) {
         couldNotFindMode = true;
         if (Output != null)
             Output(this, new ProcessOutputArgs(
                 "Could not find mode, so switching to simplified arguments."));
         process.Cancel();
         process.Dispose();
         process = new F2TVideoConverterProcess(this.fileName, true);
         AddEventHandlersToProcess(process);
         process.Start();
     }
 }