Example #1
0
        public override void Initialize()
        {
            pMines = new Elements.Panel(0, 0, 160, 20);
            controls.Add(pMines);

            mines = new Elements.Label(5, 20, "");
            controls.Add(mines);

            pTime = new Elements.Panel(0, 0, 120, 20);
            controls.Add(pTime);

            time = new Elements.Label(5, 20, "");
            controls.Add(time);

            panel           = new Elements.Panel(0, 0, 200, 100);
            panel.isVisible = false;
            controls.Add(panel);

            state           = new Elements.Label(0, 0, "");
            state.isVisible = false;
            controls.Add(state);

            gameTime           = new Elements.Label(0, 0, "");
            gameTime.isVisible = false;
            controls.Add(gameTime);

            menu                     = new Elements.Button(0, 0, 180, 20, "Menu");
            menu.isVisible           = false;
            menu.OnClick             = this.GetType().GetMethod("menuClick");
            menu.OnClickInvokeObject = this;
            controls.Add(menu);

            MineSweeper.OnLevelLost += new MineSweeper.VoidEventHandler(MineSweeper_OnLevelLost);
            MineSweeper.OnLevelWon  += new MineSweeper.VoidEventHandler(MineSweeper_OnLevelWon);
        }
Example #2
0
        public override void Initialize()
        {
            pMines = new Elements.Panel(0, 0, 160, 20);
            controls.Add(pMines);

            mines = new Elements.Label(5, 20, "");
            controls.Add(mines);

            pTime = new Elements.Panel(0, 0, 120, 20);
            controls.Add(pTime);

            time = new Elements.Label(5, 20, "");
            controls.Add(time);

            panel = new Elements.Panel(0, 0, 200, 100);
            panel.isVisible = false;
            controls.Add(panel);

            state = new Elements.Label(0, 0, "");
            state.isVisible = false;
            controls.Add(state);

            gameTime = new Elements.Label(0, 0, "");
            gameTime.isVisible = false;
            controls.Add(gameTime);

            menu = new Elements.Button(0, 0, 180, 20, "Menu");
            menu.isVisible = false;
            menu.OnClick = this.GetType().GetMethod("menuClick");
            menu.OnClickInvokeObject = this;
            controls.Add(menu);

            MineSweeper.OnLevelLost += new MineSweeper.VoidEventHandler(MineSweeper_OnLevelLost);
            MineSweeper.OnLevelWon += new MineSweeper.VoidEventHandler(MineSweeper_OnLevelWon);
        }