private void History_CommandsExecuted(object sender, CommandsEventArgs e) { UpdateUndoRedoButtons(); }
private void history_CommandsExecuted(object sender, CommandsEventArgs e) { UpdateUndoMenuItems(); try { historyTrackBar.ValueChanged -= historyTrackBar_ValueChanged; if (e.Reverted) { if (currHistoryPos != historyTrackBar.Value) { currHistoryPos += e.Commands.Count; historyTrackBar.Value += e.Commands.Count; } } else { currHistoryPos -= e.Commands.Count; historyTrackBar.Value -= e.Commands.Count; } } finally { historyTrackBar.ValueChanged += historyTrackBar_ValueChanged; } }