public void DeleteSelectedObjects()
        {
            if (Layer != null)
            {
                ObjectRemoveCommand command = new ObjectRemoveCommand(Layer, this);
                foreach (SelectedObjectRecord inst in _selectedObjects)
                {
                    command.QueueRemove(inst.Instance);
                }

                ExecuteCommand(command);
            }

            ClearSelection();
        }
Beispiel #2
0
 private void Remove(IGameObject Object, bool NoUndo, ref Command command)
 {
     if (!NoUndo)
     {
         command = new ObjectRemoveCommand(
             "Delete Object " + Object,
             Object,
             this);
     }
     GameObjects.Remove(Object);
     try {
         if (ObjectRemoved != null)
         {
             ObjectRemoved(this, Object);
         }
     } catch (Exception e) {
         ErrorDialog.Exception(e);
     }
 }
Beispiel #3
0
 public void Remove(IGameObject Object, bool NoUndo)
 {
     if (!NoUndo)
     {
         ObjectRemoveCommand command = new ObjectRemoveCommand(
             "Delete Object " + Object,
             Object,
             this);
         UndoManager.AddCommand(command);
     }
     GameObjects.Remove(Object);
     try {
         if (ObjectRemoved != null)
         {
             ObjectRemoved(this, Object);
         }
     } catch (Exception e) {
         ErrorDialog.Exception(e);
     }
 }
        public void DeleteSelectedObjects()
        {
            if (Layer != null) {
                ObjectRemoveCommand command = new ObjectRemoveCommand(Layer, this);
                foreach (SelectedObjectRecord inst in _selectedObjects)
                    command.QueueRemove(inst.Instance);

                ExecuteCommand(command);
            }

            ClearSelection();
        }