|
1 using System; |
|
2 using System.Collections.Generic; |
|
3 using System.Linq; |
|
4 using System.Text; |
|
5 using System.Threading; |
|
6 using System.Threading.Tasks; |
|
7 using System.Windows; |
|
8 |
|
9 namespace UI |
|
10 { |
|
11 public class EventCallback |
|
12 { |
|
13 public IntPtr Object; |
|
14 public Action<IntPtr> Action; |
|
15 |
|
16 public EventCallback(IntPtr uiobj, Action<IntPtr> action) |
|
17 { |
|
18 Object = uiobj; |
|
19 Action = action; |
|
20 } |
|
21 |
|
22 public void Callback(object sender, RoutedEventArgs a) |
|
23 { |
|
24 Action.Invoke(Object); |
|
25 } |
|
26 } |
|
27 } |