Esempio n. 1
0
 private void _10()
 {
     //Action registration
     MyAction += new MyActionEventHandler(OnMyAction);
     if (MyAction != null)
     {
         //Action call
         MyActionEventArgs ea = new MyActionEventArgs(true, "test");
         MyAction(this, ea);
     }
 }
Esempio n. 2
0
 //Action method
 protected void OnMyAction(object sender, MyActionEventArgs ev)
 {
     Console.WriteLine("Action: cancel {0}, message {1}", ev.Cancel, ev.Message);
 }