private void UpdatePersons()
 {
     if (QDPersons.List.Count == 0)
     {
         QDPersons = personSerializer.DeserializeFromXML() as QDChatPersons;
     }
     QDPersons.ReadFromChatList(QDChat);
     PersonTable.Fill(QDPersons);
     personSerializer.SerializeToXML();
 }
/*        public QDChatDataTable Copy()
 *      {
 *
 *      }
 */
        public void FillFromChatByPerson(QDChatList qdchat, QDChatPersons qdpersons)
        {
            if (this.Columns.Count < 1)
            {
                this.Init();
            }
            this.Clear();
            foreach (QDChatLine chatline in qdchat)
            {
                if (chatline.receiverid == qdpersons.Selected.id || chatline.senderid == qdpersons.Selected.id)
                {
                    DataRow workRow = this.NewRow();
                    workRow["Date"]      = chatline.timestamp.ToString();
                    workRow["Direction"] = ((chatline.chatdirection == 1) ? "OUT" : "IN");
                    workRow["Chat"]      = chatline.chattext;
                    this.Rows.Add(workRow);
                }
            }
        }
Example #3
0
 public void Fill(QDChatPersons qdpersons)
 {
     if (Columns.Count < 1)
     {
         Init();
     }
     Clear();
     foreach (QDChatPerson person in qdpersons.List)
     {
         DataRow personRow = NewRow();
         if (!person.isMe)
         {
             personRow["ID"]          = person.id;
             personRow["Name"]        = person.name;
             personRow["1stContact"]  = person.firstAppearance;
             personRow["LastContact"] = person.lastAppearance;
             personRow["Count"]       = person.count;
             personRow["Lines"]       = person.numberOfLines;
             Rows.Add(personRow);
         }
     }
 }