Esempio n. 1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if ((context != null) && (provider != null) && (value != null))
            {
                IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                if (svc != null)
                {
                    NhsDateEditor editor = new NhsDateEditor();
                    editor.Value = (NhsDate)value;

                    svc.DropDownControl(editor);
                    value = editor.Value;
                }
            }

            return value;
        }
Esempio n. 2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if ((context != null) && (provider != null) && (value != null))
            {
                IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                if (svc != null)
                {
                    NhsDateEditor editor = new NhsDateEditor();
                    editor.Value = (NhsDate)value;

                    svc.DropDownControl(editor);
                    value = editor.Value;
                }
            }

            return(value);
        }