public static void updateDetailedProgressInvoke(DialogProgress dialogProgress, int progress, InfoFFmpegProgress ffmpegProgress) { // Wait for thread to become avaiable if (dialogProgress.IsHandleCreated) { dialogProgress.Invoke((MethodInvoker) delegate() { dialogProgress.updateDetailedProgress(progress, ffmpegProgress); }); } }