Exemple #1
0
        public HierarchyNode EditValue(IServiceProvider provider, HierarchyNode root, HierarchyNode value)
        {
            ISolutionPickerFilter filter = null;

            formsService = (IWindowsFormsEditorService)ServiceHelper.GetService(provider, typeof(IWindowsFormsEditorService), this);
            if (formsService != null)
            {
                using (CreateEditorServiceProvider(provider, out filter))
                {
                    using (SolutionPickerControl control = new SolutionPickerControl(root, value, filter))
                    {
                        control.SelectionChanged += OnSelect;
                        formsService.DropDownControl(control);
                        control.SelectionChanged -= OnSelect;
                        formsService              = null;

                        if (nodeSelected)
                        {
                            return(control.SelectedTarget);
                        }

                        return(null);
                    }
                }
            }
            return(value);
        }
        public HierarchyNode EditValue(IServiceProvider provider, HierarchyNode root, HierarchyNode value)
        {
            ISolutionPickerFilter filter = null;
            formsService = (IWindowsFormsEditorService)ServiceHelper.GetService(provider, typeof(IWindowsFormsEditorService), this);
            if (formsService != null)
            {
                using (CreateEditorServiceProvider(provider, out filter))
                {
                    using (SolutionPickerControl control = new SolutionPickerControl(root, value, filter))
                    {
                        control.SelectionChanged += OnSelect;
                        formsService.DropDownControl(control);
                        control.SelectionChanged -= OnSelect;
                        formsService = null;

                        if (nodeSelected)
                        {
                            return control.SelectedTarget;
                        }

                        return null;
                    }
                }
            }
            return value;
        }