Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.systemControls = ((SpaceshipSystemControls.UserControls.SystemControl)(target));

            #line 8 "..\..\..\UserControls\SystemControl.xaml"
                this.systemControls.Loaded += new System.Windows.RoutedEventHandler(this.systemControls_Loaded);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #2
0
        public void commandBox_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                var window = Window.GetWindow(this);

                if (commandBox.Text == "end")
                {
                    window.Close();
                }
                if (commandBox.Text == "start")
                {
                    commandBox.Clear();
                    SystemControl controls = new SystemControl();
                    controls.game = this;
                    (Application.Current.MainWindow.FindName("gameContent") as ContentControl).Content = controls;
                }
            }
        }