private void Play_Click(object sender, RoutedEventArgs e) { Status.Foreground = Brushes.Black; Status.Text = "Changing languages..."; Play.IsEnabled = false; var gamePath = GameDirectory.Text; var sourceLanguage = (Language)SourceLanguage.SelectedItem; var targetLanguage = (Language)TargetLanguage.SelectedItem; Task.Run(() => _translationProcessor.Translate(gamePath, sourceLanguage, targetLanguage)); }
/// <summary> /// To String. /// </summary> /// <returns></returns> public override string ToString() { var text = PackageKey == TranslationManager.ANONYMOUS_PACKAGE_KEY ? _translationProcessor.AnonymousTranslate(LanguageTag, OriginText) : _translationProcessor.Translate(LanguageTag, PackageKey, OriginText); if (FormatingParameters != null) { text = CustomFormatProvider == null ? string.Format(text, FormatingParameters) : CustomFormatProvider(PackageKey, LanguageTag, text, FormatingParameters); } return(text); }