Exemplo n.º 1
0
 /// <summary>
 /// Print the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 /// <param name="objCulture">Culture in which to print.</param>
 /// <param name="strLanguageToPrint">Language in which to print</param>
 public void Print(XmlTextWriter objWriter, CultureInfo objCulture, string strLanguageToPrint)
 {
     objWriter.WriteStartElement("power");
     objWriter.WriteElementString("name", DisplayNameShort(strLanguageToPrint));
     objWriter.WriteElementString("fullname", DisplayName);
     objWriter.WriteElementString("extra", LanguageManager.TranslateExtra(Extra, strLanguageToPrint));
     objWriter.WriteElementString("pointsperlevel", PointsPerLevel.ToString(objCulture));
     objWriter.WriteElementString("adeptway", AdeptWayDiscount.ToString(objCulture));
     objWriter.WriteElementString("rating", LevelsEnabled ? TotalRating.ToString(objCulture) : "0");
     objWriter.WriteElementString("totalpoints", PowerPoints.ToString(objCulture));
     objWriter.WriteElementString("action", DisplayActionMethod(strLanguageToPrint));
     objWriter.WriteElementString("source", CommonFunctions.LanguageBookShort(Source, strLanguageToPrint));
     objWriter.WriteElementString("page", DisplayPage(strLanguageToPrint));
     if (CharacterObject.Options.PrintNotes)
     {
         objWriter.WriteElementString("notes", Notes);
     }
     objWriter.WriteStartElement("enhancements");
     foreach (Enhancement objEnhancement in Enhancements)
     {
         objEnhancement.Print(objWriter, strLanguageToPrint);
     }
     objWriter.WriteEndElement();
     objWriter.WriteEndElement();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Print the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 public void Print(XmlTextWriter objWriter)
 {
     objWriter.WriteStartElement("power");
     objWriter.WriteElementString("name", DisplayNameShort);
     objWriter.WriteElementString("extra", LanguageManager.Instance.TranslateExtra(Extra));
     objWriter.WriteElementString("pointsperlevel", PointsPerLevel.ToString());
     objWriter.WriteElementString("adeptway", AdeptWayDiscount.ToString());
     objWriter.WriteElementString("rating", LevelsEnabled ? Rating.ToString() : "0");
     objWriter.WriteElementString("totalpoints", PowerPoints.ToString());
     objWriter.WriteElementString("action", DisplayAction);
     objWriter.WriteElementString("source", CharacterObject.Options.LanguageBookShort(_strSource));
     objWriter.WriteElementString("page", Page);
     if (CharacterObject.Options.PrintNotes)
     {
         objWriter.WriteElementString("notes", _strNotes);
     }
     objWriter.WriteStartElement("enhancements");
     foreach (Enhancement objEnhancement in Enhancements)
     {
         objEnhancement.Print(objWriter);
     }
     objWriter.WriteEndElement();
     objWriter.WriteEndElement();
 }