示例#1
0
 /// <summary>
 /// Returns the translated error messages for a specific property, or empty string if the field was valid
 /// </summary>
 /// <param name="fieldName"></param>
 /// <param name="tBox"></param>
 /// <returns></returns>
 public string errorMessageOf(string fieldName, TranslateBox tBox)
 {
     try
     {
         return(tBox.translate(this.errorMessage[fieldName]));
     }
     catch (Exception)
     {
         return("");
     }
 }
示例#2
0
        private void Next_Word(object sender, RoutedEventArgs e)         //
        {
            CurrentWordIdx++;
            OnPropertyChanged("CurrentPlWord");
            OnPropertyChanged("CurrentEsWord");

            ProgressBar.Value += 1;

            TranslateBox.Clear();
            AnswerLabel.Content      = "";
            TranslateBox.IsEnabled   = true;
            CounterWordLabel.Content = (CurrentWordIdx + 1).ToString("0");
            if (CurrentWordIdx == Words.Count - 1)
            {
                NextButton.Visibility        = Visibility.Hidden;
                NextButton.IsEnabled         = false;
                ShowResultsButton.Visibility = Visibility.Visible;
            }
        }