예제 #1
0
        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            vm.Start();
            Window singleMaze = new SingleMaze(vm);

            singleMaze.Show();
            this.Hide();
        }
예제 #2
0
 /// <summary>
 /// Handles the Click event of the btnStart 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 btnStart_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         vm.Start();
         Window singleMaze = new SingleMaze(vm);
         singleMaze.Show();
         this.Hide();
     } catch (Exception)
     {
         MessageBox.Show("Connection error");
         this.Close();
         MainWindow win = (MainWindow)Application.Current.MainWindow;
         win.Show();
     }
 }