コード例 #1
0
 public void ClickButton(int value)
 {
     foreach (var digit in value.ToString())
     {
         if (digit == '1')
         {
             Button1.Click();
         }
         if (digit == '2')
         {
             Button2.Click();
         }
         if (digit == '3')
         {
             Button3.Click();
         }
         if (digit == '4')
         {
             Button4.Click();
         }
         if (digit == '5')
         {
             Button5.Click();
         }
         if (digit == '6')
         {
             Button6.Click();
         }
         if (digit == '7')
         {
             Button7.Click();
         }
         if (digit == '8')
         {
             Button8.Click();
         }
         if (digit == '9')
         {
             Button9.Click();
         }
         if (digit == '0')
         {
             Button0.Click();
         }
     }
 }