Esempio n. 1
0
 public IChatroom joinTopic(string topic)
 {
     if(topicsChatRoom.Contains(topic))
     {
         TextChatRoom cr = new TextChatRoom(topic);
         if( (topicsChatRoom[topic] != null) && (topicsChatRoom[topic] is List<IChatroom>))
         {
             List<IChatroom> l = (List<IChatroom>) topicsChatRoom[topic];
             l.Add(cr);
         }
         return cr;
     }
     else
     {
         Console.WriteLine("Topic non existant");
         return null;
     }
 }
Esempio n. 2
0
 public ServerChatRoom(IPAddress Ip, String topicName)
     : base(Ip)
 {
     concretCR = new TextChatRoom(topicName);
 }