예제 #1
0
        public static int LoadStringsFile(string filePath)
        {
            if (!File.Exists(filePath))
            {
                File.WriteAllBytes(filePath, Properties.Resources.strings);
            }

            int         v = 0;
            int         h;
            XmlDocument doc = new XmlDocument();

            doc.Load(filePath);
            foreach (XmlElement e in doc.GetElementsByTagName("Item"))
            {
                int i = XH.GetXmlInt(e, "idx", -1);
                if (i >= 0)
                {
                    for (h = gstr.Count; h <= i; h++)
                    {
                        gstr.Add(string.Empty);
                    }
                    gstr[i] = XH.GetXmlString(e, "val", "");
                    v++;
                }
            }

            RawVersionNumber = "11, Build 4";
            ShortVersionText = "GCal " + RawVersionNumber;
            FullVersionText  = "Gaurabda Calendar " + RawVersionNumber;

            return(v);
        }
예제 #2
0
 public void LoadFromNode(XmlElement e)
 {
     Type  = XH.GetXmlInt(e, "Type", 0);
     Week  = XH.GetXmlInt(e, "Week", 0);
     Month = XH.GetXmlInt(e, "Month", 0);
     Day   = XH.GetXmlInt(e, "Day", 0);
 }
예제 #3
0
 public void LoadFromNode(XmlElement e)
 {
     Name          = XH.GetXmlString(e, "Name", "(Unknown)");
     OffsetMinutes = XH.GetXmlInt(e, "Offset", 0);
     BiasMinutes   = XH.GetXmlInt(e, "Bias", 0);
     StartDst.LoadFromNode(e["StartDst"]);
     EndDst.LoadFromNode(e["EndDst"]);
 }
예제 #4
0
 public void LoadFromNode(XmlElement e)
 {
     GeonameID        = XH.GetXmlInt(e, "ID", -1);
     CityName         = XH.GetXmlString(e, "Name", "");
     ASCIIName        = XH.GetXmlString(e, "AS", "");
     AlternativeNames = XH.GetXmlString(e, "Alt", "");
     Latitude         = XH.GetXmlDouble(e, "Y", 0);
     Longitude        = XH.GetXmlDouble(e, "X", 0);
     Elevation        = XH.GetXmlDouble(e, "Z", 0);
     CountryISOCode   = XH.GetXmlString(e, "Cnt", "");
     Population       = XH.GetXmlInt(e, "P", 0);
     TimeZoneName     = XH.GetXmlString(e, "TZ", "Undefined");
 }