示例#1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            currentBalance += Convert.ToDouble(RechargePage_TextBox.Text.Trim());
            serialPort1.WriteLine(RechargePage_TextBox.Text.Trim());
            //MessageBox.Show("充值成功\n" + "当前余额 : " + RechargePage_CurrentMoneyLable.Text);
            //RechargePage_MoneyBlock.Text = currentBalance.ToString();
            timer1.Enabled = true;
            MessageBox.Show("充值成功,当前余额:" + currentBalance.ToString() + "元");
            RechargePage_MoneyBlock.Text = "";
            RechargePage_TextBox.Text    = "";

            RechargePage_stuInfoBox.Focus();
            timer1.Enabled = true;
            //RechargePage_stuInfoBox.Text = "";
        }
示例#2
0
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (TabControl.SelectedIndex == 0)
     {
         RechargePage_stuInfoBox.Focus();
     }
     if (TabControl.SelectedIndex == 1)
     {
         BorrowPage_NameTextBlock.Text   = "";
         BorrowPage_ClassTextBlock.Text  = "";
         BorrowPage_DepartTextBlock.Text = "";
         //TODO: Don't forget clear pic
         BookInfo_TextBox.Focus();
     }
     if (TabControl.SelectedIndex == 2)
     {
         ReturnPage_HiddenBox_stuInfo.Focus();
     }
     timer1.Enabled = true;
 }