/// <summary>
 /// 座位选择
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UsuallySeat_Canvas_PreviewMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (e.Source is MyUserControl.UC_UsuallySeat)
     {
         MyUserControl.UC_UsuallySeat Seat = e.Source as MyUserControl.UC_UsuallySeat;
         if (viewModel.SelectSeat(Seat.viewModel))
         {
             viewModel.OperateResule = SeatManage.EnumType.HandleResult.Successed;
             this.Close();
         }
         else
         {
             viewModel.AddOften();
             SeatBinding();
         }
     }
 }
 /// <summary>
 /// 绑定座位控件
 /// </summary>
 private void SeatBinding()
 {
     for (int i = 0; i < UsuallySeat_Canvas.Children.Count; i++)
     {
         if (UsuallySeat_Canvas.Children[i] is MyUserControl.UC_UsuallySeat)
         {
             UsuallySeat_Canvas.Children.RemoveAt(i);
             i--;
         }
     }
     for (int i = 0; i < viewModel.OftenUsedSeats.Count; i++)
     {
         if (i > 12)
         {
             break;
         }
         MyUserControl.UC_UsuallySeat UC = new MyUserControl.UC_UsuallySeat(viewModel.OftenUsedSeats[i]);
         UC.Height = 60;
         UC.Width  = 230;
         Canvas.SetLeft(UC, i % 3 * 250 + 40);
         Canvas.SetTop(UC, i / 3 * 90 + 100);
         UsuallySeat_Canvas.Children.Add(UC);
     }
 }