Exemple #1
0
 public void SendBroadcastToTargetUserControl(BroadcastMessage message, params string[] targetTags)
 {
     foreach (BaseLayoutItem item in RootLayoutGroup.Items.Where(x => targetTags.Contains(x.Name)))
     {
         LayoutControlItem    controlitem = item as LayoutControlItem;
         IUserControlReceiver receiver    = controlitem.Control as IUserControlReceiver;
         if (receiver != null)
         {
             receiver.RespondBroadcast(message);
         }
     }
 }
Exemple #2
0
 public void SendBroadcastToAllUserControl(BroadcastMessage message)
 {
     foreach (BaseLayoutItem item in RootLayoutGroup.Items)
     {
         LayoutControlItem    controlitem = item as LayoutControlItem;
         IUserControlReceiver receiver    = controlitem.Control as IUserControlReceiver;
         if (receiver != null)
         {
             receiver.RespondBroadcast(message);
         }
     }
 }