Пример #1
0
 public override void addElement(UIElement element)
 {
     if (element is ToggleButton)
     {
         ToggleButton t = (ToggleButton)element;
         if (t.Name == "ready")
         {
             t.ToggleEvent += new EventHandler<LessThanOk.UI.Events.ToggleEventArgs>(FireReadyEvent);
         }
     }
     base.addElement(element);
 }
Пример #2
0
 public override void addElement(UIElement element)
 {
     if (element is Button)
     {
         Button b = (Button)element;
         if (b.Name == "create")
         {
             b.ButtonClickedEvent += new EventHandler<ButtonEventArgs>(FireCreateEvent);
         }
         else if (element.Name == "join")
         {
             b.ButtonClickedEvent += new EventHandler<ButtonEventArgs>(FireJoinEvent);
         }
         else if (element.Name == "replay")
         {
             b.ButtonClickedEvent += new EventHandler<ButtonEventArgs>(FireReplayEvent);
         }
     }
     base.addElement(element);
 }