Esempio n. 1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            try
            {
                if (ParentForm != null)
                {
                    Graphics CurGraphics = e.Graphics;

                    if (memGraphics.g != null && useDoubleBuffer == true)
                    {
                        CurGraphics = memGraphics.g;
                    }

                    CurGraphics.SmoothingMode = smoothing;

                    PaintControl(CurGraphics, this.Width, this.Height, 0, 0, true);

                    if (memGraphics.g != null && useDoubleBuffer == true)
                    {
                        memGraphics.Render(e.Graphics);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.Write("exception : " + ex.Message);
            }

            base.OnPaint(e);
        }