Exemplo n.º 1
0
        private Image DrawNumber(int n)
        {
            GraphicsItem numberForm = new GraphicsItem(Resources.number0, 3, 1, 26, 46);
            int          t;

            if (n >= 0)
            {
                for (int i = 0; i < 3; i++)
                {
                    t = n % 10;
                    numberForm.DrawItem(_arrayNumber[t], 2 - i, 0);
                    n = (int)Math.Floor((double)n / 10);
                }
            }
            else
            {
                numberForm.DrawItem(Resources.sub, 0, 0);
                n = Math.Abs(n);
                for (int i = 0; i < 2; i++)
                {
                    t = n % 10;
                    numberForm.DrawItem(_arrayNumber[t], 2 - i, 0);
                    n = (int)Math.Floor((double)n / 10);
                }
            }
            return(numberForm.Img);
        }
Exemplo n.º 2
0
 private void DrawItem(DrawQueue dq)
 {
     //process change image of item
     _mf.DrawItem(_arrayMineStatus[dq.NImg], dq.X, dq.Y);
 }