public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     IWindowsFormsEditorService service = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
     StateEventPropertiesForm editor = new StateEventPropertiesForm(((StateEvent)context.Instance).Properties);
     editor.Target = ((StateEvent)context.Instance).Parent.Target;
     if (service.ShowDialog(editor) == System.Windows.Forms.DialogResult.OK)
     {
         return editor.GetResults();
     }
     return value;
 }
Exemplo n.º 2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService service = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            StateEventPropertiesForm   editor  = new StateEventPropertiesForm(((StateEvent)context.Instance).Properties);

            editor.Target = ((StateEvent)context.Instance).Parent.Target;
            if (service.ShowDialog(editor) == System.Windows.Forms.DialogResult.OK)
            {
                return(editor.GetResults());
            }
            return(value);
        }