Exemplo n.º 1
0
 public object Create(object parent, object configContext, XmlNode section)
 {
     foreach (XmlNode curr in section.ChildNodes)
     {
         if (curr.Name == "currency")
         {
             XmlNode senior = curr["senior"];
             XmlNode junior = curr["junior"];
             RusCurrency.Register(
                 curr.Attributes["code"].InnerText,
                 (curr.Attributes["male"].InnerText == "1"),
                 senior.Attributes["one"].InnerText,
                 senior.Attributes["two"].InnerText,
                 senior.Attributes["five"].InnerText,
                 junior.Attributes["one"].InnerText,
                 junior.Attributes["two"].InnerText,
                 junior.Attributes["five"].InnerText);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Возвращает строку "столько-то баллов"
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public static string ScoreString(this int value)
 {
     return(RusCurrency.Str((double)value, "SCORE"));
 }