void _translator_TranslationComplete(object sender, TranslationCompleteEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(() => { targetTextBox.Text = e.Translation; }); }
private void TranslationComplete(object sender, TranslationCompleteEventArgs e) { Status.Text = e.Message; Play.IsEnabled = true; Progress.Value = 100; switch (e.CompletionResult) { case CompletionResult.Success: Status.Foreground = Brushes.Green; Close(); break; case CompletionResult.Warn: Status.Foreground = Brushes.Orange; break; case CompletionResult.Error: Status.Foreground = Brushes.Red; break; } }
private void _translationProcessor_TranslationComplete(object sender, TranslationCompleteEventArgs e) { Dispatcher.Invoke(() => TranslationComplete(sender, e)); }