예제 #1
0
 public void TextCheck(string UserText)
 {
     for (int i = 0; i < UserText.Length; i++)
     {
         if (UserText[i] == '+')
         {
             counter++;
             if (counter % 3 == 0 && counter != 0)
             {
                 TextCheckerEvent?.Invoke($"{counter} кратне числу 3");
             }
         }
         else if (UserText[i] == '-')
         {
             counter--;
             if (counter % 3 == 0 && counter != 0)
             {
                 TextCheckerEvent?.Invoke($"{counter} кратне числу 3");
             }
         }
     }
 }
예제 #2
0
 public void CounterShow()
 {
     TextCheckerEvent?.Invoke($"Counter = {counter}");
 }