private void SaveCardSide(PaukerCardSide side, XmlElement targetElem) { if (side.LearnedTimestamp.HasValue) { var learnedTimestampAttrib = targetElem.OwnerDocument.CreateAttribute("LearnedTimestamp"); learnedTimestampAttrib.Value = side.LearnedTimestamp.Value.ToString(); targetElem.Attributes.Append(learnedTimestampAttrib); } var orientationAttrib = targetElem.OwnerDocument.CreateAttribute("Orientation"); orientationAttrib.Value = side.Orientation; targetElem.Attributes.Append(orientationAttrib); var repeatByTypingAttrib = targetElem.OwnerDocument.CreateAttribute("RepeatByTyping"); repeatByTypingAttrib.Value = side.RepeatByTyping; targetElem.Attributes.Append(repeatByTypingAttrib); var text = targetElem.OwnerDocument.CreateElement("Text"); text.InnerText = side.Text; targetElem.AppendChild(text); SaveFont(targetElem); }
public PaukerCard(PaukerCardSide front, PaukerCardSide reverse) { this.front = front ?? throw new ArgumentNullException(nameof(front)); this.reverse = reverse ?? throw new ArgumentNullException(nameof(reverse)); }