//---------------------------------------------------------------------- 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); }
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)); }
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)); }
//---------------------------------------------------------------------- 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; }