private void DoUndoEvent(object sender, UndoEventArgs e) { Transaction transaction = e.UndoneTransaction; if (transaction.Tab != PageNumber) { EditorTabs.SelectedIndex = transaction.Tab; } if (transaction.Page != ElementNumber) { ElementSpinner.Value = transaction.Page; } else { FillOutCurrentPanel(transaction.Tab, transaction.Page); //force an update } }
private void DoUndoEvent(object sender, UndoEventArgs e) { Transaction transaction = e.UndoneTransaction; if (transaction.Tab != PageNumber) { EditorTabs.SelectedIndex = transaction.Tab; } //Sigh. This code is awful and needs to be rewritten. //Hack to ensure the spinner and all combo boxes are set correctly. if (transaction.ChangesListSize()) { isLocked = true; ElementSpinner.Value = 0; ElementListInit(); isLocked = false; if (e.Redo) { ElementSpinner.Value = transaction.RedoPage; } else { ElementSpinner.Value = transaction.Page; } FillOutCurrentPanel(transaction.Tab, ElementNumber); } else { if (transaction.Page != ElementNumber) { ElementSpinner.Value = transaction.Page; } else { FillOutCurrentPanel(transaction.Tab, transaction.Page); //force an update } } }
private void DoUndoEvent(object sender, UndoEventArgs e) { Transaction transaction = e.UndoneTransaction; //If there's not an associated tab and page, update the current panel just in case it was changed. if (transaction.Tab < 0) { FillOutCurrentPanel(PageNumber, ElementNumber); return; } if (transaction.Tab != PageNumber) { EditorTabs.SelectedIndex = transaction.Tab; } ResetMaxes(); if (e.Redo) { if (transaction.Page != ElementNumber) { ElementSpinner.Value = transaction.RedoPage; } else { FillOutCurrentPanel(transaction.Tab, transaction.RedoPage); //force an update } } else { if (transaction.Page != ElementNumber) { ElementSpinner.Value = transaction.Page; } else { FillOutCurrentPanel(transaction.Tab, transaction.Page); //force an update } } }
// // Undo System Will Perform Redo event handler // private void UndoSystem_WillPerformRedo(object sender, UndoEventArgs e) { CancelOperation(true); }
private void UndoEvent(object sender, UndoEventArgs args) { UndoMap undoMap = sender as UndoMap; }