Esempio n. 1
0
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider,
                                         object value)
        {
            if ((context == null) || (provider == null))
            {
                return(base.EditValue(context, provider, value));
            }

            // Access the Property Browser's UI display service
            IWindowsFormsEditorService editorService =
                (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (editorService == null)
            {
                return(base.EditValue(context, provider, value));
            }

            // Create an instance of the UI editor form
            PropertyReport pr = context.Instance as PropertyReport;

            if (pr == null)
            {
                return(base.EditValue(context, provider, value));
            }

            using (OpenFileDialog ofd = new OpenFileDialog())
            {
                ofd.Filter = "XSL Files (*.xsl)|*.xsl" +
                             "|All files (*.*)|*.*";
                ofd.FilterIndex     = 0;
                ofd.CheckFileExists = true;
                if (ofd.ShowDialog() == DialogResult.OK)
                {
                    // Return the new property value from the UI editor form
                    return(ofd.FileName);
                }

                return(base.EditValue(context, provider, value));
            }
        }
Esempio n. 2
0
        public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider,
                                         object value)
        {
            if ((context == null) || (provider == null))
            {
                return(base.EditValue(context, provider, value));
            }

            // Access the Property Browser's UI display service
            IWindowsFormsEditorService editorService =
                (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (editorService == null)
            {
                return(base.EditValue(context, provider, value));
            }

            // Create an instance of the UI editor form
            PropertyReport pr = context.Instance as PropertyReport;

            if (pr == null)
            {
                return(base.EditValue(context, provider, value));
            }

            using (SingleCtlDialog scd = new SingleCtlDialog(pr.DesignCtl, pr.Draw, null, SingleCtlTypeEnum.ReportModulesClassesCtl, null))
            {
                // Display the UI editor dialog
                if (editorService.ShowDialog(scd) == DialogResult.OK)
                {
                    // Return the new property value from the UI editor form
                    return(new PropertyReportModulesClasses(pr));
                }

                return(base.EditValue(context, provider, value));
            }
        }
 internal PropertyPrintFirstLast(PropertyReport pr, XmlNode phNode)
 {
     _pr = pr;
     _parent = phNode;
 }
 internal PropertyReportParameters(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyReportModulesClasses(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyReportCode(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyMargin(PropertyReport pr)
 {
     _pr = pr;
 }
 internal PropertyMargin(PropertyReport pr)
 {
     _pr = pr;
 }
Esempio n. 9
0
 internal PropertyPrintFirstLast(PropertyReport pr, XmlNode phNode)
 {
     _pr     = pr;
     _parent = phNode;
 }
Esempio n. 10
0
 internal PropertyReportModulesClasses(PropertyReport r)
 {
     pr = r;
 }
Esempio n. 11
0
 internal PropertyReportCode(PropertyReport r)
 {
     pr = r;
 }
Esempio n. 12
0
 internal PropertyReportParameters(PropertyReport r)
 {
     pr = r;
 }