コード例 #1
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="GraphObj"/> object from which to copy</param>
        public GraphObj(GraphObj rhs)
            : base(rhs)
        {
            // Copy value types
            _isVisible            = rhs.IsVisible;
            _isClippedToChartRect = rhs._isClippedToChartRect;
            _zOrder = rhs.ZOrder;

            // copy reference types by cloning
            if (rhs.Tag is ICloneable)
            {
                this.Tag = ((ICloneable)rhs.Tag).Clone();
            }
            else
            {
                this.Tag = rhs.Tag;
            }

            _location = rhs.Location.Clone();
        }
コード例 #2
0
 public FormGraphObjParamEdit(GraphObj usedObj)
     : base(usedObj)
 {
     InitializeComponent();
 }
コード例 #3
0
 /// <summary>
 /// 增加一个图形对象
 /// </summary>
 /// <param name="obj">由<see cref="GraphObj" />派生的图形对象
 /// 包括<see cref="TextObj" />,<see cref="LineObj" />,
 /// <see cref="ArrowObj" />,<see cref="BoxObj" />,<see cref="MarkObj" /></param>
 public void AddGraphObj(GraphObj obj)
 {
     this.GraphObjList.Add(obj);
 }