Exemple #1
0
 /// <summary>
 /// Remove a SimElementDefinition.
 /// </summary>
 /// <param name="definition">The definition to remove.</param>
 public void removeElement(SimElementDefinition definition)
 {
     definition.setSimObjectDefinition(null);
     definitions.Remove(definition);
     if (editInterface != null)
     {
         editInterface.removeSubInterface(definition);
     }
 }
Exemple #2
0
 /// <summary>
 /// Add a SimElementDefinition. A element should only be added to
 /// one defintion.
 /// </summary>
 /// <param name="definition">The definition to add.</param>
 public void addElement(SimElementDefinition definition)
 {
     definition.setSimObjectDefinition(this);
     definitions.AddLast(definition);
     if (editInterface != null)
     {
         createElementInterface(definition);
     }
 }
Exemple #3
0
 public void pasteElement(SimElementDefinition definition)
 {
     addElement(definition);
 }
Exemple #4
0
 /// <summary>
 /// Helper function to create the EditInterface for a given SimElementDefinition.
 /// </summary>
 /// <param name="definition"></param>
 private void createElementInterface(SimElementDefinition definition)
 {
     editInterface.addSubInterface(definition, definition.getEditInterface());
 }