Пример #1
0
        private void DisplayCard()
        {
            Prompt.Clear();
            Input.Clear();
            if (hashTable.Count != 0)
            {
                Random rnd   = new Random();
                int    max   = _set.Flashcards.Length;
                bool   found = false;
                do
                {
                    _index = rnd.Next(0, max);

                    if (hashTable.Contains(_index))
                    {
                        found       = true;
                        Prompt.Text = _first ? _set.Flashcards[_index].text1 : _set.Flashcards[_index].text2;
                    }
                } while (!found);
            }
            else
            {
                FinishBtn.Enabled    = true;
                Input.Enabled        = false;
                SubmitBtn.Enabled    = false;
                OverrideBtn.Enabled  = false;
                NextBtn.Enabled      = false;
                NotificationTxt.Text = "FINISHED!";
            }
        }