예제 #1
0
        public registered()
        {
            InitializeComponent();
            words w = new words();

            w.initialize();
        }
예제 #2
0
        private void Button_Click2(object sender, RoutedEventArgs e)
        {
            string w = "";
            string s = "";
            string t = "";

            w = aWord.Text;
            s = aStatus.SelectedValue.ToString();
            t = aTranslation.Text;
            if (aWord.Text != "" && aStatus.SelectedValue.ToString() != "" && aTranslation.Text != "")
            {
                if (word.check(aWord.Text))
                {
                    MessageBox.Show("This word already exists !", "Attention", MessageBoxButton.OK, MessageBoxImage.Error);
                }
                else
                {
                    word.writeWords(w, s, t);
                }
                aWord.Text        = "";
                aTranslation.Text = "";
            }

            word.initialize();
            SearchWord.ItemsSource = word.word;
        }
예제 #3
0
 public uHome()
 {
     InitializeComponent();
     word = new words();
     word.initialize();
     SearchWord.ItemsSource   = word.word;
     SearchWord.SelectedIndex = 0;
 }
예제 #4
0
 public aHome()
 {
     InitializeComponent();
     stat = new string[] { "noun", "verb", "adjective", "adverb" };
     word = new words();
     word.initialize();
     aStatus.ItemsSource      = stat;
     aStatus.SelectedIndex    = 0;
     SearchWord.ItemsSource   = word.word;
     SearchWord.SelectedIndex = 0;
 }
예제 #5
0
        public void tester()
        {
            t.tester();
            ques   = t.ques;
            answer = t.answer;
            words w = new words();

            w.initialize();
            question.Content = (count + 1) + ".What is the translation of \"" + w.word[ques] + "\" ?";
            a1.Content       = w.translation[answer[0]];
            a2.Content       = w.translation[answer[1]];
            a3.Content       = w.translation[answer[2]];
            a4.Content       = w.translation[answer[3]];
            a5.Content       = w.translation[answer[4]];
        }
예제 #6
0
        private void radio(object sender, RoutedEventArgs e)
        {
            a1.IsEnabled = false;
            a2.IsEnabled = false;
            a3.IsEnabled = false;
            a4.IsEnabled = false;
            a5.IsEnabled = false;
            words w = new words();

            w.initialize();
            string a = w.translation[ques];

            if (a1.IsChecked == true && a1.Content.ToString() == a)
            {
                r.insert(w.word[ques], a, a1.Content.ToString());
                result.Content = "True :)";
            }
            else if (a2.IsChecked == true && a2.Content.ToString() == a)
            {
                r.insert(w.word[ques], a, a2.Content.ToString());
                result.Content = "True :)";
            }
            else if (a3.IsChecked == true && a3.Content.ToString() == a)
            {
                r.insert(w.word[ques], a, a3.Content.ToString());
                result.Content = "True :)";
            }
            else if (a4.IsChecked == true && a4.Content.ToString() == a)
            {
                r.insert(w.word[ques], a, a4.Content.ToString());
                result.Content = "True :)";
            }
            else if (a5.IsChecked == true && a5.Content.ToString() == a)
            {
                r.insert(w.word[ques], a, a5.Content.ToString());
                result.Content = "True :)";
            }
            else if (a1.IsChecked == true && a1.Content.ToString() != a)
            {
                result.Content = "False :(";
                r.insert(w.word[ques], a, a1.Content.ToString());
            }
            else if (a2.IsChecked == true && a2.Content.ToString() != a)
            {
                result.Content = "False :(";
                r.insert(w.word[ques], a, a2.Content.ToString());
            }
            else if (a3.IsChecked == true && a3.Content.ToString() != a)
            {
                result.Content = "False :(";
                r.insert(w.word[ques], a, a3.Content.ToString());
            }
            else if (a4.IsChecked == true && a4.Content.ToString() != a)
            {
                result.Content = "False :(";
                r.insert(w.word[ques], a, a4.Content.ToString());
            }
            else if (a5.IsChecked == true && a5.Content.ToString() != a)
            {
                result.Content = "False :(";
                r.insert(w.word[ques], a, a5.Content.ToString());
            }
            else
            {
            }
        }