Exemplo n.º 1
0
        public static void SaveConfigs(List <OidObj> vals)
        {
            string info     = SerialiazeHelper.XmlSerialiaze <List <OidObj> >(vals, Encoding.UTF8);
            string filePath = Path.Combine(Application.StartupPath, "Config.xml");

            FileHelper.WriteToTxt(filePath, info, Encoding.UTF8, true);
        }
Exemplo n.º 2
0
        public static List <OidObj> LoadConfigs()
        {
            string filePath = Path.Combine(Application.StartupPath, "Config.xml");

            if (File.Exists(filePath))
            {
                string        info = FileHelper.TxtReader(filePath, Encoding.UTF8);
                List <OidObj> oids = SerialiazeHelper.XmlDeserialize <List <OidObj> >(info);
                return(oids);
            }
            return(null);
        }