-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOutlookItemEventsClass1.cs
157 lines (128 loc) · 6.16 KB
/
OutlookItemEventsClass1.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
using System;
namespace OutlookEvents
{
/// <summary>
/// Add-in Express Outlook Item Events Class
/// </summary>
public class OutlookItemEventsClass1 : AddinExpress.MSO.ADXOutlookItemEvents
{
private AddinModule CurrentModule = null;
private bool isSelectedChanged = false;
public OutlookItemEventsClass1(AddinExpress.MSO.ADXAddinModule module, bool isSelectedChanged)
: base(module)
{
this.isSelectedChanged = isSelectedChanged;
if (CurrentModule == null)
CurrentModule = module as AddinModule;
}
public override void ProcessAttachmentAdd(object attachment)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.AttachmentAdd", "Node_ProcessAttachmentAdd");
}
public override void ProcessAttachmentRead(object attachment)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.AttachmentRead", "Node_ProcessAttachmentRead");
}
public override void ProcessBeforeAttachmentSave(object attachment, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAttachmentSave", "Node_ProcessBeforeAttachmentSave");
}
public override void ProcessBeforeCheckNames(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeCheckNames", "Node_ProcessBeforeCheckNames");
}
public override void ProcessClose(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Close. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessClose");
if (!isSelectedChanged)
{
CurrentModule.itemEvents.Remove(this);
this.Dispose();
}
}
public override void ProcessCustomAction(object action, object response, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.CustomAction", "Node_ProcessCustomAction");
}
public override void ProcessCustomPropertyChange(string name)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.CustomPropertyChange. CustomProperty name is " + name, "Node_ProcessCustomPropertyChange");
}
public override void ProcessForward(object forward, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Forward. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessForward");
}
public override void ProcessOpen(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Open. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessOpen");
}
public override void ProcessPropertyChange(string name)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.PropertyChange. Property name is " + name, "Node_ProcessPropertyChange");
}
public override void ProcessRead()
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Read. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessRead");
}
public override void ProcessReply(object response, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Reply. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessReply");
}
public override void ProcessReplyAll(object response, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.ReplyAll. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessReplyAll");
}
public override void ProcessSend(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Send. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessSend");
}
public override void ProcessWrite(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Write. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessWrite");
}
public override void ProcessBeforeDelete(object item, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeDelete " + CurrentModule.ItemInfo(item), "Node_ProcessBeforeDelete");
}
public override void ProcessAttachmentRemove(object attachment)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.AttachmentRemove", "Node_ProcessAttachmentRemove");
}
public override void ProcessBeforeAttachmentAdd(object attachment, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAttachmentAdd", "Node_ProcessBeforeAttachmentAdd");
}
public override void ProcessBeforeAttachmentPreview(object attachment, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAttachmentPreview", "Node_ProcessBeforeAttachmentPreview");
}
public override void ProcessBeforeAttachmentRead(object attachment, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAttachmentRead", "Node_ProcessBeforeAttachmentRead");
}
public override void ProcessBeforeAttachmentWriteToTempFile(object attachment, AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAttachmentWriteToTempFile", "Node_BeforeAttachmentWriteToTempFile");
}
public override void ProcessUnload()
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.Unload" , "Node_ProcessUnload");
}
public override void ProcessBeforeAutoSave(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeAutoSave. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessBeforeAutoSave");
}
public override void ProcessAfterWrite()
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.AfterWrite. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessAfterWrite");
}
public override void ProcessBeforeRead()
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.BeforeRead. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessBeforeRead");
}
public override void ProcessReadComplete(AddinExpress.MSO.ADXCancelEventArgs e)
{
CurrentModule.WriteToLog(" = ADXOutlookItemEvents.ReadComplete. " + CurrentModule.ItemInfo(this.ItemObj), "Node_ProcessReadComplete");
}
}
}