void Editor_ComponentUpdated(object sender, ComponentUpdatedEventArgs e) { UndoAction undoAction = new UndoAction(UndoCommand.ModifyComponents, "edit", new Component[] { e.Component }); Dictionary<Component, string> previousData = new Dictionary<Component, string>(1); previousData.Add(e.Component, e.PreviousData); undoAction.AddData("before", previousData); Dictionary<Component, string> newData = new Dictionary<Component, string>(1); newData.Add(e.Component, e.Component.SerializeToString()); undoAction.AddData("after", newData); UndoManager.AddAction(undoAction); // Update connections e.Component.ResetConnections(); e.Component.ApplyConnections(circuitDisplay.Document); circuitDisplay.DrawConnections(); }
void ComponentEditor_ComponentUpdated(object sender, ComponentUpdatedEventArgs e) { // Do nothing }