/// <summary>
 /// Closings the menu.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="CancelEventArgs"/> instance containing the event data.</param>
 public void ClosingMenu(object sender, CancelEventArgs e)
 {
     if (waitWindow != null)
     {
         waitWindow.Close();
     }
     if (!GameBegin)
     {
         // if start pressed, close the game
         if (ifStartPressed)
         {
             viewModel.CloseSpecificGame(name_text.Text);
         }
         viewModel.InitializeGame();
     }
 }
 /// <summary>
 /// Called when [closing].
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="CancelEventArgs"/> instance containing the event data.</param>
 private void OnClosing(object sender, CancelEventArgs e)
 {
     viewModel.Send("close " + viewModel.VM_GameName);
     viewModel.InitializeGame();
 }
 /// <summary>
 /// Handles the Click event of the Main_Menu control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void Main_Menu_Click(object sender, RoutedEventArgs e)
 {
     viewModel.InitializeGame();
     this.Close();
 }