protected override DialogResult ShowEditorDialog(IWindowsFormsEditorService edSvc) { IComponentChangeService Service = null; DialogResult Result; Result = DialogResult.Cancel; GUI.EditorService = edSvc; try { Service = ((IComponentChangeService)Editor.Context.GetService(typeof(IComponentChangeService))); if (Service != null) { Service.ComponentChanged += OnComponentChanged; } GUI.EditValue = EditValue; GUI.Bind(); GUI.ActiveControl = GUI.lstMembers; ActiveControl = GUI; Result = base.ShowEditorDialog(edSvc); } finally { if (Service != null) { Service.ComponentChanged -= OnComponentChanged; } } return(Result); }