blob: 6cad8c7c9504f3c9c67ee2ff8a61d3d5b67161a8 (
plain)
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
|
using System;
public class PlotMenuItem
{
private EventHandler callback_;
static int set;
public PlotMenuItem ()
{
}
public PlotMenuItem (EventHandler callback)
{
callback_ = callback;
PlotMenuItem child = new PlotMenuItem ();
child.Callback += new EventHandler (callback);
}
public static int Main ()
{
PlotMenuItem pmi = new PlotMenuItem (new EventHandler (MenuItem_Click));
pmi.Callback (null, null);
if (set != 999)
return 1;
return 0;
}
static void MenuItem_Click (object sender, EventArgs e)
{
set = 999;
}
public EventHandler Callback {
get { return callback_; }
set { callback_ = value; }
}
}
|