Esempio n. 1
0
        public static List <Tuple <int, int> > LoadSetr(int mouduleid)
        {
            var data = XmlReadSave.ReadFromConfig(mouduleid + "");
            var rtn  = new List <Tuple <int, int> >();

            foreach (var f in data)
            {
                int xkey   = 0;
                int xvalue = 0;
                if (Int32.TryParse(f.Key, out xkey) && Int32.TryParse(f.Value, out xvalue))
                {
                    rtn.Add(new Tuple <int, int>(xkey, xvalue));
                }
            }
            return(rtn);
        }
Esempio n. 2
0
        private static void LoadSetpri(int mouduleid)
        {
            if (Data.ContainsKey(mouduleid) == false)
            {
                Data.Add(mouduleid, new Dictionary <int, string>());
            }

            var data = XmlReadSave.ReadFromConfig(mouduleid + "");

            foreach (var f in data)
            {
                int xkey = 0;
                if (Int32.TryParse(f.Key, out xkey) && Data[mouduleid].ContainsKey(xkey) == false)
                {
                    Data[mouduleid].Add(xkey, f.Value);
                }
            }
        }
Esempio n. 3
0
        public static List <Tuple <int, string> > LoadSets(int mouduleid)
        {
            var data = XmlReadSave.ReadFromConfig(mouduleid + "");
            var rtn  = new List <Tuple <int, string> >();

            foreach (var f in data)
            {
                int xkey   = 0;
                int xvalue = 0;
                if (Int32.TryParse(f.Key, out xkey) && string.IsNullOrEmpty(f.Value) == false)
                {
                    // if (string.IsNullOrEmpty(f.Value) == false && Int32.TryParse(f.Value, out xvalue) == false)
                    {
                        rtn.Add(new Tuple <int, string>(xkey, f.Value.Trim()));
                    }
                }
            }
            return(rtn);
        }