示例#1
0
        public override void HandleKeyPressWhenFocused(  )
        {
            if (KeyboardStatus.IsNewKeyPress(Keys.H))
            {
                IMemento memento = IoC.Memento;
                memento.Record("Flip Item(s) Horizontally", () =>
                {
                    FlipHorizontally = !FlipHorizontally;
                    IoC.Model.NotifyChanged(this);
                });
            }

            if (KeyboardStatus.IsNewKeyPress(Keys.V))
            {
                IMemento memento = IoC.Memento;
                memento.Record("Flip Item(s) Vertically", () =>
                {
                    FlipVertically = !FlipVertically;
                    IoC.Model.NotifyChanged(this);
                });
            }
        }
示例#2
0
        public void RemoveCustomPropertyItem(ITreeItem item, DictionaryPropertyDescriptor propertyDescriptor)
        {
            _memento.Record(@"Delete custom property", () =>
            {
                propertyDescriptor.Remove(propertyDescriptor.Name);

                tryFire(() => ItemChanged, item);
            });
        }