示例#1
0
文件: TCountry.cs 项目: tzmt/GCAL-NET
 public void SaveToNode(XmlElement e)
 {
     e.SetAttribute("ISO", ISOCode);
     e.SetAttribute("ISO3", ISO3Code);
     e.SetAttribute("Fips", Fips);
     e.SetAttribute("Name", Name);
     e.SetAttribute("Capital", Capital);
     e.SetAttribute("Area", Area.ToString());
     e.SetAttribute("Population", Population.ToString());
     e.SetAttribute("ContinentISOCode", ContinentISOCode);
     e.SetAttribute("Neighbours", Neighbours);
     e.SetAttribute("FirstDayOfWeek", FirstDayOfWeek.ToString());
 }
示例#2
0
    public override string ToString()
    {
        var day       = FirstDayOfWeek != LastDayOfWeek ? FirstDayOfWeek + "-" + LastDayOfWeek : FirstDayOfWeek.ToString();
        var timeRange = OpenTime != CloseTime ? OpenTime + "-" + CloseTime : "-";

        return(day + " " + timeRange);
    }