Ejemplo n.º 1
0
        public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            DBIconClass icon = value as DBIconClass;

            if (svc != null && icon != null)
            {
                using (IconClassForm form = new IconClassForm())
                {
                    form.Value = icon;
                    if (svc.ShowDialog(form) == DialogResult.OK)
                    {
                        icon = form.Value; // update object
                    }
                }
            }
            return(icon); // can also replace the wrapper object here
        }
Ejemplo n.º 2
0
 private void btn_no_icon_Click(object sender, EventArgs e)
 {
     Value = new DBIconClass {
         Class = "", Value = "", Color = "", FixedWidth = false, Rotate = ""
     };
 }