Exemple #1
0
        private void OnPaint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            g.FillRectangle(new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0, 1024, 960);
            g.DrawString("STAGE " + (FormsManager.Game.Field.Stage + 1).ToString(), MyFont.GetFont(18), Brushes.Black, 400, 450);
        }
Exemple #2
0
        protected override void OnPaint(object sender, PaintEventArgs e)
        {
            base.OnPaint(sender, e);
            var g = e.Graphics;

            g.DrawString(Text, MyFont.GetFont(19), Brushes.White, Point);
        }
Exemple #3
0
        protected override void OnPaint(object sender, PaintEventArgs e)
        {
            base.OnPaint(sender, e);
            var g = e.Graphics;

            g.DrawString(Text, MyFont.GetFont(19), Brushes.White, Point);
            string str = (_enabled) ? "YES" : "NO";

            g.DrawString(str, MyFont.GetFont(19), Brushes.Gray, Point.X + 450, Point.Y);
        }
Exemple #4
0
 protected override void OnPaint(object sender, PaintEventArgs e)
 {
     if (_pointsTimer.Enabled)
     {
         e.Graphics.DrawString(Points.ToString(), MyFont.GetFont(12), Brushes.White, Rect.X, Rect.Y + 20);
     }
     else
     {
         base.OnPaint(sender, e);
     }
 }
Exemple #5
0
        private void OnPaint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            g.FillRectangle(Brushes.Black, GUIForm.DisplayRectangle);
            g.DrawImageUnscaled(Properties.Resources.Main_Title, 144, 90);
            g.DrawString("MADE BY ISAEV EVGENY 8I52 2017", MyFont.GetFont(12), Brushes.Gray, 20, 920);
            Properties.Settings s = Properties.Settings.Default;
            g.DrawString(s.P1Name.Substring(0, 2) + "-" + FormsManager.Game.Field.PlayersManager.P1Tank.Points, MyFont.GetFont(19), Brushes.White, 20, 30);
            g.DrawString("HR-" + FormsManager.Records.GetHighestRecord(), MyFont.GetFont(19), Brushes.White, 350, 30);
            g.DrawString(s.P2Name.Substring(0, 2) + "-" + FormsManager.Game.Field.PlayersManager.P2Tank.Points, MyFont.GetFont(19), Brushes.White, 700, 30);
        }
Exemple #6
0
        protected override void OnPaint(object sender, PaintEventArgs e)
        {
            base.OnPaint(sender, e);
            var g = e.Graphics;

            g.DrawImageUnscaled(Properties.Resources.Player_Icon, 910, 626);
            string name = "";

            name += Properties.Settings.Default.P1Name[0];
            name += Properties.Settings.Default.P1Name[1];
            g.DrawString(name, MyFont.GetFont(22), Brushes.Black, 910, 585);
            g.DrawString(Lives.ToString(), MyFont.GetFont(22), Brushes.Black, 940, 626);
        }
Exemple #7
0
        private void OnPaint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            //Рисование флажка
            if (new Rectangle(910, 420, 64, 60).IntersectsWith(e.ClipRectangle))
            {
                g.DrawImageUnscaled(Properties.Resources.Flag, 910, 420);
            }

            //Рисование номера уровня
            if (new Rectangle(930, 485, 50, 200).IntersectsWith(e.ClipRectangle))
            {
                g.DrawString(Stage.ToString(), MyFont.GetFont(22), Brushes.Black, 930, 485);
            }
        }
Exemple #8
0
 private void OnPaint(object sender, PaintEventArgs e)
 {
     if (Rect.IntersectsWith(e.ClipRectangle))
     {
         var g = e.Graphics;
         if (_bonusTimer.Enabled && _flickFlag)
         {
             var rm       = Properties.Resources.ResourceManager;
             var filename = "Bonus_" + GetType().Name;
             var bmp      = (Bitmap)rm.GetObject(filename);
             g.DrawImageUnscaled(bmp, Rect);
         }
         else if (_pointsTimer.Enabled)
         {
             g.DrawString("500", MyFont.GetFont(12), Brushes.White, Rect.X, Rect.Y + 20);
         }
     }
 }
        private void OnPaint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            g.FillRectangle(new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0, 1024, 960);
            g.FillRectangle(Brushes.Black, 64, 64, 832, 832);
            g.DrawString("ESC-MAIN MENU", MyFont.GetFont(14), Brushes.Black, 5, 10);
            g.DrawString("LMB-PLACE    WHEEL⬆⬇-CHOOSE    RMB-REMOVE", MyFont.GetFont(14), Brushes.Black, 5, 930);

            for (int i = 0; i < BLOCKS_COUNT; i++)
            {
                for (int j = 0; j < BLOCKS_COUNT; j++)
                {
                    if (_blocks[i, j] != 0)
                    {
                        g.DrawImageUnscaled(GetBlockImage(_blocks[i, j]), j * BLOCK_SZ + BLOCK_SZ, i * BLOCK_SZ + BLOCK_SZ);
                    }
                }
            }

            g.DrawImageUnscaled(GetBlockImage(_activeBlock), _jPos * BLOCK_SZ + BLOCK_SZ, _iPos * BLOCK_SZ + BLOCK_SZ);
        }
Exemple #10
0
        private void OnPaint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            g.FillRectangle(Brushes.Black, new Rectangle(new Point(), GUIForm.Size));
            g.DrawImageUnscaled(Properties.Resources.Records, 80, 30);
            g.DrawString("POS", MyFont.GetFont(19), Brushes.Gray, 170, 190);
            g.DrawString("NAME", MyFont.GetFont(19), Brushes.Gray, 350, 190);
            g.DrawString("POINTS", MyFont.GetFont(19), Brushes.Gray, 650, 190);

            int y = 250;
            int i = 1;

            foreach (RecordNode record in _records)
            {
                g.DrawString(i.ToString() + '.', MyFont.GetFont(19), Brushes.White, 170, y);
                g.DrawString(record.name, MyFont.GetFont(19), Brushes.White, 350, y);
                g.DrawString(record.points.ToString(), MyFont.GetFont(19), Brushes.White, 650, y);
                y += 50;
                i++;
            }
        }