public TranslationEditorViewModel(PhraseReference.Phrase phrase, TranslationReference.Translation translation)
        {
            this.TranslationResult = new TranslationReference.Translation();
            this.Languages = new ObservableCollection<LanguageReference.Language>();

            _currentPhraseSelected = phrase;
            this.Content = translation.TranslationContent;
            this.Description = translation.TranslationDescription;
            this.Language = translation.LanguageId;
            this.TranslationResult.TranslationId = translation.TranslationId;
            this.Lexicon = translation.Lexicon;

            _languageClient = new LanguageReference.LanguageServiceClient();
            _languageClient.DisplayLanguagesCompleted += DisplayListLanguageComplete;
            _languageClient.DisplayLanguagesAsync();

            this.ValidationMessage = string.Empty;
        }
Exemple #2
0
 public void CreateAPhrase()
 {
     PhraseReference.Phrase temporalPhrase = new PhraseReference.Phrase();
     temporalPhrase.phraseId = this.PhraseResult.phraseId;
     temporalPhrase.AutorId = Convert.ToInt32(this.Autor);
     temporalPhrase.OriginId = this.Origin;
     temporalPhrase.TranslationId = this.PhraseResult.TranslationId;
     this.PhraseResult = temporalPhrase;
     this.TranslationResult = this.CreateATranslation();
 }