2 using System.Collections.Generic; |
2 using System.Collections.Generic; |
3 using System.Linq; |
3 using System.Linq; |
4 using System.Text; |
4 using System.Text; |
5 using System.Threading; |
5 using System.Threading; |
6 using System.Threading.Tasks; |
6 using System.Threading.Tasks; |
|
7 using System.Windows; |
7 |
8 |
8 namespace UI |
9 namespace UI |
9 { |
10 { |
10 public class Toolkit |
11 public class EventCallback |
11 { |
12 { |
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 } |
13 } |
26 } |
14 } |
27 } |