-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomReportModel.cs
34 lines (29 loc) · 1.2 KB
/
CustomReportModel.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
using DevExpress.XtraReports.Wizards;
using System.Drawing.Printing;
namespace CustomReportWizard {
class CustomReportModel : XtraReportModel {
public PaperKind PaperKind { get; set; }
public Margins PageMargins { get; set; }
public CustomReportModel() {
PaperKind = PaperKind.Letter;
PageMargins = new Margins(100, 100, 100, 100);
}
public CustomReportModel(CustomReportModel model) : base(model) {
PaperKind = model.PaperKind;
PageMargins = new Margins(model.PageMargins.Left, model.PageMargins.Right, model.PageMargins.Top, model.PageMargins.Bottom);
}
public override object Clone() {
return new CustomReportModel(this);
}
public override bool Equals(object obj) {
var other = obj as CustomReportModel;
return other != null
&& base.Equals(obj)
&& PaperKind == other.PaperKind
&& PageMargins == other.PageMargins;
}
public override int GetHashCode() {
return base.GetHashCode() ^ PaperKind.GetHashCode() ^ PageMargins.GetHashCode();
}
}
}