Ejemplo n.º 1
0
        void ChangePage()
        {
            System.Diagnostics.Trace.WriteLine($"Selected Index: {SelectedPage}");
            switch (SelectedPage)
            {
            case (int)PageIndex.Home: {
                PageTitle = "Home";
                PageViewModel.SetPage(new Views.HomeView());
                break;
            }

            case (int)PageIndex.FlashCard: {
                PageTitle = "Flash Cards";
                PageViewModel.SetPage(new Views.FlashCard());
                break;
            }

            case (int)PageIndex.Dev_STM: {
                PageTitle = "Send Test Mail"; SendMail("*****@*****.**");
                break;
            }

            case (int)PageIndex.GitHub: {
                PageTitle = "Github";
                break;
            }
            }
        }
Ejemplo n.º 2
0
        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!");
            }
        }
Ejemplo n.º 3
0
        public WindowViewModel()
        {
            m_Model = new WindowModel();

            PageViewModel.SetPage(new Views.HomeView());
        }