コード例 #1
0
 private void btnDone_Click(object sender, EventArgs e)
 {
     try
     {
         // now set to value in textbox (ignore blank box)
         if (tbValue.Text != "")
         {
             // first set the channel level to 0, otherwise it just adds to level
             m_Validator.SetCoinLevelsByChannel(cbChannels.SelectedIndex + 1, 0);
             // now set
             m_Validator.SetCoinLevelsByChannel(cbChannels.SelectedIndex + 1, Int16.Parse(tbValue.Text));
         }
         else
         {
             MessageBox.Show("No input, channel values unaltered", "WARNING");
         }
         m_Validator.UpdateData();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(), "EXCEPTION");
         return;
     }
     this.Close();
 }