Пример #1
0
 void _translator_TranslationComplete(object sender, TranslationCompleteEventArgs e)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         targetTextBox.Text = e.Translation;
     });
 }
Пример #2
0
        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;
            }
        }
Пример #3
0
 private void _translationProcessor_TranslationComplete(object sender, TranslationCompleteEventArgs e)
 {
     Dispatcher.Invoke(() => TranslationComplete(sender, e));
 }