Example #1
0
        public override void Initialize()
        {
            base.Initialize();

            if (presenter.selections.Count > 0)
            {
                foreach (Selection sel in presenter.selections)
                {
                    Entity entity = database.GetObject(sel.objectId) as Entity;
                    if (entity != null)
                    {
                        _entities.Add(entity);
                    }
                }
            }

            if (_entities.Count > 0)
            {
                this.Pointer.mode = PointerModes.Locate;
                _step             = Step.Step2_SpecifyMirrorLinePoint1st;
            }
            else
            {
                presenter.selections.Clear();
                _step             = Step.Step1_SelectObject;
                this.Pointer.mode = PointerModes.Select;
            }

            _mirrorLine = presenter.CreateTempVisual();
        }
        public override void Initialize()
        {
            base.Initialize();

            presenter.AppendEntity(_entityCopy, DBObjectState.Unconfirmed);
            tmpLine = presenter.CreateTempVisual();
            this.Pointer.isShowAnchor = true;
            this.Pointer.mode         = PointerModes.Locate;
        }
Example #3
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            gd.DrawArc(_center, _radius, _startAngle, _endAngle);
            gd.Close();
        }
Example #4
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            gd.DrawCircle(_center, _radius);
            gd.Close();
        }
Example #5
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            gd.DrawEllipse(_center, RadiusX, RadiusY);
            gd.Close();
        }
Example #6
0
        public void ClearVisualGrips(IDrawingVisual associatedVisual)
        {
            var toRemove = m_grips.Where(e => e.AssociatedVisual == associatedVisual).ToList();

            foreach (CADGripVisual g in toRemove)
            {
                RemoveVisualChild(g);
                RemoveLogicalChild(g);
                m_grips.Remove(g);
            }
        }
Example #7
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            gd.DrawLine(_startPoint, _endPoint);
            gd.Close();
        }
Example #8
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            gd.DrawXLine(_basePoint, _direction);
            gd.Close();
        }
Example #9
0
 public void RemoveVisual(IDrawingVisual dv)
 {
     RemoveVisualChild((Visual)dv);
     RemoveLogicalChild((Visual)dv);
     if (dv is ICADEnitiyVisual)
     {
         Geometries.Remove((ICADEnitiyVisual)dv);
     }
     else
     {
         _tempVisuals.Remove(dv);
     }
 }
Example #10
0
        public void AddVisual(IDrawingVisual dv)
        {
            if (dv is ICADEnitiyVisual)
            {
                Geometries.Add((ICADEnitiyVisual)dv);
            }
            else
            {
                _tempVisuals.Add(dv);
            }

            AddVisualChild((Visual)dv);
            AddLogicalChild((Visual)dv);
        }
Example #11
0
        public override void Draw(IDrawingVisual gd)
        {
            if (gd == null)
            {
                return;
            }

            gd.Open();
            int numOfVertices = NumberOfVertices;

            for (int i = 0; i < numOfVertices - 1; ++i)
            {
                gd.DrawLine(GetPointAt(i), GetPointAt(i + 1));
            }

            if (closed &&
                numOfVertices > 2)
            {
                gd.DrawLine(GetPointAt(numOfVertices - 1), GetPointAt(0));
            }
            gd.Close();
        }
Example #12
0
 public virtual void Draw(IDrawingVisual gd)
 {
 }
Example #13
0
 public CADGripVisual(IDrawing drawing, GripPoint gripPoint, IDrawingVisual associatedVisual) : base(drawing)
 {
     _gripPoint       = gripPoint;
     AssociatedVisual = associatedVisual;
 }