public studyVocabulary() { this.InitializeComponent(); totalVoc = Vocabulay.getTotalVocabulary(); pos = 0; word = Vocabulay.getWord(0); actBoxes(); }
public testVocabulary() { this.InitializeComponent(); total = Vocabulay.getTotalVocabulary(); word = Vocabulay.getWord(act); meaningBox.Text = word.meaning; totalWords.Text = total.ToString() + " Words to test"; numRemaining.Text = "Success"; }
private void next_Click(object sender, RoutedEventArgs e) { pos++; if (pos >= totalVoc) { pos = 0; } word = Vocabulay.getWord(pos); actBoxes(); }
private void next_Click(object sender, RoutedEventArgs e) { total -= 1; act++; if (act >= Vocabulay.getTotalVocabulary()) { Next.IsEnabled = false; meaningBox.Background = new SolidColorBrush(Colors.White); Example.Background = new SolidColorBrush(Colors.White); wordBox.Background = new SolidColorBrush(Colors.White); GetAnswer.IsEnabled = false; Check.IsEnabled = false; numRemaining.Text = exitos + " Successes out of " + act; totalWords.Text = total.ToString() + " Words remaining"; return; } if (total == 0) { meaningBox.Text = ""; Example.Text = ""; meaningBox.Text = ""; Next.IsEnabled = false; Check.IsEnabled = false; GetAnswer.IsEnabled = false; return; } word = Vocabulay.getWord(act); Check.IsEnabled = true; meaningBox.Text = word.meaning; Example.Text = ""; numRemaining.Text = exitos + " Successes out of " + act; totalWords.Text = total.ToString() + " Words remaining"; wordBox.Background = new SolidColorBrush(Colors.White); wordBox.Text = ""; Next.IsEnabled = false; meaningBox.Background = new SolidColorBrush(Colors.White); Example.Background = new SolidColorBrush(Colors.White); wordBox.Background = new SolidColorBrush(Colors.White); }