Esempio n. 1
0
        private async Task EnterData()
        {
            while (true)
            {
                var key = userInteractor.QuestionAnswerKey($"If you want enter flashcards in {topicMet.Topic}, press 'Enter',\n\r" +
                                                           $"If not - press else");
                if (key == UserAction.Enter)
                {
                    var front         = userInteractor.QuestionAnswerInUkr("Write front or foreign translation");
                    var transcription = userInteractor.QuestionAnswerInUkr("Write transcription");
                    var back          = userInteractor.QuestionAnswerInUkr("Write back or original word");
                    var newCard       = new Flashcard(topicMet.Topic, front, transcription, back);
                    await fileMaster.WriteData(topicMet.PathTopic, newCard);

                    userInteractor.WriteLine("Your card has been added!");
                }
                else
                {
                    return;
                }
            }
        }