Exemple #1
0
        /// <summary>
        /// Clone this instance
        /// </summary>
        public override DrawObject Clone()
        {
            DrawEllipse drawEllipse = new DrawEllipse(Parentpagelist);

            drawEllipse.rectangle = rectangle;

            FillDrawObjectFields(drawEllipse);
            return(drawEllipse);
        }
Exemple #2
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
            //if (drawArea.CurrentPen == null)
            //    AddNewObject(drawArea, new DrawEllipse(p.X, p.Y, 1, 1, drawArea.LineColor, drawArea.FillColor, drawArea.DrawFilled, drawArea.LineWidth));
            //else

            DrawEllipse o;

            AddNewObject(drawArea, (o = new DrawEllipse(drawArea.Pages, p.X, p.Y, 1, 1, drawArea.PenType, drawArea.FillColor, drawArea.DrawFilled)));

            o.Dirty = true;
            drawArea.Pages.Dirty = true;
            o.oIndex             = drawArea.Pages.GetNewobjectoIndex();
            DCS.Forms.MainForm.Instance().m_propertyGrid.SelectedObject = o;
            DCS.Forms.MainForm.Instance().m_propertyGrid.Refresh();
        }