SelectSpecial() публичный Метод

public SelectSpecial ( Id specialId ) : void
specialId Id
Результат void
Пример #1
0
        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;
        }
Пример #2
0
        void CreateImageSpecial(RectangleF boundingRect)
        {
            undoMgr.BeginCommand(1851, CommandNameText.AddObject);
            Id <Special> specialId = createSpecial(boundingRect);

            undoMgr.EndCommand(1851);

            selectionMgr.SelectSpecial(specialId);

            controller.DefaultCommandMode();
        }
Пример #3
0
        void CreateTextSpecial(RectangleF boundingRect)
        {
            undoMgr.BeginCommand(1551, CommandNameText.AddObject);

            Id <Special> specialId = ChangeEvent.AddTextSpecial(eventDB, boundingRect, text, currentObj.fontName, (currentObj.fontStyle & FontStyle.Bold) != 0, (currentObj.fontStyle & FontStyle.Italic) != 0, currentObj.fontColor, currentObj.fontDigitHeight);

            undoMgr.EndCommand(1551);

            selectionMgr.SelectSpecial(specialId);

            controller.DefaultCommandMode();
        }
Пример #4
0
        // Create the object with the number of fixed points there are, if there are enough. Returns true if object was created, false
        // if no enough points.
        bool CreateObject()
        {
            // Line objects need at least 2 points, area objects need at least 3.
            if (numberFixedPoints < 2 || (isArea && numberFixedPoints < 3))
            {
                return(false);
            }

            undoMgr.BeginCommand(1327, CommandNameText.AddObject);

            // Create the special
            Id <Special> specialId = createObject(points.GetRange(0, numberFixedPoints).ToArray());

            // select the new special.
            selectionMgr.SelectSpecial(specialId);
            undoMgr.EndCommand(1327);
            return(true);
        }
Пример #5
0
        public override void LeftButtonClick(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
        {
            if (pane != Pane.Map)
            {
                return;
            }

            // Create the new special!

            PointF highlightLocation = new PointF(location.X + PIXELOFFSETX * pixelSize, location.Y + PIXELOFFSETY * pixelSize);

            undoMgr.BeginCommand(1322, CommandNameText.AddObject);

            // Creat the special
            Id <Special> specialId = ChangeEvent.AddPointSpecial(eventDB, specialKind, highlightLocation, 0);

            // select the new special.
            selectionMgr.SelectSpecial(specialId);
            undoMgr.EndCommand(1322);

            controller.DefaultCommandMode();
        }