Exemplo n.º 1
0
        /// <summary>
        /// 自定义绘制数据
        /// </summary>
        /// <param name="e">事件参数</param>
        public override void PaintValue(PaintValueEventArgs e)
        {
            XPenStyle style = e.Value as XPenStyle;

            System.Drawing.Color c = System.Drawing.Color.Black;
            if (style != null)
            {
                c = style.Color;
            }
            using (System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(c))
            {
                e.Graphics.FillRectangle(b, e.Bounds);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 复制对象
        /// </summary>
        /// <returns>复制品</returns>
        object System.ICloneable.Clone()
        {
            XPenStyle style = (XPenStyle)this.MemberwiseClone();

            return(style);
        }