예제 #1
0
        protected override HistoryMemento OnUndo(ProgressEventHandler progressCallback)
        {
            DeleteLayerHistoryMementoData data = (DeleteLayerHistoryMementoData)base.Data;
            HistoryMemento memento             = new NewLayerHistoryMemento(base.Name, base.Image, this.historyWorkspace, this.index);

            this.historyWorkspace.Document.Layers.Insert(this.index, data.Layer);
            ((Layer)this.historyWorkspace.Document.Layers[this.index]).Invalidate();
            return(memento);
        }
예제 #2
0
        protected override HistoryMemento OnUndo()
        {
            DeleteLayerHistoryMementoData data = (DeleteLayerHistoryMementoData)this.Data;
            HistoryMemento ha = new NewLayerHistoryMemento(Name, Image, this.historyWorkspace, this.index);

            this.historyWorkspace.Document.Layers.Insert(index, data.Layer);
            ((Layer)this.historyWorkspace.Document.Layers[index]).Invalidate();
            return(ha);
        }