Alsing.Design.ComponaCollectionEditor.ComponaCollectionForm.ShowEditorDialog C# (CSharp) Method

ShowEditorDialog() protected method

protected ShowEditorDialog ( IWindowsFormsEditorService edSvc ) : DialogResult
edSvc IWindowsFormsEditorService
return DialogResult
            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;
            }