Пример #1
0
        private void InitializeControls()
        {
            var xPosition = GetLabelPosition();

            gameLabel = new GameLogoControl
            {
                Position = new Point(xPosition, 4)
            };
            Add(gameLabel);

            startGameButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 9),
                Text     = "Start Game"
            };
            startGameButton.Click += (sender, args) => StartGame?.Invoke(this, EventArgs.Empty);
            Add(startGameButton);

            continueGameButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 13),
                Text     = "C0nt1nue Game"
            };
            continueGameButton.Click += (sender, args) => ContinueGame?.Invoke(this, EventArgs.Empty);
            Add(continueGameButton);

            spellsLibraryButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 17),
                Text     = "Spells L1brary"
            };
            spellsLibraryButton.Click += (sender, args) => ShowSpellLibrary?.Invoke(this, EventArgs.Empty);
            Add(spellsLibraryButton);

            settingsButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 21),
                Text     = "Sett1ngs"
            };
            settingsButton.Click += (sender, args) => ShowSettings?.Invoke(this, EventArgs.Empty);
            Add(settingsButton);

            exitButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 25),
                Text     = "Ex1t"
            };
            exitButton.Click += (sender, args) => Exit?.Invoke(this, EventArgs.Empty);
            Add(exitButton);
        }
Пример #2
0
        private void InitializeControls()
        {
            var xPosition = GetLabelPosition();

            gameLabel = new GameLogoControl
            {
                Position = new Point(xPosition, 4)
            };
            Add(gameLabel);

            continueGameButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 9),
                Text     = "C0nt1nue Game"
            };
            continueGameButton.Click += (sender, args) => ContinueGame?.Invoke(this, EventArgs.Empty);
            Add(continueGameButton);

            startGameButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 13),
                Text     = "Start New Game"
            };
            startGameButton.Click += (sender, args) => StartNewGame?.Invoke(this, EventArgs.Empty);
            Add(startGameButton);

            exitToMenuButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 17),
                Text     = "Ex1t t0 Menu"
            };
            exitToMenuButton.Click += (sender, args) => ExitToMenu?.Invoke(this, EventArgs.Empty);
            Add(exitToMenuButton);

            exitButton = new StandardButton(20)
            {
                Position = new Point(xPosition - 2, 21),
                Text     = "Ex1t"
            };
            exitButton.Click += (sender, args) => Exit?.Invoke(this, EventArgs.Empty);
            Add(exitButton);
        }