public static void RemoveListner(EventType type, MyEventDelegate function)
 {
     if (eventDictionary.ContainsKey(type) && eventDictionary[type] != null)
     {
         eventDictionary[type] -= function;
     }
 }
 public static void AddListner(EventType type, MyEventDelegate function)
 {
     if (!eventDictionary.ContainsKey(type))
     {
         eventDictionary.Add(type, null);
     }
     eventDictionary[type] += function;
 }
Esempio n. 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     MyEventDelegate med = userControlButtonClicked;
     if (med != null)
     {
         med(this, "1");
     }
 }
Esempio n. 4
0
 internal void NonPublicRemoveMethod(MyEventDelegate delegate_)
 {
 }
Esempio n. 5
0
 internal void NonPublicAddMethod(MyEventDelegate delegate_)
 {
 }
Esempio n. 6
0
 public void PublicRemoveMethod(MyEventDelegate delegate_)
 {
 }
Esempio n. 7
0
 // ReSharper disable UnusedParameter.Local
 public void PublicAddMethod(MyEventDelegate delegate_)
 {
 }