Ejemplo n.º 1
0
        //----------------------------------------------------------------------

        private static TeConfig loadConfig(String cfgPath)
        {
            String   str = string.Empty;
            TeConfig tec = null;

            try
            {
                str = file.Read(cfgPath, true);
                tec = JSON.ToObject <TeConfig>(str);
            }
            catch (FileNotFoundException ex)
            {
                tec = new TeConfig();
                file.Write(cfgPath, Json.ToStringEx(tec));
            }
            return(tec);
        }
Ejemplo n.º 2
0
        public static void SetTemplate(String CurrentSkin, String PageSuffix)
        {
            string   cfgPath = getConfigPath();
            String   str     = string.Empty;
            TeConfig tec     = null;

            try
            {
                str = file.Read(cfgPath, true);
                tec = JSON.ToObject <TeConfig>(str);
            }
            catch (FileNotFoundException ex)
            {
                tec = new TeConfig();
            }
            tec.PageSuffix  = PageSuffix;
            tec.CurrentSkin = CurrentSkin;
            Instance        = tec;
            file.Write(cfgPath, Json.ToStringEx(tec));
        }
Ejemplo n.º 3
0
 public static void SetTemplate(String CurrentSkin, String PageSuffix)
 {
     string cfgPath = getConfigPath();
     String str = string.Empty;
     TeConfig tec = null;
     try
     {
         str = file.Read(cfgPath, true);
         tec = JSON.ToObject<TeConfig>(str);
     }
     catch (FileNotFoundException ex)
     {
         tec = new TeConfig();
     }
     tec.PageSuffix = PageSuffix;
     tec.CurrentSkin = CurrentSkin;
     Instance = tec;
     file.Write(cfgPath, Json.ToStringEx(tec));
 }
Ejemplo n.º 4
0
        //----------------------------------------------------------------------

        private static TeConfig loadConfig( String cfgPath ) {

            String str = string.Empty;
            TeConfig tec = null;
            try
            {
                str = file.Read(cfgPath, true);
                tec = JSON.ToObject<TeConfig>(str);
            }
            catch (FileNotFoundException ex)
            {
                tec = new TeConfig();
                file.Write(cfgPath, Json.ToStringEx(tec));
            }
            return tec;
        }