/// <summary> /// 显示控件 /// </summary> private void ShowUC_Type() { UC_Cancas.Children.Clear(); switch (ViewModel.MessageType) { case TipType.ContinuedTime: { if (string.IsNullOrEmpty(ViewModel.Tip_ViewModel.StartTime)) { UC_Tip_ContinueTimeNoAgain UC_tip = new UC_Tip_ContinueTimeNoAgain(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } else { UC_Tip_ContinueTime UC_tip = new UC_Tip_ContinueTime(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } } break; case TipType.AutoContinuedTime: { if (string.IsNullOrEmpty(ViewModel.Tip_ViewModel.StartTime)) { UC_Tip_ContinueTimeAutoNoAgain UC_tip = new UC_Tip_ContinueTimeAutoNoAgain(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } else { UC_Tip_ContinueTimeAuto UC_tip = new UC_Tip_ContinueTimeAuto(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } } break; case TipType.WaitSeatWithSeat: case TipType.AutoContinuedTimeNoCount: case TipType.ContinuedTimeNoCount: case TipType.BeapeatRoomNotExists: case TipType.BespeatSeatConfirmFild: case TipType.Exception: case TipType.ReadingRoomFull: case TipType.SeatUsing: case TipType.SeatLocking: case TipType.SeatStopping: case TipType.SeatNotExists: case TipType.SelectSeatFrequent: case TipType.ShortLeaveSeatOverTime: case TipType.WaitSeatFrequent: case TipType.NotReaderSelf: case TipType.IsBookingSeat: { UC_Tip_CommFailed UC_tip = new UC_Tip_CommFailed(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ContinuedTimeNotTime: { UC_Tip_ContinueTimeNoTime UC_tip = new UC_Tip_ContinueTimeNoTime(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ContinuedTimeWithout: { UC_Tip_ContinueTimeNoNeed UC_tip = new UC_Tip_ContinueTimeNoNeed(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.SelectSeatResult: case TipType.BespeatSeatConfirmSuccess: { UC_Tip_SelectSeatResult UC_tip = new UC_Tip_SelectSeatResult(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ComeToBack: { UC_Tip_ComeBack UC_tip = new UC_Tip_ComeBack(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.IsBlacklist: { UC_Tip_IsBlacklist UC_tip = new UC_Tip_IsBlacklist(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.Leave: { UC_Tip_Leave UC_tip = new UC_Tip_Leave(); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ReaderTypeInconformity: { UC_Tip_EnterNoType UC_tip = new UC_Tip_EnterNoType(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ReadingRoomClosing: { UC_Tip_ReadingRoomNoOpen UC_tip = new UC_Tip_ReadingRoomNoOpen(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ShortLeave: { UC_Tip_ShortLeave UC_tip = new UC_Tip_ShortLeave(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.WaitSeatSuccess: { UC_Tip_WaitSeat UC_tip = new UC_Tip_WaitSeat(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ActivationReadCard: { UC_Tip_CommWarm UC_tip = new UC_Tip_CommWarm(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ActivationSuccess: { UC_Tip_ActivationSuccess UC_tip = new UC_Tip_ActivationSuccess(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.CancelActivationWarn: { UC_Tip_CommQuestion UC_tip = new UC_Tip_CommQuestion(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.CancelActivationSuccess: case TipType.BookCancelSuccess: { UC_Tip_CommSuccess UC_tip = new UC_Tip_CommSuccess(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.BookConfirmWarn: { UC_Tip_BookConfirmWarn UC_tip = new UC_Tip_BookConfirmWarn(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.SetShortWarning: { UC_Tip_SetShortWarning UC_tip = new UC_Tip_SetShortWarning(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.SelectSeatConfinmed: { UC_Tip_SelectSeatConfinmed UC_tip = new UC_Tip_SelectSeatConfinmed(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.WaitSeatCancelWarn: { UC_Tip_WaitSeatCancelWarn UC_tip = new UC_Tip_WaitSeatCancelWarn(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.WaitSeatCancel: { UC_Tip_WaitSeatCancel UC_tip = new UC_Tip_WaitSeatCancel(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240;; UC_Cancas.Children.Add(UC_tip); } break; case TipType.SelectBookingSeatWarn: { UC_Tip_SelectBookingSeatWarn UC_tip = new UC_Tip_SelectBookingSeatWarn(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.PrintConfIrm: { UC_Tip_PrintConfirm UC_tip = new UC_Tip_PrintConfirm(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; case TipType.ContinueWithBookLog: { UC_Tip_ContinueWithBookLog UC_tip = new UC_Tip_ContinueWithBookLog(ViewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; UC_Cancas.Children.Add(UC_tip); } break; default: break; } }
/// <summary> /// 显示控件 /// </summary> private void ShowUC_Type() { switch (viewModel.MessageType) { case SeatManage.EnumType.TipType.ContinuedTime: { if (string.IsNullOrEmpty(viewModel.Tip_ViewModel.StartTime)) { UC_Tip_ContinueTimeNoAgain UC_tip = new UC_Tip_ContinueTimeNoAgain(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } else { UC_Tip_ContinueTime UC_tip = new UC_Tip_ContinueTime(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } } break; case SeatManage.EnumType.TipType.AutoContinuedTime: { if (string.IsNullOrEmpty(viewModel.Tip_ViewModel.StartTime)) { UC_Tip_ContinueTimeAutoNoAgain UC_tip = new UC_Tip_ContinueTimeAutoNoAgain(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } else { UC_Tip_ContinueTimeAuto UC_tip = new UC_Tip_ContinueTimeAuto(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } } break; case SeatManage.EnumType.TipType.WaitSeatWithSeat: case SeatManage.EnumType.TipType.AutoContinuedTimeNoCount: case SeatManage.EnumType.TipType.ContinuedTimeNoCount: case SeatManage.EnumType.TipType.BeapeatRoomNotExists: case SeatManage.EnumType.TipType.BespeatSeatConfirmFild: case SeatManage.EnumType.TipType.Exception: case SeatManage.EnumType.TipType.ReadingRoomFull: case SeatManage.EnumType.TipType.SeatUsing: case SeatManage.EnumType.TipType.SeatLocking: case SeatManage.EnumType.TipType.SeatStopping: case SeatManage.EnumType.TipType.SeatNotExists: case SeatManage.EnumType.TipType.SelectSeatFrequent: case SeatManage.EnumType.TipType.ShortLeaveSeatOverTime: case SeatManage.EnumType.TipType.SelectSeatResult: case SeatManage.EnumType.TipType.BookConfirmWarn: case SeatManage.EnumType.TipType.WaitSeatCancelWarn: case SeatManage.EnumType.TipType.WaitSeatFrequent: { UC_Tip_CommFailed UC_tip = new UC_Tip_CommFailed(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.ContinuedTimeNotTime: { UC_Tip_ContinueTimeNoTime UC_tip = new UC_Tip_ContinueTimeNoTime(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.ContinuedTimeWithout: { UC_Tip_ContinueTimeNoNeed UC_tip = new UC_Tip_ContinueTimeNoNeed(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.BespeatSeatConfirmSuccess: { UC_Tip_SelectSeatResult UC_tip = new UC_Tip_SelectSeatResult(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.ComeToBack: { UC_Tip_ComeBack UC_tip = new UC_Tip_ComeBack(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.Leave: { UC_Tip_Leave UC_tip = new UC_Tip_Leave(); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.ShortLeave: { UC_Tip_ShortLeave UC_tip = new UC_Tip_ShortLeave(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.BookCancelSuccess: { UC_Tip_CommSuccess UC_tip = new UC_Tip_CommSuccess(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.SelectSeatConfinmed: { UC_Tip_SelectSeatConfinmed UC_tip = new UC_Tip_SelectSeatConfinmed(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; case SeatManage.EnumType.TipType.WaitSeatCancel: { UC_Tip_WaitSeatCancel UC_tip = new UC_Tip_WaitSeatCancel(viewModel.Tip_ViewModel); UC_tip.Width = 740; UC_tip.Height = 240; //Canvas.SetLeft(UC_tip, 30); //Canvas.SetTop(UC_tip, 100); UC_Cancas.Children.Add(UC_tip); } break; default: break; } viewModel.CountDown.Start(); }