private void btnKeyboard_Click(object sender, RoutedEventArgs e) { NoKeyboard kb = new NoKeyboard(frmResolution.ViewModel.CountDownSeconds); countDownSeconds.Pause(); kb.ShowDialog(); countDownSeconds.Start(); if (!string.IsNullOrEmpty(kb.SeatNo)) { string roomName = frmResolution.ViewModel.RoomName; string seatNo = SeatComm.SeatNoToShortSeatNo(clientobject.EnterOutLogData.Student.AtReadingRoom.Setting.SeatNumAmount, kb.SeatNo); TipForm_SelectSeatConfinmed tip = new TipForm_SelectSeatConfinmed(roomName, seatNo, frmResolution.ViewModel.CountDownSeconds);//显示提示窗体 countDownSeconds.Pause(); tip.ShowDialog(); countDownSeconds.Start(); if (tip.IsTrue) { clientobject.EnterOutLogData.EnterOutlog.SeatNo = kb.SeatNo; clientobject.EnterOutLogData.EnterOutlog.TerminalNum = clientobject.ClientSetting.ClientNo; clientobject.EnterOutLogData.EnterOutlog.Remark = string.Format("在终端{0}输入座位号选择,{1},{2}号座位", clientobject.ClientSetting.ClientNo, clientobject.EnterOutLogData.Student.AtReadingRoom.Name, seatNo); clientobject.EnterOutLogData.FlowControl = SeatManage.EnumType.ClientOperation.SelectSeat; //操作为选择座位 this.Hide(); } else { T_SM_Seat.UnLockSeat(kb.SeatNo);//确认窗口点击取消或者自动关闭,则解锁。 } } }
void seatBtn_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { SeatButton seatBtn = sender as SeatButton; SeatManage.EnumType.SeatLockState lockseat = T_SM_Seat.LockSeat(seatBtn.SeatNo); if (lockseat == SeatManage.EnumType.SeatLockState.Locked)//座位成功加锁 { string roomName = frmResolution.ViewModel.RoomName; string seatNo = seatBtn.ShortSeatNo; TipForm_SelectSeatConfinmed tip = new TipForm_SelectSeatConfinmed(roomName, seatNo, frmResolution.ViewModel.CountDownSeconds);//显示提示窗体 countDownSeconds.Pause(); tip.ShowDialog(); countDownSeconds.Start(); if (tip.IsTrue) { clientobject.EnterOutLogData.EnterOutlog.SeatNo = seatBtn.SeatNo; clientobject.EnterOutLogData.EnterOutlog.TerminalNum = clientobject.ClientSetting.ClientNo; clientobject.EnterOutLogData.FlowControl = SeatManage.EnumType.ClientOperation.SelectSeat; //操作为选择座位 clientobject.EnterOutLogData.EnterOutlog.Remark = string.Format("在终端{0}手动选择,{1},{2}号座位", clientobject.ClientSetting.ClientNo, clientobject.EnterOutLogData.Student.AtReadingRoom.Name, seatBtn.ShortSeatNo); this.Hide(); } else { T_SM_Seat.UnLockSeat(seatBtn.SeatNo);//确认窗口点击取消或者自动关闭,则解锁。 } } else if (lockseat == SeatManage.EnumType.SeatLockState.UnLock) //没有成功加锁 { SeatManage.SeatClient.Tip.Tip_Framework tip = new SeatManage.SeatClient.Tip.Tip_Framework(SeatManage.EnumType.TipType.SeatLocking, frmResolution.ViewModel.CountDownSeconds); //显示提示窗体 tip.ShowDialog(); drowSeatLayout(); } else if (lockseat == SeatManage.EnumType.SeatLockState.NotExists) { } }