public DataRow MessageToDataRow(Message m)
        {
            DataRow dr = dtMessages.NewRow();

            dr["cbid"]    = m.GetID();
            dr["sender"]  = m.GetSender().GetUid();
            dr["message"] = m.GetMessage();
            dr["private"] = m.IsPrivate();
            dr["heure"]   = (m.GetTimestamp() / 1000);
            dr["channel"] = m.GetChannel();

            if (m.GetRecipient() != null)
            {
                dr["recipient"] = m.GetRecipient().GetUid();
            }

            return(dr);
        }
Exemple #2
0
        public void InsertMessage(string channel)
        {
            Ponybox.Message m     = client.GetMessages(channel).Last();
            string[]        items = new string[4] {
                m.GetSender().GetUsername(), m.GetMessage(), Functions.UnixTimeStampToDateTime(m.GetTimestamp()).ToString("yyy-MM-dd hh:mm:ss"), m.GetID().ToString()
            };
            ListViewItem lvi = new ListViewItem(items);

            channels[channel].Invoke((MethodInvoker) delegate
            {
                channels[channel].Items.Add(lvi);
            });
        }
Exemple #3
0
 public void GetOlderMessages(string channelName, Message lastMessage)
 {
     GetOlderMessages(channelName, lastMessage.GetID());
 }