Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
        private void addBinding(EditUICallback callback)
        {
            SimSubSceneBinding binding = new SimSubSceneBinding(this);

            bindings.AddLast(binding);
            if (editInterface != null)
            {
                editInterface.addEditableProperty(binding);
            }
        }
Exemplo n.º 3
0
        /// <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);
                }
            }
        }