void NewFlashCard() { ClearGrid(m_ButtonGrid); m_FlashCards.Remove(m_CurrentFlashCard); if (m_FlashCards.Count > 0) { System.Random random = new System.Random(); int randomNumber = random.Next(0, m_FlashCards.Count); m_CurrentFlashCard = m_FlashCards[randomNumber]; OnPropertyChanged(nameof(QuestionText)); for (int i = 0; i < m_CurrentFlashCard.Buttons.Count; i++) { AddButtonToGrid(m_ButtonGrid, m_CurrentFlashCard.Buttons[i], i, OnButtonClicked); } } else { PageViewModel.SetPage(new Views.FlashCardResultsView()); Trace.WriteLine("Done!"); } }
public WindowViewModel() { m_Model = new WindowModel(); PageViewModel.SetPage(new Views.HomeView()); }