/// <summary> /// Gets called when all preview's subtitle processing is finished (or cancelled). /// </summary> private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (dialogProgress != null) { dialogProgress.Hide(); dialogProgress = null; } if (e.Error != null) { UtilsMsg.showErrMsg(e.Error.Message); return; } if (e.Cancelled) { return; } WorkerVars workerVars = e.Result as WorkerVars; previewWorkerVars = workerVars; updateStats(); populateLinesListView(this.comboBoxEpisode.SelectedIndex); Logger.Instance.info("Preview: COMPLETED"); }
/// <summary> /// Called when the audio extraction thread completes. /// </summary> private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (dialogProgress != null) { dialogProgress.Hide(); dialogProgress = null; } if (e.Error != null) { UtilsMsg.showErrMsg(e.Error.Message); return; } if (e.Cancelled) { MessageBox.Show("Action cancelled.", UtilsAssembly.Title, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } TimeSpan workerTotalTime = DateTime.Now - this.workerStartTime; WorkerVars workerVars = e.Result as WorkerVars; string endMessage = String.Format("Audio extraction completed in {0:0.00} minutes.", workerTotalTime.TotalMinutes); UtilsMsg.showInfoMsg(endMessage); }
/// <summary> /// Gets called when all subtitle processing is finished (or cancelled). /// </summary> private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (dialogProgress != null) { dialogProgress.Hide(); dialogProgress = null; } if (e.Error != null) { UtilsMsg.showErrMsg(e.Error.Message); return; } if (e.Cancelled) { MessageBox.Show("Action cancelled.", UtilsAssembly.Title, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } TimeSpan workerTotalTime = DateTime.Now - workerStartTime; WorkerVars workerVars = e.Result as WorkerVars; string srsFormat = getSrsFormatList(); string endMessage = $"Processing completed in {workerTotalTime.TotalMinutes:0.00} minutes.\n\n{srsFormat}"; UtilsMsg.showInfoMsg(endMessage); }
/// <summary> /// Called when the Dueling Subtitles creation thread completes. /// </summary> private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (dialogProgress != null) { dialogProgress.Hide(); dialogProgress = null; } if (e.Error != null) { UtilsMsg.showErrMsg(e.Error.Message); return; } if (e.Cancelled) { MessageBox.Show("Action cancelled.", UtilsAssembly.Title, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } WorkerVars workerVars = e.Result as WorkerVars; UtilsMsg.showInfoMsg("Dueling subtitles have been created successfully."); }