Exemple #1
0
        private void LoadGameBtn_Click(object sender, RoutedEventArgs e)//An event handler if the load game button is clicked, displays the loadGame dialog window in which the user selects the save file to load. Also closes the RootWindow
        {
            LoadGameDialog loadDialog = new LoadGameDialog();

            loadDialog.ShowDialog();
            string SaveChosen = "";

            SaveChosen = loadDialog.PathChosen;


            int        GameMode = LoadGame(SaveChosen);
            MainWindow instance = new MainWindow(GameMode);

            instance.Show();
            this.Close();
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LoadGameWindow = ((Project_ChessWithInterface.LoadGameDialog)(target));

            #line 8 "..\..\LoadGameDialog.xaml"
                this.LoadGameWindow.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

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

            case 3:
                this.LoadSaveFile_btn = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }