예제 #1
0
        private void btnModificarFormato_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraReport report = new XtraReport();
            String     path   = Path.Combine(Directory.GetCurrentDirectory(), "FormatosCheques", string.Format("Formato-{0}.repx", currentRow["IDFormato"])).ToString();

            report.LoadLayout(path);
            //DevExpress.XtraReports.Configuration.Settings.Default.StorageOptions.RootDirectory = Path.Combine(Directory.GetCurrentDirectory(), "FormatosCheques");


            ReportDesignTool designTool = new ReportDesignTool(report);
            IDesignForm      desingForm = designTool.DesignRibbonForm;

            mdiController = desingForm.DesignMdiController;
            //mdiController.SetCommandVisibility(ReportCommand.SaveFileAs, CommandVisibility.None);
            //mdiController.SetCommandVisibility(ReportCommand.SaveFile, CommandVisibility.None);
            mdiController.SetCommandVisibility(ReportCommand.SaveAll, CommandVisibility.None);
            mdiController.SetCommandVisibility(ReportCommand.NewReport, CommandVisibility.None);
            mdiController.SetCommandVisibility(ReportCommand.OpenFile, CommandVisibility.None);
            mdiController.SetCommandVisibility(ReportCommand.OpenRemoteReport, CommandVisibility.None);
            mdiController.SetCommandVisibility(ReportCommand.OpenSubreport, CommandVisibility.None);


            designTool.DesignRibbonForm.DesignMdiController.DesignPanelLoaded += new DesignerLoadedEventHandler(DesignMdiController_DesignPanelLoaded);

            designTool.ShowRibbonDesigner();
        }
예제 #2
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            XtraReport            report       = this.reportDesigner1.ActiveDesignPanel.Report;
            ReportDesignTool      designTool   = new ReportDesignTool(report);
            IDesignForm           designForm   = designTool.DesignRibbonForm;
            PropertyGridDockPanel propertyGrid = (PropertyGridDockPanel)designForm.DesignDockManager[DesignDockPanelType.PropertyGrid];
            NameExtender          name         = new NameExtender();

            Console.WriteLine(name.GetName(this.propertyGridDockPanel1));
        }
 public static void Apply(IDesignForm designForm) => Apply(designForm.DesignMdiController, designForm.DesignDockManager);