/// <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; } }
public void cardTestNumber() { Card c = new Card(); c.SetNumber("543"); }