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)
                {
                    NhsTimeEditor editor = new NhsTimeEditor();
                    editor.Value = (NhsTime)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)
                {
                    NhsTimeEditor editor = new NhsTimeEditor();
                    editor.Value = (NhsTime)value;

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

            return(value);
        }