Пример #1
0
      public RelayChat(string message, int chatWindow)
         : base("RelayChat", false, 0)
      {
         Message = new Message(message);
         ChatWindow = new ChatWindow(chatWindow);

         m_objectList.Add(Message);
         m_objectList.Add(ChatWindow);
      }
Пример #2
0
      public PmSend(int userId, string message)
         : base("PmSend", false, 0)
      {
         UserId = new UserId(userId);
         Message = new Message(message);

         m_objectList.Add(UserId);
         m_objectList.Add(Message);
      }
Пример #3
0
 protected override void ProcessObjectList()
 {
    foreach (HotlineObject obj in m_objectList)
    {
       if (obj.GetType() == typeof(Message))
          m_message = obj as Message;
       else
          s_log.ErrorFormat("Unexpected object: {0}", obj.GetType().ToString());
    }
 }
Пример #4
0
      public PmReceive(int userId, string nick, string message)
         : base("PmReceive", false, 0)
      {
         UserId = new UserId(userId);
         Nick = new Nick(nick);
         Message = new Message(message);

         m_objectList.Add(UserId);
         m_objectList.Add(Nick);
         m_objectList.Add(Message);
      }
Пример #5
0
 protected override void ProcessObjectList()
 {
    foreach (HotlineObject obj in m_objectList)
    {
       if (obj.GetType() == typeof(Message))
          Message = obj as Message;
       else if (obj.GetType() == typeof(ChatWindow))
          ChatWindow = obj as ChatWindow;
       else if (obj.GetType() == typeof(Parameter))
          Parameter = obj as Parameter;
       else
          s_log.ErrorFormat("Unexpected object: {0}", obj.GetType().ToString());
    }
 }
Пример #6
0
      public SendChat(string message, int? chatWindow, bool emote)
         : base("SendChat", false, 0)
      {
         // Message -- the text to be sent.
         Message = new Message(message);
         m_objectList.Add(Message);
         
         // Emote flag -- if the text is an emote.
         if (emote)
            Parameter = new Parameter(1);
         else
            Parameter = new Parameter(0);
         m_objectList.Add(Parameter);

         // Optional chat window number.
         if (chatWindow != null)
         {
            ChatWindow = new ChatWindow(chatWindow.Value);
            m_objectList.Add(ChatWindow);
         }
      }
Пример #7
0
 public Disconnected(int taskNumber, string message)
    : base("Disconnected", false, 0)
 {
    m_message = new Message(message);
    m_objectList.Add(m_message);
 }