private void bt_nextWord_Click(object sender, RoutedEventArgs e) { var rnd = new Random(DateTime.Now.Millisecond); int actual_position = rnd.Next(0, List_AllWords.Count); actualWord = List_AllWords[actual_position]; kindVoc = KindOfVocabulary.Czech; ButtonContent(KindOfVocabulary.Czech); }
private void bt_nextWord_Click(object sender, RoutedEventArgs e) { ClearAllTextBox(); //random number var rnd = new Random(DateTime.Now.Millisecond); int actual_position = rnd.Next(0, List_AllWords.Count); //get word by random number actualWord = List_AllWords[actual_position]; //set kind of word kindVoc = KindOfVocabulary.Czech; //Set button content by kind of word ButtonContent(KindOfVocabulary.Czech); }