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); }
private void Initialize(HierarchyNode root, HierarchyNode currentValue, ISolutionPickerFilter filter) { this.filter = filter; this.root = root; this.originalSelection = currentValue; InitializeComponent(); this.SuspendLayout(); CreateNode(solutionTree.Nodes, this.root); this.ResumeLayout(false); }
private void Initialize(IHierarchyNode rootNode, ISolutionPickerFilter pickerFilter) { _filter = pickerFilter; _root = rootNode; InitializeComponent(); SuspendLayout(); CreateNode(solutionTree.Nodes, _root); solutionTree.Nodes[0].Expand(); ResumeLayout(false); }
/// <summary> /// Initializes the control receiving the root guid and current value /// to customize the behavior of the control. /// </summary> /// <param name="root">The root used for the Tree</param> /// <param name="currentValue">The current value</param> /// <param name="filter">The filter. Can be <see langword="null"/>.</param> public SolutionPickerControl(HierarchyNode root, HierarchyNode currentValue, ISolutionPickerFilter filter) { Initialize(root, currentValue, filter); }
/// <summary> /// Initializes the control receiving the root value and a filter /// to customize the behavior of the control. /// </summary> /// <param name="root"></param> /// <param name="filter"></param> public SolutionPickerControl(HierarchyNode root, ISolutionPickerFilter filter) : this(root, null, filter) { }
internal Microsoft.Practices.ComponentModel.ServiceContainer CreateEditorServiceProvider(IServiceProvider provider, out ISolutionPickerFilter filter) { Microsoft.Practices.ComponentModel.ServiceContainer editorServiceProvider = new Microsoft.Practices.ComponentModel.ServiceContainer(true); editorServiceProvider.Site = new Site(provider, editorServiceProvider, editorServiceProvider.GetType().FullName); editorServiceProvider.AddService(typeof(IDictionaryService), new DictionaryWrapper(attributes)); filter = CreateEditorFilter(provider); if(filter is IComponent) { editorServiceProvider.Add((IComponent)filter); } return editorServiceProvider; }
/// <summary> /// Initializes the control receiving the root value and a filter /// to customize the behavior of the control. /// </summary> /// <param name="root"></param> /// <param name="filter"></param> public SolutionPickerControl(IHierarchyNode root, ISolutionPickerFilter filter = null) { Initialize(root, filter); }
internal Microsoft.Practices.ComponentModel.ServiceContainer CreateEditorServiceProvider(IServiceProvider provider, out ISolutionPickerFilter filter) { Microsoft.Practices.ComponentModel.ServiceContainer editorServiceProvider = new Microsoft.Practices.ComponentModel.ServiceContainer(true); editorServiceProvider.Site = new Site(provider, editorServiceProvider, editorServiceProvider.GetType().FullName); editorServiceProvider.AddService(typeof(IDictionaryService), new DictionaryWrapper(attributes)); filter = CreateEditorFilter(provider); if (filter is IComponent) { editorServiceProvider.Add((IComponent)filter); } return(editorServiceProvider); }
/// <summary> /// Initializes the control receiving the root value and a filter /// to customize the behavior of the control. /// </summary> /// <param name="root"></param> /// <param name="filter"></param> public SolutionPickerControl(IHierarchyNode root, ISolutionPickerFilter filter) { Initialize(root, filter); }
private void Initialize(IHierarchyNode rootNode, ISolutionPickerFilter pickerFilter) { this.filter = pickerFilter; this.root = rootNode; InitializeComponent(); this.SuspendLayout(); CreateNode(solutionTree.Nodes, this.root); solutionTree.Nodes[0].Expand(); this.ResumeLayout(false); }
/// <summary> /// Initializes the control receiving the root guid and current value /// to customize the behavior of the control. /// </summary> /// <param name="root">The root used for the Tree</param> /// <param name="currentValue">The current value</param> /// <param name="filter">The filter. Can be <see langword="null"/>.</param> public SolutionPickerControl(HierarchyNode root, HierarchyNode currentValue,ISolutionPickerFilter filter) { Initialize(root,currentValue,filter); }