コード例 #1
0
 protected virtual void MessageHandler(Utility.IComponent sender, Utility.Messages.ModificaCampoSchedaMessageEventArgs e)
 {
     foreach (Utility.IComponent c in _components)
     {
         if (c is GestoreSchedeMaster)
         {
             c.Input(e);
         }
     }
 }
コード例 #2
0
 protected virtual void MessageHandler(Utility.IComponent sender, Utility.Messages.NomeAggiornatoMessageEventArgs e)
 {
     foreach (Utility.IComponent c in _components)
     {
         if (c is MySocket)
         {
             c.Input(e);
         }
     }
 }
コード例 #3
0
 protected virtual void MessageHandler(Utility.IComponent sender, GestoreGiocatoriMessageEventArgs e)
 {
     foreach (Utility.IComponent c in GetComponentsByType(typeof(MySocket)))
     {
         if ((c as MySocket).RemoteAddress == e.Argomento)
         {
             c.Input(e.Messaggio);
         }
     }
 }
コード例 #4
0
 protected override void MessageHandler(Utility.IComponent sender, ChatComuneMessageEventArgs e)
 {
     foreach (Utility.IComponent c in _components)
     {
         if (c is MySocket || c is ChatComune)
         {
             c.Input(e);
         }
     }
 }
コード例 #5
0
 protected virtual void MessageHandler(Utility.IComponent sender, GiocatoreKickedMessageEventArgs e)
 {
     Utility.MySocket toRemove = null;
     foreach (Utility.IComponent c in _components)
     {
         if (c is MySocket && (c as MySocket).RemoteAddress == e.Argomento)
         {
             toRemove = (c as MySocket);
             if (sender is GestoreSchedeMaster)
             {
                 this.MessageForwarder(sender, new ChatComuneMessageEventArgs("Il giocatore " + (sender as GestoreSchedeMaster).getNomeGiocatore(e.Argomento) + " è stato espulso"));
             }
         }
     }
     toRemove.Dispose();
     _components.Remove(toRemove);
 }