Canguro.Controller.PropertyGrid.FrameSectionFrm.SetDropDownParams C# (CSharp) Method

SetDropDownParams() public method

public SetDropDownParams ( Section lastSection, System wfes ) : void
lastSection Section
wfes System
return void
        public void SetDropDownParams(Section lastSection, System.Windows.Forms.Design.IWindowsFormsEditorService wfes)
        {
            this.wfes = wfes;
            sectionsTree.Section = lastSection;
        }

Usage Example

        /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that can be used to gain additional context information.</param>
        /// <param name="provider">An <see cref="T:System.IServiceProvider"></see> that this editor can use to obtain services.</param>
        /// <param name="value">The object to edit.</param>
        /// <returns>The new value of the object. If the value of the object has not changed, this should return the same object it was passed.</returns>
        public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService wfes = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;

            if (wfes != null)
            {
                if (frmSE == null)
                {
                    frmSE = new FrameSectionFrm();
                }

                frmSE.SetDropDownParams((Section)value, wfes);
                wfes.DropDownControl(frmSE);
                value = frmSE.Result;
            }
            return(value);
        }