Ejemplo n.º 1
0
        /* Constructor */
        internal Mines()
        {
            InitializeComponent();

            gEngine        = new GraphicsEngine(surfaceControl1);
            unForm         = new UserName();
            smileyButton   = new Bitmap(Properties.Resources.SmileyButton);
            suprisedButton = new Bitmap(Properties.Resources.SuprisedButton);
            coolButton     = new Bitmap(Properties.Resources.CoolButton);
            deadButton     = new Bitmap(Properties.Resources.DeadButton);
            clickingButton = new Bitmap(Properties.Resources.ClickingButton);
            hs             = new HighScores();

            MineLabel.Font = new Font("Arial", 20F, FontStyle.Regular,
                                      GraphicsUnit.Point, ((byte)(0)));
            MineLabel.ForeColor = Color.Red;
            MineLabel.Text      = "000";

            CounterLabel.Font = new Font("Arial", 20F, FontStyle.Regular,
                                         GraphicsUnit.Point, ((byte)(0)));
            CounterLabel.ForeColor = Color.Red;
            CounterLabel.Text      = "000";

            LoadImagesForBorders();

            this.CenterToScreen();
        }
Ejemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (gEngine != null)
                {
                    gEngine.Dispose();
                    gEngine = null;
                }
                if (coolButton != null)
                {
                    coolButton.Dispose();
                    coolButton = null;
                }
                if (smileyButton != null)
                {
                    smileyButton.Dispose();
                    smileyButton = null;
                }
                if (suprisedButton != null)
                {
                    suprisedButton.Dispose();
                    suprisedButton = null;
                }
                if (deadButton != null)
                {
                    deadButton.Dispose();
                    deadButton = null;
                }

                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
        }