Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #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));
 }
Beispiel #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;
        }