Exemple #1
0
        //--------------------------------------------------------------------------------------------------

        public void Stop()
        {
            if (_PreviewLine != null)
            {
                _PreviewLine.Remove();
                _PreviewLine = null;
            }
            for (int i = 0; i < _HintLines.Length; i++)
            {
                if (_HintLines[i] != null)
                {
                    _HintLines[i].Remove();
                }
                _HintLines[i] = null;
            }
            _Element?.Remove();

            _PointAction.ConstraintPoint -= _PointActionOnConstraintPoint;

            _PointAction.Stop();

            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_LabelHudElement);
            _LabelHudElement = null;
        }
        //--------------------------------------------------------------------------------------------------

        public void Stop()
        {
            if (_HintCircle != null)
            {
                _HintCircle.Remove();
                _HintCircle = null;
            }
            if (_HintLine != null)
            {
                _HintLine.Remove();
                _HintLine = null;
            }
            for (int i = 0; i < _Marker.Length; i++)
            {
                if (_Marker[i] != null)
                {
                    _Marker[i].Remove();
                }
                _Marker[i] = null;
            }

            _Element?.Remove();
            _PointAction?.Stop();

            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_ValueHudElement);
            _ValueHudElement = null;
        }
        //--------------------------------------------------------------------------------------------------

        public void Stop()
        {
            _Element?.Remove();
            _PointAction.Stop();
            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
        }
        //--------------------------------------------------------------------------------------------------

        public override void Stop()
        {
            WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
            WorkspaceController.HudManager?.RemoveElement(_ValueHudElement);
            _ValueHudElement = null;

            _ClearPreviews();
            base.Stop();
        }
Exemple #5
0
        //--------------------------------------------------------------------------------------------------

        public void Stop()
        {
            for (int i = 0; i < _HintLines.Length; i++)
            {
                _HintLines[i]?.Remove();
                _HintLines[i] = null;
            }

            _Element?.Remove();
            _PointAction.Stop();
            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
        }
Exemple #6
0
        //--------------------------------------------------------------------------------------------------

        public void Stop()
        {
            _PointAction.Stop();
            if (_Elements != null)
            {
                foreach (var element in _Elements)
                {
                    element.Remove();
                }
            }

            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_Coord2DHudElement);
            _Coord2DHudElement = null;
            _SketchEditorTool.WorkspaceController.HudManager?.RemoveElement(_LabelHudElement);
            _LabelHudElement = null;
        }
Exemple #7
0
        //--------------------------------------------------------------------------------------------------

        public bool Start(SketchEditorTool sketchEditorTool)
        {
            _SketchEditorTool = sketchEditorTool;

            _PointAction = new SketchPointAction(_SketchEditorTool);
            if (!_SketchEditorTool.WorkspaceController.StartToolAction(_PointAction, false))
            {
                return(false);
            }
            _PointAction.Previewed += _OnActionPreview;
            _PointAction.Finished  += _OnActionFinished;

            _Coord2DHudElement = _SketchEditorTool.WorkspaceController.HudManager?.CreateElement <Coord2DHudElement>(this);

            _SketchEditorTool.StatusText = "Select first corner of the rectangle.";

            return(true);
        }
Exemple #8
0
        //--------------------------------------------------------------------------------------------------

        public override bool Start()
        {
            InteractiveContext.Current.WorkspaceController.Selection.SelectEntity(null, true);

            var pointAction = new PointAction(this);

            if (!WorkspaceController.StartToolAction(pointAction))
            {
                return(false);
            }
            pointAction.Previewed += _PreviewPivot;
            pointAction.Finished  += _FinishPivotPoint;

            _CurrentPhase      = Phase.PivotPoint;
            StatusText         = "Select corner point.";
            _Coord2DHudElement = WorkspaceController.HudManager?.CreateElement <Coord2DHudElement>(this);
            WorkspaceController.HudManager?.SetCursor(Cursors.SetPoint);
            return(true);
        }