/// <summary> /// Add a binding. /// </summary> /// <param name="toBind">The SimElementManagerDefinition to bind to this SimSubScene</param> public void addBinding(SimElementManagerDefinition toBind) { SimSubSceneBinding binding = new SimSubSceneBinding(this, toBind.Name); bindings.AddLast(binding); if (editInterface != null) { editInterface.addEditableProperty(binding); } }
private void addBinding(EditUICallback callback) { SimSubSceneBinding binding = new SimSubSceneBinding(this); bindings.AddLast(binding); if (editInterface != null) { editInterface.addEditableProperty(binding); } }
/// <summary> /// Remove a binding. /// </summary> /// <param name="toBind">The SimElementManagerDefinition to remove from this SimSubScene</param> public void removeBinding(SimElementManagerDefinition toBind) { SimSubSceneBinding found = null; foreach (SimSubSceneBinding binding in bindings) { if (binding.SimElementManager == toBind) { found = binding; break; } } if (found != null) { bindings.Remove(found); if (editInterface != null) { editInterface.removeEditableProperty(found); } } }