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
| using System;
| using System.Collections.Generic;
| using System.Linq;
| using System.Text;
| using System.Threading.Tasks;
|
| namespace IStation.WinFormUI
| {
|
| /// <summary>
| /// 页面操作枚举
| /// </summary>
| public enum ePageDataOperation
| {
| Insert = 1,//插入
| Update = 2,//更新
| Delete = 3,//删除
| }
|
| /// <summary>
| /// 页面同步事件集
| /// </summary>
| public class PageDataSync<T> where T : class, new()
| {
| public delegate void PageDataSyncHandler(DocumentPage page, ePageDataOperation operation, T t);
| public static event PageDataSyncHandler DataOperationEvent;
|
| public static void Commit(DocumentPage page, ePageDataOperation operation, T t)
| {
| DataOperationEvent?.Invoke(page, operation, t);
| }
|
|
| }
| }
|
|