Beispiel #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ParametersWindow = ((Project_ChessWithInterface.StartGameParameters)(target));
                return;

            case 2:
                this.OpponentSelection_list = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.submit_btn = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.GameModeSelection_list = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #2
0
        private void NewGameBtn_Click(object sender, RoutedEventArgs e)//An event handler which is called if the new game button is clicked, displays the second menu that has new game parameters which then need to be filled by user. Also closes the RootWindow
        {
            StartGameParameters startGame = new StartGameParameters();

            startGame.Show();
            this.Close();
        }