Пример #1
0
 private void History_CommandsExecuted(object sender, CommandsEventArgs e)
 {
     UpdateUndoRedoButtons();
 }
Пример #2
0
		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;
			}
		}