コード例 #1
0
 private void HungarianFlag_Click(object sender, RoutedEventArgs e)
 {
     BoxClearing();
     IsHungarian         = true;
     WordBox2.Foreground = Brushes.Black;
     word = dbDataHandler.SearchWord();
     WordBox1.AppendText(word.HungarianWord);
 }
コード例 #2
0
 public Window1()
 {
     InitializeComponent();
     dbDataHandler       = new DbDataHandler(new WordDbContexts());
     WordBox1.IsReadOnly = true;
     word = dbDataHandler.SearchWord();
     WordBox1.AppendText(word.HungarianWord);
 }
コード例 #3
0
 private void OnKeyDownHandler(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Return)
     {
         if (IsHungarian)
         {
             if (WordBox2.Text == word.SpanishWord)
             {
                 BoxClearing();
                 WordBox2.Foreground = Brushes.Black;
                 word = dbDataHandler.SearchWord();
                 WordBox1.AppendText(word.HungarianWord);
             }
             else
             {
                 WordBox2.Foreground = Brushes.Red;
                 WordBox2.Text       = word.SpanishWord;
             }
         }
         else
         {
             if (WordBox2.Text == word.HungarianWord)
             {
                 BoxClearing();
                 WordBox2.Foreground = Brushes.Black;
                 word = dbDataHandler.SearchWord();
                 WordBox1.AppendText(word.SpanishWord);
             }
             else
             {
                 WordBox2.Foreground = Brushes.Red;
                 WordBox2.Text       = word.HungarianWord;
             }
         }
     }
 }