public void ReadXml(XmlReader reader) { if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Event") { _Id = reader["Id"]; _Title = reader["Title"]; _Location = reader["Location"]; _Start = DateTime.FromBinary(Int64.Parse(reader["Start"])); _Stop = DateTime.FromBinary(Int64.Parse(reader["Stop"])); _Url = reader["Url"]; _Status = (GventStatus)Int32.Parse(reader["Status"]); if (reader.ReadToDescendant("Reminder")) { while ((reader.MoveToContent() == XmlNodeType.Element) && (reader.LocalName == "Reminder")) { var minder = new GVentMinder(); minder.ReadXml(reader); Add(minder); } } reader.Read(); } }
public void Remove(GVentMinder minder) { if (!_Minders.Contains(minder)) { return; } _Minders.Remove(minder); NotifyChange(new GventEventArgs(this, GventChanges.DeletedReminder)); }
public void Add(GVentMinder minder) { if (_Minders.Contains(minder)) { return; } minder.Gvent = this; _Minders.Add(minder); minder.Processed = true; NotifyChange(new GventEventArgs(this, GventChanges.AddedReminder)); }