Exemplo n.º 1
0
        public Pen GetPen()
        {
            PenData data = this.GetPenData();

            if (data == null)
            {
                return(null);
            }
            else
            {
                return(data.GetPen());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Draw a representation of our value
        /// </summary>
        public override void PaintValue(PaintValueEventArgs e)
        {
            PenData p = e.Value as PenData;

            if (p == null)
            {
                base.PaintValue(e);
            }
            else
            {
                e.Graphics.SetClip(e.Bounds);
                e.Graphics.DrawLine(p.GetPen(), e.Bounds.Left, e.Bounds.Top, e.Bounds.Right, e.Bounds.Bottom);
                e.Graphics.ResetClip();
            }
        }