public void destroyInstance(SimObjectController simObjectController) { if (this.simObjectController != null) { this.simObjectController = null; simObjectController.destroySimObject(Name); setVisible(true); } }
private void createSimObject(object editingObject) { if (simObjectController != null) { Instance instance = editingObject as Instance; simObjectController.destroySimObject(instance.Name); SimObject simObj = simObjectController.createSimObject(instance.Definition); if (simObj != null && !showInstance) { simObj.Enabled = showInstance; } } }