示例#1
0
        public MainWindow()
        {
            InitializeComponent();
            vm = new StrategyGameViewModel();

            mainMenu = new MainMenuUserControl();
            mainMenu.MainMenuButtonClickedEvent += new MainMenuUserControl.ButtonClickEventHandler(selectFromMainMenu);

            gameStartOptions = new GameStartOptionsUserControl(vm);
            gameStartOptions.GameStartOptionsButtonClickedEvent += new GameStartOptionsUserControl.ButtonClickEventHandler(selectGameStartOption);

            ladder = new LadderUserControl(vm);
            ladder.BackToMainMenuButtonClickedEvent += new EventHandler(backToMainMenu);

            game = new GameUserControl(vm);
            game.BackToMainMenuButtonClickedEvent += new EventHandler(backToMainMenu);

            mainControlArea.Content = mainMenu;
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();
            vm = new StrategyGameViewModel();

            mainMenu= new MainMenuUserControl();
            mainMenu.MainMenuButtonClickedEvent += new MainMenuUserControl.ButtonClickEventHandler(selectFromMainMenu);

            gameStartOptions = new GameStartOptionsUserControl(vm);
            gameStartOptions.GameStartOptionsButtonClickedEvent += new GameStartOptionsUserControl.ButtonClickEventHandler(selectGameStartOption);

            ladder = new LadderUserControl(vm);
            ladder.BackToMainMenuButtonClickedEvent += new EventHandler(backToMainMenu);

            game = new GameUserControl(vm);
            game.BackToMainMenuButtonClickedEvent += new EventHandler(backToMainMenu);

            mainControlArea.Content = mainMenu;
        }