Пример #1
0
 void mementoCommandRedone(object sender, CommandEndedArgs e)
 {
     setDirtyFlag(true);
     undoButton.Enabled = undoMenuItem.Enabled = e.UndoCount > 0;
     redoButton.Enabled = redoMenuItem.Enabled = e.RedoCount > 0;
     undoButton.DropDownItems.Insert(0, redoButton.DropDownItems[0]);
 }
Пример #2
0
        void mementoCommandEnded(object sender, CommandEndedArgs e)
        {
            redoButton.DropDownItems.Clear( );

            setDirtyFlag(true);

            undoButton.Enabled = undoMenuItem.Enabled = e.UndoCount > 0;
            redoButton.Enabled = redoMenuItem.Enabled = e.RedoCount > 0;

            var item = new ToolStripMenuItem(e.Command.Description)
            {
                Tag = e.Command
            };

            undoButton.DropDownItems.Insert(0, item);
        }
Пример #3
0
        void mementoCommandUndone( object sender, CommandEndedArgs e )
        {
            setDirtyFlag( true ) ;

            undoButton.Enabled = undoMenuItem.Enabled = e.UndoCount > 0 ;
            redoButton.Enabled = redoMenuItem.Enabled = e.RedoCount > 0 ;

            redoButton.DropDownItems.Insert( 0, undoButton.DropDownItems[ 0 ] ) ;
        }
Пример #4
0
        void mementoCommandEnded( object sender, CommandEndedArgs e )
        {
            redoButton.DropDownItems.Clear( ) ;

            setDirtyFlag( true ) ;

            undoButton.Enabled = undoMenuItem.Enabled = e.UndoCount > 0 ;
            redoButton.Enabled = redoMenuItem.Enabled = e.RedoCount > 0 ;

            var item = new ToolStripMenuItem( e.Command.Description )
                {
                    Tag = e.Command
                } ;

            undoButton.DropDownItems.Insert( 0, item ) ;
        }