void uiThread_ActiveComponentUpdateEvent(PlatformComponent component, bool added, bool isInitial) { if (added) { bool visible = true; if (component.UISerializationInfo.ContainsValue("componentVisible")) { visible = component.UISerializationInfo.GetBoolean("componentVisible"); } if (visible) { CommonBaseControl control = CommonBaseControl.CreateCorrespondingControl(component, true); AddComponentControl(control, isInitial == false); } } else { CommonBaseControl control = combinedContainerControl.GetControlByTag(component); if (control != null) { combinedContainerControl.RemoveControl(control); } } UpdateComponentsMenues(); }
/// <summary> /// /// </summary> /// <param name="expertHost"></param> void Initialize(ExpertHost expertHost) { this.Name = expertHost.Name; _expertHost = expertHost; _expertHost.OperationalStateChangedEvent += new OperationalStateChangedDelegate(expertHost_OperationalStatusChangedEvent); // Create early here, to be able to use the image name. _expertControl = CommonBaseControl.CreateCorrespondingControl(_expertHost.Expert, true); this.ImageName = _expertControl.ImageName; //_host.SessionsUpdateEvent += new GeneralHelper.GenericDelegate<ISourceManager>(_expertHost_SessionsUpdateEvent); //_host.SourcesUpdateEvent += new GeneralHelper.GenericDelegate<ISourceManager>(_expertHost_SourcesUpdateEvent); //DoUpdateUI(); }