示例#1
0
        static State UpdateStickyNoteTextSize(State previousState, UpdateStickyNoteTextSizeAction action)
        {
            VSGraphModel graphModel = (VSGraphModel)previousState.CurrentGraphModel;

            foreach (var stickyNoteModel in action.StickyNoteModels)
            {
                ((StickyNoteModel)stickyNoteModel).UpdateTextSize(action.TextSize);
                graphModel.LastChanges.ChangedElements.Add(stickyNoteModel);
            }

            previousState.MarkForUpdate(UpdateFlags.GraphTopology);
            return(previousState);
        }
示例#2
0
        static State UpdateStickyNoteTextSize(State previousState, UpdateStickyNoteTextSizeAction action)
        {
            VSGraphModel graphModel = (VSGraphModel)previousState.CurrentGraphModel;

            Undo.RecordObject(graphModel, "Update Text Size");
            foreach (var stickyNoteModel in action.StickyNoteModels.OfType <StickyNoteModel>())
            {
                stickyNoteModel.UpdateTextSize(action.TextSize);
                graphModel.LastChanges.ChangedElements.Add(stickyNoteModel);
            }

            previousState.MarkForUpdate(UpdateFlags.GraphTopology);
            return(previousState);
        }