public static bool Instance(MediaEncoderBusiness business, MediaEncoderSettings settings)
        {
            DeshakerPrescanWindow NewForm = new DeshakerPrescanWindow();

            NewForm.business       = business;
            NewForm.encodeSettings = settings;
            NewForm.ShowDialog();
            return(NewForm.Result);
        }
Beispiel #2
0
        private async void DeshakerPrescanButton_Click(object sender, RoutedEventArgs e)
        {
            encodeSettings.DeshakerSettings.PrescanCompleted = false;
            if (Validate() && DeshakerPrescanWindow.Instance(business, encodeSettings))
            {
                DeshakerPrescanButton.IsEnabled = false;
                business.GenerateScript(encodeSettings, false, true);
                CompletionStatus Result = await Task.Run(() => business.GenerateDeshakerLog(encodeSettings, business.GetPreviewSourceFile(encodeSettings))).ConfigureAwait(false);

                encodeSettings.DeshakerSettings.PrescanCompleted = Result == CompletionStatus.Success;
                business.DeshakerSourceSettings = encodeSettings;
                Dispatcher.Invoke(() => DeshakerPrescanButton.IsEnabled = true);
            }
        }