public MainForm() { GDIBuffer.Instance(ClientRectangle.Width, ClientRectangle.Height); BT = new BoxTable(this); new System.Threading.Timer(new TimerCallback(random), null, 1000, Timeout.Infinite); }
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); } }
private void FrameRender() { System.Drawing.Graphics g = CreateGraphics(); g.DrawImage(GDIBuffer.Instance().GetImages, new System.Drawing.Point(0, 0)); g.Dispose(); }
private void FrameUpdate() { GDIBuffer.Instance().getGraphics.Clear(System.Drawing.Color.Black); BT.Render(); }