Example #1
0
 private void SetAnswer(string Answer)
 {
     foreach (Control ctrl in this.Controls)
     {
         if (ctrl is InputDigitControl)
         {
             InputDigitControl idc = (InputDigitControl)ctrl;
             if (idc.ReadOnly)
             {
                 idc.Text = Answer;
             }
         }
     }
 }
Example #2
0
 private void CopyToClipboard()
 {
     foreach (Control ctrl in this.Controls)
     {
         if (ctrl is InputDigitControl)
         {
             InputDigitControl idc = (InputDigitControl)ctrl;
             if (idc.ReadOnly)
             {
                 if (idc.Text != string.Empty)
                 {
                     Clipboard.Clear();
                     Clipboard.SetText(idc.Text);
                 }
             }
         }
     }
 }
Example #3
0
 private void DisableInputDigitControl(InputDigitControl idcCtrl)
 {
     foreach (Control ctrl in this.Controls)
     {
         if (ctrl is InputDigitControl)
         {
             InputDigitControl idc = (InputDigitControl)ctrl;
             if (idc.Name == idcCtrl.Name)
             {
                 idc.ReadOnly = true;
             }
             else
             {
                 idc.ReadOnly = false;
             }
         }
     }
 }