PurplePen.SelectionMgr.SelectSpecial C# (CSharp) Method

SelectSpecial() public method

public SelectSpecial ( Id specialId ) : void
specialId Id
return void
        public void SelectSpecial(Id<Special> specialId)
        {
            eventDB.CheckSpecialId(specialId);
            SetSelection(SelectionKind.Special, Id<CourseControl>.None, Id<CourseControl>.None, Id<ControlPoint>.None, specialId, null, DescriptionLine.TextLineKind.None);
        }

Usage Example

        public override void LeftButtonEndDrag(Pane pane, PointF location, PointF locationStart, float pixelSize, ref bool displayUpdateNeeded)
        {
            Debug.Assert(pane == Pane.Map);

            DragTo(location);

            PointF upperLeft  = new PointF(currentObj.rect.Left, currentObj.rect.Bottom);
            float  cellSize   = currentObj.CellSize;
            int    numColumns = currentObj.NumberOfColumns;

            // Create the new description, unless it's ridiculously small.
            if (cellSize > 0.5F)
            {
                CourseDesignator[] courses = null;
                courses = new CourseDesignator[] { courseDesignator.WithAllVariations() };

                undoMgr.BeginCommand(1522, CommandNameText.AddObject);
                Id <Special> specialId = ChangeEvent.AddDescription(eventDB, false, courses, upperLeft, cellSize, numColumns);
                undoMgr.EndCommand(1522);

                selectionMgr.SelectSpecial(specialId);
            }


            controller.DefaultCommandMode();
            displayUpdateNeeded = true;
        }
All Usage Examples Of PurplePen.SelectionMgr::SelectSpecial