예제 #1
0
        public void DeleteMultiDrawingItem(AbstractMultiDrawing manager, Guid itemId)
        {
            ITrackable item = manager.GetItem(itemId) as ITrackable;

            if (item != null)
            {
                DeleteTrackableDrawing(item);
            }

            manager.Remove(itemId);
            UnselectAll();

            if (MultiDrawingItemDeleted != null)
            {
                MultiDrawingItemDeleted(this, EventArgs.Empty);
            }
        }
        public HistoryMementoDeleteMultiDrawingItem(Metadata metadata, AbstractMultiDrawing manager, Guid itemId, SerializationFilter filter)
        {
            this.metadata = metadata;
            this.manager  = manager;
            this.itemId   = itemId;

            commandName = string.Format("{0} ({1})", ScreenManagerLang.CommandDeleteDrawing_FriendlyName, manager.ToolDisplayName);

            if (manager != null)
            {
                data = MultiDrawingItemSerializer.SerializeMemento(metadata, manager, manager.GetItem(itemId), filter);
            }

            // TODO: get the associated trackable drawing and save it too.
        }