Esempio n. 1
0
		private void history_CommandExecuted(object sender, CommandEventArgs e) {
			UpdateUndoMenuItems();
			try {
				historyTrackBar.ValueChanged -= historyTrackBar_ValueChanged;
				if (e.Reverted) {
					++currHistoryPos;
					++historyTrackBar.Value;
				} else {
					if (currHistoryPos > 0) --currHistoryPos;
					if (historyTrackBar.Value > 0) --historyTrackBar.Value;
				}
			} finally {
				historyTrackBar.ValueChanged += historyTrackBar_ValueChanged;
			}
		}
Esempio n. 2
0
 private void History_CommandAdded(object sender, CommandEventArgs e)
 {
     UpdateUndoRedoButtons();
 }
Esempio n. 3
0
		private void history_CommandAdded(object sender, CommandEventArgs e) {
			UpdateUndoMenuItems();
			if (CurrentDisplay != null) {
				if (project.History.UndoCommandCount + project.History.RedoCommandCount != historyTrackBar.Maximum)
					historyTrackBar.Maximum = project.History.UndoCommandCount + project.History.RedoCommandCount;
				currHistoryPos = 0;
				historyTrackBar.Value = 0;
			}
		}