Beispiel #1
0
 public static void Main(string[] args)
 {
     Application.Init ();
     MainWindow win = new MainWindow ();
     win.Show ();
     Application.Run ();
 }
Beispiel #2
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     var wnd = new MainWindow();
     wnd.Show();
     if (e.Args.Length == 1)
         wnd.TxtRepositoryPath.Text = e.Args[0];
 }
 /// <summary>
 /// Creates a new Main Window to start a new game.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BackToMainMenuClicked(object sender, RoutedEventArgs e)
 {
     var window = new MainWindow();
     var gameWindow = Application.Current.MainWindow;
     Application.Current.MainWindow = window;
     window.Show();
     gameWindow.Close();
     Window.GetWindow(this).Close();
 }
Beispiel #4
0
 /// <summary>
 /// Close the game's window and creates a new main window to create a new game.
 /// Note: duplicates HomePage.xaml.cs#NewGameClicked, could be moved to a Command.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void NewGameClicked(object sender, RoutedEventArgs e)
 {
     var window = new MainWindow();
     var gameWindow = Application.Current.MainWindow;
     Application.Current.MainWindow = window;
     window.Show();
     gameWindow.Close();
     Close();
 }
Beispiel #5
0
        public static void Run(ToolkitType type)
        {
            Application.Initialize(type);

            MainWindow w = new MainWindow();
            w.Show();

            Application.Run();

            w.Dispose();

            Application.Dispose();
        }