This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
52 lines (46 loc) · 1.79 KB
/
Form1.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Reporting;
using DevExpress.XtraScheduler.Reporting.UI;
using DevExpress.XtraPrinting;
using DevExpress.XtraPrinting.Control;
using DevExpress.XtraPrinting.Drawing;
using DevExpress.XtraReports.UI;
using DevExpress.XtraScheduler.Design;
using DevExpress.XtraScheduler.Localization;
namespace HorizontalResourceHeaderCaption {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
Resource res1 = schedulerStorage1.CreateResource(1);
res1.Caption = "Peter Dolan";
Resource res2 = schedulerStorage1.CreateResource(2);
res2.Caption = "Ryan Fischer";
Resource res3 = schedulerStorage1.CreateResource(3);
res3.Caption = "Andrew Miller";
Resource res4 = schedulerStorage1.CreateResource(4);
res4.Caption = "Tom Hamlett";
Resource res5 = schedulerStorage1.CreateResource(5);
res5.Caption = "Jerry Campbell";
schedulerStorage1.Resources.AddRange(new Resource[] { res1, res2, res3, res4, res5 } );
}
private void button1_Click(object sender, EventArgs e) {
CreateReport().ShowPreview();
}
private void button2_Click(object sender, EventArgs e) {
SchedulerReportDesignTool tool = new SchedulerReportDesignTool(CreateReport());
tool.ShowDesignerDialog();
}
WeeklyReport CreateReport() {
WeeklyReport rpt = new WeeklyReport();
rpt.SchedulerAdapter.SetSourceObject(this.schedulerControl1);
return rpt;
}
}
}