MainWindow
Inheritance: System.Windows.Window, System.Windows.Markup.IComponentConnector
Esempio n. 1
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];
 }
Esempio n. 2
0
 public static void Main(string[] args)
 {
     Application.Init ();
     MainWindow win = new MainWindow ();
     win.Show ();
     Application.Run ();
 }
Esempio n. 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.root = ((UI.MainWindow)(target));
                return;

            case 2:

            #line 22 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.DragWindow);

            #line default
            #line hidden
                return;

            case 3:

            #line 25 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.WindowMinimize);

            #line default
            #line hidden
                return;

            case 4:

            #line 32 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.WindowResize);

            #line default
            #line hidden
                return;

            case 5:
                this.WindowSize = ((MaterialDesignThemes.Wpf.PackIcon)(target));
                return;

            case 6:

            #line 39 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.WindowClose);

            #line default
            #line hidden
                return;

            case 7:
                this.Menu = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.GISButton = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 4
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();
 }
Esempio n. 5
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();
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.windowMain = ((UI.MainWindow)(target));
         return;
     }
     this._contentLoaded = true;
 }
Esempio n. 7
0
        public static void Run(ToolkitType type)
        {
            Application.Initialize(type);

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

            Application.Run();

            w.Dispose();

            Application.Dispose();
        }
Esempio n. 8
0
 public static void Main()
 {
     var mainWindow = new MainWindow();
     new Application().Run(mainWindow);
 }
Esempio n. 9
0
        public ManageChefsUserControl(MainWindow mainWindow)
        {
            InitializeComponent();

            this.mainWindow = mainWindow;
        }