Example #1
0
        public MainForm()
        {
            GDIBuffer.Instance(ClientRectangle.Width, ClientRectangle.Height);

            BT = new BoxTable(this);
            new System.Threading.Timer(new TimerCallback(random), null, 1000, Timeout.Infinite);
        }
Example #2
0
 public static GDIBuffer Instance(int nW, int nH)
 {
     if (oInstance == null)
     {
         oInstance = new GDIBuffer(nW, nH);
     }
     return(oInstance);
 }
Example #3
0
 public static GDIBuffer Instance(int nW, int nH)
 {
     if (oInstance == null)
     {
         oInstance = new GDIBuffer(nW, nH);
     }
     return oInstance;
 }
Example #4
0
        public void Render()
        {
            Pen pen = new Pen(Brushes.Red);

            if (number != 0)
            {
                int   a      = (int)Math.Log10(number);
                float pointX = x + (BoxSize / 2 - (FontSize / 2 + a + FontSize / 2));
                float pointY = y + BoxSize / 2 - FontSize / 2;

                Font font = new Font(new FontFamily("돋움"), FontSize, FontStyle.Bold, GraphicsUnit.Pixel);

                GDIBuffer.Instance().getGraphics.DrawString(number.ToString(), font, new SolidBrush(Color.Red), new PointF(pointX, pointY));
                GDIBuffer.Instance().getGraphics.DrawRectangle(pen, x, y, BoxSize, BoxSize);
            }
        }
Example #5
0
 private void FrameRender()
 {
     System.Drawing.Graphics g = CreateGraphics();
     g.DrawImage(GDIBuffer.Instance().GetImages, new System.Drawing.Point(0, 0));
     g.Dispose();
 }
Example #6
0
 private void FrameUpdate()
 {
     GDIBuffer.Instance().getGraphics.Clear(System.Drawing.Color.Black);
     BT.Render();
 }