Ejemplo n.º 1
0
        public void Draw(Graphics g, ScreenConverter sc)
        {
            Point p = sc.R2S(Position);

            g.DrawImage(Properties.Resources._operator, p);
            g.DrawString(Quadrocopter.Number.ToString(), new Font(FontFamily.GenericMonospace, 10), Brushes.Black, p.X + 20, p.Y + 25);
        }
Ejemplo n.º 2
0
        public void Draw(Graphics g, ScreenConverter sc)
        {
            Point p = sc.R2S(Position);

            g.DrawImage(Properties.Resources.copter, p);
            Color c = Color.Black;

            if (Lights)
            {
                switch (State)
                {
                case State.Waiting:
                {
                    c = Color.Blue;
                }
                break;

                case State.OK:
                {
                    c = Color.FromArgb(0, 255, 0);
                }
                break;

                case State.Crashed:
                {
                    c = Color.Red;
                }
                break;

                default:
                {
                    c = Color.Pink;
                }
                break;
                }
            }
            g.FillEllipse(new SolidBrush(c), p.X + 44, p.Y + 25, 10, 10);
            g.DrawString(Number.ToString(), new Font(FontFamily.GenericMonospace, 10), Brushes.Black, p.X + 44, p.Y + 10);
        }