コード例 #1
0
ファイル: PaymentForm.cs プロジェクト: LingKing/Registration
        private void OKLabel_Click(object sender, EventArgs e)
        {
            if (CardNumberTextBox.Text.Length == 16 && DateMonthComboBox.Text.Length > 0 && DateYearComboBox.Text.Length >= 4 && CVVTextBox.Text.Length == 3)
            {
                Card c = new Card();
                c.setNumber(CardNumberTextBox.Text);
                c.setDate(DateMonthComboBox.Text, DateYearComboBox.Text);
                c.setCVV(CVVTextBox.Text);

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                label5.Show();
            }
        }
コード例 #2
0
ファイル: PaymentForm.cs プロジェクト: zyxel/Registration
 /// <summary>
 /// When OKLabel is clicked.
 /// </summary>
 /// <param name="sender"> Event sender</param>
 /// <param name="e"> Event argument</param>
 private void OKLabel_Click(object sender, EventArgs e)
 {
     if (this.CardNumberTextBox.Text.Length == 16 && this.DateMonthComboBox.Text.Length > 0 && this.DateYearComboBox.Text.Length >= 4 && this.securityTextBox.Text.Length == 3)
     {
         Card c = new Card();
         c.SetNumber(this.CardNumberTextBox.Text);
         c.SetDate(this.DateMonthComboBox.Text, this.DateYearComboBox.Text);
         c.SetCVV(this.securityTextBox.Text);
         this.DialogResult = DialogResult.OK;
     }
 }
コード例 #3
0
 public void cardTestDate()
 {
     Card c = new Card();
     c.SetDate("1", "1");
 }
コード例 #4
0
 public void cardTestNumber()
 {
     Card c = new Card();
     c.SetNumber("543");
 }
コード例 #5
0
 public void cardTestCVV()
 {
     Card c = new Card();
     c.SetCVV("54544545");
 }