Exemple #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));
            }
        }
Exemple #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 PropertyMargin(PropertyReport pr)
 {
     _pr = pr;
 }
 internal PropertyPrintFirstLast(PropertyReport pr, XmlNode phNode)
 {
     _pr = pr;
     _parent = phNode;
 }
Exemple #5
0
 internal PropertyMargin(PropertyReport pr)
 {
     _pr = pr;
 }
Exemple #6
0
 internal PropertyReportCode(PropertyReport r)
 {
     pr = r;
 }
Exemple #7
0
 internal PropertyReportModulesClasses(PropertyReport r)
 {
     pr = r;
 }
Exemple #8
0
 internal PropertyReportParameters(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyReportParameters(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyReportModulesClasses(PropertyReport r)
 {
     pr = r;
 }
 internal PropertyReportCode(PropertyReport r)
 {
     pr = r;
 }
Exemple #12
0
 internal PropertyPrintFirstLast(PropertyReport pr, XmlNode phNode)
 {
     _pr     = pr;
     _parent = phNode;
 }