-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomPageDataService.cs
24 lines (22 loc) · 1.04 KB
/
CustomPageDataService.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
using System;
using System.Collections.Generic;
using System.Linq;
namespace CustomCachedDocumentSourceSerialization {
public class CustomPageDataService {
public const string Key = "customPageData";
public Dictionary<int, List<int>> PageAdditionalData { get; private set; }
public Dictionary<int, string> SheetNames { get; private set; }
public CustomPageDataService(Dictionary<int, List<int>> pageAdditionalData) {
if (pageAdditionalData == null)
throw new ArgumentNullException("pageAdditionalData");
PageAdditionalData = pageAdditionalData;
}
public void PrintingSystem_XlSheetCreated(object sender, DevExpress.XtraPrinting.XlSheetCreatedEventArgs e) {
if (PageAdditionalData.ContainsKey(e.Index)) {
int min = PageAdditionalData[e.Index].Min();
int max = PageAdditionalData[e.Index].Max();
e.SheetName = string.Format("Categories_{0}-{1}", min, max);
}
}
}
}