// 좌석버튼이 포커싱을 잃었을때 public void newbtn_OnLostFocus(object sender, EventArgs e) { Button btn = sender as Button; int btn_num = int.Parse(btn.Text); bool focus_Check = SeatBtn.btn_FocusCheck(btn); if (focus_Check) { } else { if (DataManager.seat_List[btn_num - 1].isUsed) { btn.BackColor = Color.FromArgb(250, 204, 204, 204); //회색으로 바꾸기 } else { btn.BackColor = Color.FromArgb(230, 0, 51, 255); // 파란색으로 바꾸기 } } }
public void newbtn_MouseLeave(object sender, EventArgs e) { Button btn = sender as Button; int btn_num = int.Parse(btn.Text); bool focus_Check = SeatBtn.btn_FocusCheck(btn); if (focus_Check) { } else { // btn_num보다 seat_List의 인덱스가 1작으므로 if (DataManager.seat_List[btn_num - 1].isUsed) { btn.BackColor = Color.FromArgb(250, 204, 204, 204); } else { btn.BackColor = Color.FromArgb(230, 0, 51, 255); } } }