Ejemplo n.º 1
0
        public override bool checkAns(string ans, string word)
        {
            if (ans == null)
            {
                ans = "";
            }
            question = new Question(actualWord, previousAnswers, score, counter);

            counter++;
            var label = (Label)grid.FindName("wrongAnswerLabel");

            label.Content = "pytanie " + (counter + 1) + "/10";
            if (counter >= 10)
            {
                EndTest endTestWindow = new EndTest(score);
                endTestWindow.ShowDialog();
                mw.MainFrame.Content = new MenuPage();
            }
            if (ans.Equals(word))
            {
                score++;
            }

            return(true);
        }
Ejemplo n.º 2
0
 public FileSearcher(string dataPattern, int bufferSize, EndTest endTest, GetCount getCount, ReturnResult returnResult, GetFirstFileInfo getFirstFileInfo)
 {
     this.dataPattern = dataPattern.ToLower();
     this.bufferSize = bufferSize;
     this.endTest = endTest;
     this.getCount = getCount;
     this.returnResult = returnResult;
     this.getFirstFileInfo = getFirstFileInfo;
 }
Ejemplo n.º 3
0
 void TestEnded(string testName)
 {
     EndTest?.Invoke(testName);
 }