public override void Paint(MdiSystemItemRendererEventArgs e) { MDISystemItem mdi = e.MdiSystemItem; Graphics g = e.Graphics; Rectangle r = mdi.DisplayRectangle; if (mdi.IsSystemIcon) { r.Offset((r.Width - 16) / 2, (r.Height - 16) / 2); if (mdi.Icon != null) g.DrawIconUnstretched(mdi.Icon, r); return; } r = new Rectangle(mdi.DisplayRectangle.Location, mdi.GetButtonSize()); if (mdi.Orientation == eOrientation.Horizontal) r.Offset(0, (mdi.DisplayRectangle.Height - r.Height) / 2); else r.Offset((mdi.WidthInternal - r.Width) / 2, 0); this.PaintButton(g, mdi, SystemButton.Minimize, r, GetColorTable(mdi, SystemButton.Minimize), m_ColorTable.LegacyColors); if (mdi.Orientation == eOrientation.Horizontal) r.Offset(r.Width, 0); else r.Offset(0, r.Height); this.PaintButton(g, mdi, SystemButton.Restore, r, GetColorTable(mdi, SystemButton.Restore), m_ColorTable.LegacyColors); if (mdi.Orientation == eOrientation.Horizontal) r.Offset(r.Width + 2, 0); else r.Offset(0, r.Height + 2); this.PaintButton(g, mdi, SystemButton.Close, r, GetColorTable(mdi, SystemButton.Close), m_ColorTable.LegacyColors); }
/// <summary> /// Paints MdiSystemItem. /// </summary> /// <param name="e">Provides arguments for the operation.</param> public virtual void Paint(MdiSystemItemRendererEventArgs e) { }