static void Main()
        {
            // Create listeners
            ActionListener angel = new ActionListener("Angel");
            ActionListener devil = new ActionListener("Devil");

            // Create Button and attach listeners
            Button button = new Button("Click Me");
            button.Attach(angel);
            button.Attach(devil);

            // Simulate clicks on button
            button.Push(1, 3);
            button.Push(5, 4);
            button.Push(8, 5);

            // Wait for user
            Console.ReadKey();
        }
 public void Detach(ActionListener listener)
 {
     Click -= listener.Update;
 }
Example #3
0
 public void Detach(ActionListener listener)
 {
     Click -= listener.Update;
 }
 public void Attach(ActionListener listener)
 {
     Click += listener.Update;
 }
Example #5
0
 public void Attach(ActionListener listener)
 {
     Click += listener.Update;
 }