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]); }
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); }
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 ] ) ; }
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 ) ; }