/// <summary> /// Save the object's XML to the XmlWriter. /// </summary> /// <param name="objWriter">XmlTextWriter to write with.</param> public void Save(XmlTextWriter objWriter) { objWriter.WriteStartElement("contact"); objWriter.WriteElementString("name", _strName); objWriter.WriteElementString("role", _strRole); objWriter.WriteElementString("location", _strLocation); objWriter.WriteElementString("connection", _intConnection.ToString(GlobalOptions.InvariantCultureInfo)); objWriter.WriteElementString("loyalty", _intLoyalty.ToString(GlobalOptions.InvariantCultureInfo)); objWriter.WriteElementString("metatype", _strMetatype); objWriter.WriteElementString("sex", _strSex); objWriter.WriteElementString("age", _strAge); objWriter.WriteElementString("contacttype", _strType); objWriter.WriteElementString("preferredpayment", _strPreferredPayment); objWriter.WriteElementString("hobbiesvice", _strHobbiesVice); objWriter.WriteElementString("personallife", _strPersonalLife); objWriter.WriteElementString("type", _eContactType.ToString()); objWriter.WriteElementString("file", _strFileName); objWriter.WriteElementString("relative", _strRelativeName); objWriter.WriteElementString("notes", _strNotes); objWriter.WriteElementString("groupname", _strGroupName); objWriter.WriteElementString("colour", _objColour.ToArgb().ToString()); objWriter.WriteElementString("group", _blnIsGroup.ToString()); objWriter.WriteElementString("family", _blnFamily.ToString()); objWriter.WriteElementString("blackmail", _blnBlackmail.ToString()); objWriter.WriteElementString("free", _blnFree.ToString()); objWriter.WriteElementString("groupenabled", _blnGroupEnabled.ToString()); if (_blnReadOnly) { objWriter.WriteElementString("readonly", string.Empty); } if (_strUnique != null) { objWriter.WriteElementString("guid", _strUnique); } SaveMugshots(objWriter); /* Disabled for now because we cannot change any properties in the linked character anyway * if (LinkedCharacter?.IsSaving == false && !Program.MainForm.OpenCharacterForms.Any(x => x.CharacterObject == LinkedCharacter)) * LinkedCharacter.Save(); */ objWriter.WriteEndElement(); }
public void SetLocationOnContact() { Location = ContactExtraConfig .GetLocationFor(OrganizationId, Ministry.ToString(), ContactType.ToString(), ContactReason.ToString()); }
public SelectList ContactTypes() { return(new SelectList(new CodeValueModel().ContactTypeCodes0(), "Id", "Value", ContactType.ToString())); }
protected void AddContactKind(StringBuilder stringBuilder, ContactType contactType) { stringBuilder.AppendLine($"KIND:{contactType.ToString()}"); }
public override int GetHashCode() { return((ContactType.ToString() + Data + Description).GetHashCode()); }