void gridPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            _memento.EndCommand( );

            _memento.BeginCommand(@"Edit '{0}' property".FormatWith(getNameOfChangedItem(e.ChangedItem)));

            _currentItem.PropertiesChanged(e);

            var itemEditor = _currentItem as ItemEditor;

            if (itemEditor != null)
            {
                //debt: Should we not notify the model about other non 'ItemEditor' changes, such as the level itself and the layers?
                IoC.Model.NotifyChanged(itemEditor);
            }
        }
Exemple #2
0
        public void MoveSelectedItemsToLayer(LayerEditor chosenLayer)
        {
            if (chosenLayer == Level.ActiveLayer)
            {
                return;
            }

            _memento.BeginCommand(@"Move Item(s) To Layer '{0}'".FormatWith(chosenLayer.Name));

            Level.MoveSelectedIditorsToLayer(chosenLayer);

            tryFire(() => ItemsMoved, Level.SelectedEditors);
        }
        void entityTreeItemDrag(object sender, ItemDragEventArgs e)
        {
            if (((TreeNode)e.Item).Tag is LayerEditor)
            {
                return;
            }

            if (((TreeNode)e.Item).Tag is LevelEditor)
            {
                return;
            }

            _memento.BeginCommand("Drag Item");

            DoDragDrop(e.Item, DragDropEffects.Move);
        }