Esempio n. 1
0
 public static BestScores getInstance(PictureBox pictureBoxOnBitmap)
 {
     if (instance == null)
     {
         instance = new BestScores(pictureBoxOnBitmap);
     }
     return(instance);
 }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();

            bestScores = BestScores.getInstance(pbGame);

            game = Game.getInstance(pbGame);

            set = new Settings();
        }
Esempio n. 3
0
        private GameOver(PictureBox mainPictureBox)
        {
            //
            // lGameOver
            //
            lGameOver           = new Label();
            lGameOver.Text      = "Game Over";
            lGameOver.Name      = "lGameOver";
            lGameOver.BackColor = Color.Transparent;
            lGameOver.Size      = new Size(200, 29);
            lGameOver.Location  = new Point(mainPictureBox.Size.Width / 2 - 72, 100);
            lGameOver.Font      = new Font("Showcard Gothic", 18F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            lGameOver.ForeColor = SystemColors.HotTrack;
            //
            // tbName
            //
            tbName           = new TextBox();
            tbName.Location  = new Point(289, 159);
            tbName.Name      = "tbName";
            tbName.Size      = new Size(100, 20);
            tbName.MaxLength = 15;
            //
            // bSubmit
            //
            bSubmit          = new Button();
            bSubmit.Location = new Point(301, 203);
            bSubmit.Name     = "bSubbmit";
            bSubmit.Size     = new Size(75, 23);
            bSubmit.TabIndex = 2;
            bSubmit.Text     = "Submit";
            bSubmit.UseVisualStyleBackColor = true;
            bSubmit.ForeColor = SystemColors.HotTrack;
            bSubmit.Click    += (sender, e) =>
            {
                BestScores.getInstance().updateScore(tbName.Text, Game.getInstance().score.points);
                removeControls();
            };

            this.mainPictureBox = mainPictureBox;
        }