-
Notifications
You must be signed in to change notification settings - Fork 11
/
EventFragment.cs.in
36 lines (32 loc) · 976 Bytes
/
EventFragment.cs.in
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
private vtkObjectEventRelay @event_name@Relay;
/// <summary>
/// The @event_name@ event is invoked when the sender's InvokeEvent method
/// is called with vtkCommand.EventIds.@event_basename@Event
/// as the eventId parameter.
/// </summary>
public event Kitware.VTK.vtkObject.vtkObjectEventHandler @event_name@
{
add
{
if (null == this.@event_name@Relay)
{
this.@event_name@Relay = new vtkObjectEventRelay(this,
(uint) vtkCommand.EventIds.@event_basename@Event);
}
if (null != this.@event_name@Relay)
{
this.@[email protected](value);
}
}
remove
{
if (null != this.@event_name@Relay)
{
this.@[email protected](value);
if (!this.@[email protected]())
{
this.@event_name@Relay = null;
}
}
}
}