Example #1
0
            protected override HistoryMemento OnToolUndo()
            {
                CompoundHistoryMemento     chm  = (CompoundHistoryMemento)this.CompoundHistoryMemento.PerformUndo();
                CompoundToolHistoryMemento cthm = new CompoundToolHistoryMemento(chm, DocumentWorkspace, this.Name, this.Image);

                return(cthm);
            }
        private void FlushHistoryMementos(string name)
        {
            if (this.currentHistoryMementos.Count > 0)
            {
                CompoundHistoryMemento cha = new CompoundHistoryMemento(null, null,
                                                                        this.currentHistoryMementos.ToArray());

                string haName;

                if (name == null)
                {
                    haName = this.Name;
                }
                else
                {
                    haName = name;
                }

                ImageResource image = this.Image;

                CompoundToolHistoryMemento ctha = new CompoundToolHistoryMemento(cha, DocumentWorkspace, haName, image);

                ctha.SeriesGuid = context.seriesGuid;
                HistoryStack.PushNewMemento(ctha);

                this.currentHistoryMementos.Clear();
            }
        }
Example #3
0
        private void FlushHistoryMementos(string name)
        {
            if (this.currentHistoryMementos.Count > 0)
            {
                CompoundHistoryMemento cha = new CompoundHistoryMemento(null, null,
                                                                        this.currentHistoryMementos.ToArray());

                string        haName;
                ImageResource image;

                if (this.didPaste)
                {
                    haName        = PdnResources.GetString("CommonAction.Paste");
                    image         = PdnResources.GetImageResource("Icons.MenuEditPasteIcon.png");
                    this.didPaste = false;
                }
                else
                {
                    if (name == null)
                    {
                        haName = this.Name;
                    }
                    else
                    {
                        haName = name;
                    }

                    image = this.Image;
                }

                CompoundToolHistoryMemento ctha = new CompoundToolHistoryMemento(cha, this.DocumentWorkspace, haName, image);

                ctha.SeriesGuid = context.seriesGuid;
                HistoryStack.PushNewMemento(ctha);

                this.currentHistoryMementos.Clear();
            }
        }
Example #4
0
        private void FlushHistoryMementos(string name)
        {
            if (this.currentHistoryMementos.Count > 0)
            {
                CompoundHistoryMemento cha = new CompoundHistoryMemento(null, null,
                    this.currentHistoryMementos.ToArray());

                string haName;

                if (name == null)
                {
                    haName = this.Name;
                }
                else
                {
                    haName = name;
                }

                ImageResource image = this.Image;

                CompoundToolHistoryMemento ctha = new CompoundToolHistoryMemento(cha, DocumentWorkspace, haName, image);

                ctha.SeriesGuid = context.seriesGuid;
                HistoryStack.PushNewMemento(ctha);

                this.currentHistoryMementos.Clear();
            }
        }
Example #5
0
 protected override HistoryMemento OnToolUndo()
 {
     CompoundHistoryMemento chm = (CompoundHistoryMemento)this.compoundHistoryMemento.PerformUndo();
     CompoundToolHistoryMemento cthm = new CompoundToolHistoryMemento(chm, DocumentWorkspace, this.Name, this.Image);
     return cthm;
 }
Example #6
0
        private void FlushHistoryMementos(string name)
        {
            if (this.currentHistoryMementos.Count > 0)
            {
                CompoundHistoryMemento cha = new CompoundHistoryMemento(null, null,
                    this.currentHistoryMementos.ToArray());

                string haName;
                ImageResource image;

                if (this.didPaste)
                {
                    haName = PdnResources.GetString("CommonAction.Paste");
                    image = PdnResources.GetImageResource("Icons.MenuEditPasteIcon.png");
                    this.didPaste = false;
                }
                else
                {
                    if (name == null)
                    {
                        haName = this.Name;
                    }
                    else
                    {
                        haName = name;
                    }

                    image = this.Image;
                }

                CompoundToolHistoryMemento ctha = new CompoundToolHistoryMemento(cha, this.DocumentWorkspace, haName, image);

                ctha.SeriesGuid = context.seriesGuid;
                HistoryStack.PushNewMemento(ctha);

                this.currentHistoryMementos.Clear();
            }
        }