private void MatchYear() { //if (Regex.IsMatch(this.cboYear.Text, "^(?!0000)[0-9]{4}$")) //{ // this.lblMatchYear.Text = String.Empty; // return true; //} //else //{ // this.lblMatchYear.Text = "Year is wrong"; // return false; //} if (Anime.IsMatchYear(this.cboYear.Text)) { //this.lblMatchYear.Text = String.Empty; this.lblSchedule.ForeColor = SystemColors.ControlText; btMatch |= 0x02; } else { //this.lblMatchYear.Text = "Year is wrong"; this.lblSchedule.ForeColor = Color.Red; btMatch &= 0xFD; } }