private void Join_Button_Click(object sender, RoutedEventArgs e)
 {
     if (this.vm.VmGamesList != null && this.vm.VmGamesList.Count != 0)
     {
         this.vm.JoinGame();
         while (this.vm.NotReady)
         {
         }
         MultiPlayerWindow mulWin = new MultiPlayerWindow(this.model);
         mulWin.Show();
         this.surpriseClose = false;
         this.Close();
     }
 }
 private void Start_Button_Click(object sender, RoutedEventArgs e)
 {
     if (this.MenuUserControl.TxtMazeName.Text.Equals(string.Empty) ||
         this.MenuUserControl.TxtRows.Text.Equals(string.Empty) ||
         this.MenuUserControl.TxtCols.Text.Equals(string.Empty))
     {
         CheckArgsWindow win = new CheckArgsWindow();
         win.Show();
     }
     else
     {
         WaitWindow win = new WaitWindow();
         win.Show();
         this.surpriseClose = false;
         this.Close();
         this.vm.StartGame();
         while (this.vm.NotReady)
         {
         }
         MultiPlayerWindow mulWin = new MultiPlayerWindow(this.model);
         mulWin.Show();
         win.Close();
     }
 }