//对话框载入 private void ReceptionSeatForm_Load(object sender, EventArgs e) { dao = new DAO(LogIn.connectionString); //var db = new BathDBDataContext(LogIn.connectionString); seat_length = dao.get_seat_length(); seat_start = (seat_length == 3) ? 17 : 16; //var ops = db.Options.FirstOrDefault(); seatLock = MConvert<bool>.ToTypeOrDefault(LogIn.options.启用手牌锁, false); auto_seat_card = MConvert<bool>.ToTypeOrDefault(LogIn.options.自动感应手牌, false); use_pad = MConvert<bool>.ToTypeOrDefault(LogIn.options.启用客房面板, false); lock_type = LogIn.options.手牌锁类型; has_double_department = dao.has_hotel_department(); tSeat.Visible = (!seatLock || has_double_department); this.Text = Constants.appName + "-前台系统" + Constants.version + " 欢迎使用:" + LogIn.m_User.id; currentUser.Text = "当前用户: " + LogIn.m_User.id + " " + LogIn.m_User.name; var td = new Thread(new ThreadStart(initial_ui_thread)); td.IsBackground = true; td.Start(); m_thread = new Thread(new ThreadStart(update_seats_ui)); m_thread.IsBackground = true; m_thread.Start(); m_thread_clearMemory = new Thread(new ThreadStart(clear_Memory)); m_thread_clearMemory.IsBackground = true; m_thread_clearMemory.Start(); if (seatLock && auto_seat_card) { m_thread_seatCard = new Thread(new ThreadStart(seat_card_thread)); m_thread_seatCard.IsBackground = true; m_thread_seatCard.Start(); } if (has_double_department) { m_thread_detect_reserve_over_due = new Thread(new ThreadStart(detect_reserve_over_due)); m_thread_detect_reserve_over_due.IsBackground = true; m_thread_detect_reserve_over_due.Start(); } }