public void RemoveElement(VisibleProjectElement element) { int id = element.id; foreach (Button button in buttons) { if (button.LinkedId == id) { Logger.Debug ("Project.RemoveElement. Deleting button {0}", button.LinkedId); RemoveButton (button); break; } } Logger.Debug ("Project.RemoveElement. Deleting element {0}", element.id); elements.Remove (element); }
public void AddElement(VisibleProjectElement element) { // It is not necessary to reflect the ID in the object passed (passed by value) element.id = details.NextID; details.IncreaseNextID (); elements.Add (element); }