private void Tekening1_BroadcastUndoRedoStack(object sender, UndoRedoStackEventArgs e) { if (BroadcastUndoRedoStack != null) { BroadcastUndoRedoStack(this, e); } }
private void MDI_Child_BroadcastUndoRedoStack(object sender, UndoRedoStackEventArgs e) { if (!undoing) { lstUndo.Items.Clear(); lstRedo.Items.Clear(); lstUndo.Items.AddRange(e.UndoStack.Select(T => new ToolStripMenuItem(T.Beschrijving)).ToArray()); lstRedo.Items.AddRange(e.RedoStack.Select(T => new ToolStripMenuItem(T.Beschrijving)).ToArray()); undoToolstripButton.Enabled = e.UndoStack.Length != 0; redoToolstripButton.Enabled = e.RedoStack.Length != 0; } }