public void DrawLeadHeadArrow(Graphics.Rectangle bounds, SolidColor startColor, SolidColor endColor) { using (System.Drawing.Drawing2D.GraphicsPath leadHeadPath = new System.Drawing.Drawing2D.GraphicsPath()) { leadHeadPath.AddLines(new System.Drawing.PointF[] { new Point(bounds.Right - 4, bounds.Y + 4), new Point(bounds.Right - 4, bounds.Bottom - 4), new Point(bounds.Right - bounds.Height + 4, bounds.Bottom - 4) }); leadHeadPath.CloseAllFigures(); using (System.Drawing.Drawing2D.LinearGradientBrush lgb = new System.Drawing.Drawing2D.LinearGradientBrush(bounds, startColor, endColor, 90f)) { base.PlatformGraphics.FillPath(lgb, leadHeadPath); } } }
public void ShowEditControl(Graphics.Rectangle bounds, Cell cell) { var rect = new WFRect((int)Math.Round(bounds.Left), (int)Math.Round(bounds.Top), (int)Math.Round(bounds.Width), (int)Math.Round(bounds.Height)); editTextbox.SuspendLayout(); editTextbox.Bounds = rect; editTextbox.TextWrap = cell.IsMergedCell || cell.InnerStyle.TextWrapMode != TextWrapMode.NoWrap; editTextbox.InitialSize = rect.Size; editTextbox.VAlign = cell.InnerStyle.VAlign; editTextbox.Font = cell.RenderFont; editTextbox.ForeColor = cell.InnerStyle.TextColor; editTextbox.BackColor = cell.InnerStyle.HasStyle(PlainStyleFlag.BackColor) ? cell.InnerStyle.BackColor : this.control.ControlStyle[ControlAppearanceColors.GridBackground]; editTextbox.ResumeLayout(); editTextbox.Visible = true; editTextbox.Focus(); }