public static FullScreenConfigBO getFullScreenConfigBO() { FullScreenConfigBO fBO = new FullScreenConfigBO(); bool isImg = InIHelper.ReadConfig <bool>(fBO.key, "isImg"); fBO.isImg = isImg; string backgroundColor = InIHelper.ReadConfig <string>(fBO.key, "backgroundColor"); if (backgroundColor != null && backgroundColor != "") { fBO.backgroundColor = ColorTranslator.FromHtml(backgroundColor); } string backgroundImg = InIHelper.ReadConfig <string>(fBO.key, "backgroundImg"); if (File.Exists(backgroundImg)) { fBO.backgroundImg = backgroundImg; } string transparency = InIHelper.ReadConfig <string>(fBO.key, "transparency"); if (transparency != null && transparency != "") { fBO.transparency = Int32.Parse(transparency); } fBO.offTaskManager = InIHelper.ReadConfig <bool>(fBO.key, "offTaskManager"); return(fBO); }
public static bool setFullScreenConfigBO(FullScreenConfigBO fBO) { try { InIHelper.WriteConfig(fBO.key, "isImg", fBO.isImg.ToString()); InIHelper.WriteConfig(fBO.key, "backgroundColor", ColorTranslator.ToHtml(fBO.backgroundColor)); InIHelper.WriteConfig(fBO.key, "backgroundImg", fBO.backgroundImg); InIHelper.WriteConfig(fBO.key, "transparency", fBO.transparency.ToString()); InIHelper.WriteConfig(fBO.key, "offTaskManager", fBO.offTaskManager.ToString()); return(true); } catch { return(false); } }