public void addSelfMessage(DateTime time, String value, String category) { XmlElement message = xmlDoc.CreateElement("Message"); message.SetAttribute("index", CountMessages.ToString()); message.SetAttribute("time", DateTime.Now + ""); message.SetAttribute("self", "true"); message.SetAttribute("category", category); message.InnerText = value; fetchRootOfMessages().AppendChild(message); CountMessages++; xmlDoc.Save(path); }
public void addMessage(DateTime time, String value, String category) { XmlElement message = xmlDoc.CreateElement("Message"); message.SetAttribute("index", CountMessages.ToString()); message.SetAttribute("time", DateTime.Now + ""); message.SetAttribute("self", "false"); message.SetAttribute("category", category); message.InnerText = value; fetchRootOfMessages().AppendChild(message); lastMessage.time = time; lastMessage.index = CountMessages; lastMessage.value = value; CountMessages++; UnreadMessages++; }