Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 void ComponentEditor_ComponentUpdated(object sender, ComponentUpdatedEventArgs e)
 {
     // Do nothing
 }
Ejemplo n.º 3
0
 void ComponentEditor_ComponentUpdated(object sender, ComponentUpdatedEventArgs e)
 {
     // Do nothing
 }