Esempio n. 1
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            IMemento <ControlPool> inverse = new DontDeleteControlMemento(controlToDelete, parentControl, baseWindow);

            target.AddWithParent(controlToDelete, parentControl, baseWindow);
            return(inverse);
        }
Esempio n. 2
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            IMemento <ControlPool> inverse = new InsertControlMemento(index);

            target.Insert(index, removed);
            return(inverse);
        }
Esempio n. 3
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            int index = target.Count - 1;
            IMemento <ControlPool> inverse = new RemoveControlMemento(index, target[index]);

            target.RemoveAt(target.Count - 1);
            return(inverse);
        }
Esempio n. 4
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            IEIBControl            removed = target[index];
            IMemento <ControlPool> inverse = new RemoveControlMemento(index, removed);

            target.RemoveAt(index);
            return(inverse);
        }
Esempio n. 5
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            int index = target.Count - 1;
            IMemento <ControlPool> inverse = new DeleteControlMemento(dCtrl, parentControl, baseWindow);

            target.RemoveAt(target.Count - 1);
            return(inverse);
        }
Esempio n. 6
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            PropertyInfo p = getPropertyInfo();
            //System.Reflection.PropertyInfo p = ((Control)selObject).GetType().GetProperty(propertyName);
            object newpropval = getPropertyValue(); //p.GetGetMethod().Invoke(selObject, null);

            setPropertyValue();                     //p.GetSetMethod().Invoke(selObject, new object[] { propertyValue });
            IMemento <ControlPool> inverse = new PropertyOldChangeMemento(propertyName, newpropval, selObject);

            UIEventManager.showProperty();
            return(inverse);
        }