예제 #1
0
        public Vokabel GetNaechsteVokabel()
        {
            Vokabel v = null;

            _laufendeNummer++;
            if (_laufendeNummer < _pruefVokabeln.Count)
            {
                v = _pruefVokabeln[_laufendeNummer];
            }
            return(v);
        }
예제 #2
0
        private void btnRegisterAdd_Click(object sender, RoutedEventArgs e)
        {
            if (sender == textBoxRegisterLang2)
            {
                if (((KeyEventArgs)e).Key != Key.Enter)
                {
                    return;
                }
            }
            if (textBoxRegisterLang1.Text == "" || textBoxRegisterLang2.Text == "")
            {
                return;
            }
            Vokabel neu = new Vokabel(textBoxRegisterLang1.Text, textBoxRegisterLang2.Text);

            register.Add(neu);
            refreshRegisterList();
            textBoxRegisterLang1.Text = "";
            textBoxRegisterLang2.Text = "";
            textBoxRegisterLang1.Focus();
        }
예제 #3
0
        private void QueryNextItem(bool removeOld)
        {
            if (currentQuery != null && removeOld)
            {
                query.Remove(currentQuery);
            }
            if (query.Count < 1)
            {
                MessageBox.Show("Fertig!");
                textBoxLearnLang1.Text = "";
                btnHome_Click(null, null);
                return;
            }
            int index;

            do
            {
                index = new Random().Next(query.Count);
            } while (query.Count > 1 && query[index] == currentQuery);
            currentQuery           = query[index];
            textBoxLearnLang1.Text = currentQuery.lang1;
        }