-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
27 lines (25 loc) · 1.12 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
namespace ScriptEditorExample {
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var report = new XtraReport();
report.ScriptsSource = "// write code here\r\n";
report.ScriptLanguage = DevExpress.XtraReports.ScriptLanguage.CSharp;
using(report)
using(var tool = new ReportDesignTool(report)) {
var form = tool.DesignRibbonForm;
form.DesignMdiController.AddService(typeof(DevExpress.XtraReports.Design.IScriptEditorService), new ScriptEditorService());
form.DesignDockManager.Load += (s, e) => form.DesignMdiController.ActiveDesignPanel.ExecCommand(DevExpress.XtraReports.UserDesigner.ReportCommand.ShowScriptsTab);
tool.ShowRibbonDesignerDialog();
}
}
}
}