private void InitColor() { INIClass ini = new INIClass(Util.INI_FILE); string iniBackColor = ini.IniReadValue("SKIN_COLOR", "BACKCOLOR"); if (!string.IsNullOrEmpty(iniBackColor)) { _backColor = Color.FromName(iniBackColor); } string iniBaseColor = ini.IniReadValue("SKIN_COLOR", "BASECOLOR"); if (!string.IsNullOrEmpty(iniBaseColor)) { _baseColor = Color.FromName(iniBaseColor); } string iniBorderColor = ini.IniReadValue("SKIN_COLOR", "BORDERCOLOR"); if (!string.IsNullOrEmpty(iniBorderColor)) { _borderColor = Color.FromName(iniBorderColor); } }
public static void LoadDefaultColor(bool isdef) { INIClass ini = new INIClass(Util.INI_FILE); if (isdef) { ALTERNATING_BACKCOLOR = Color.LightGoldenrodYellow; BACKCOLOR = Color.LightGoldenrodYellow; BASECOLOR = Color.Khaki; BORDERCOLOR = Color.DarkKhaki; ITEMCOLOR_CREATE = Color.Black; ITEMCOLOR_PMC = Color.DeepSkyBlue; ITEMCOLOR_PRODUCT = Color.RoyalBlue; ITEMCOLOR_AUDIT = Color.Green; ITEMCOLOR_CANCELLED = Color.DarkGoldenrod; ITEMCOLOR_COMPLETE = Color.DarkGray; URGENTCOLOR_TODAYCOMPLETE = Color.Red; URGENTCOLOR_TOMORROWCOMPLETE = Color.Orange; SHOW_MAIN_TOOLBAR = true; Util.language = "1"; } else { string language = ini.IniReadValue("LANGUAGE", "LANGUAGE"); if (!string.IsNullOrEmpty(language)) { Util.language = language; } string iniAlterColor = ini.IniReadValue("SKIN_COLOR", "ALTERNATING_BACKCOLOR"); if (!string.IsNullOrEmpty(iniAlterColor)) { ALTERNATING_BACKCOLOR = Color.FromName(iniAlterColor); } string iniBackColor = ini.IniReadValue("SKIN_COLOR", "BACKCOLOR"); if (!string.IsNullOrEmpty(iniBackColor)) { BACKCOLOR = Color.FromName(iniBackColor); } string iniBaseColor = ini.IniReadValue("SKIN_COLOR", "BASECOLOR"); if (!string.IsNullOrEmpty(iniBaseColor)) { BASECOLOR = Color.FromName(iniBaseColor); } string iniBorderColor = ini.IniReadValue("SKIN_COLOR", "BORDERCOLOR"); if (!string.IsNullOrEmpty(iniBorderColor)) { BORDERCOLOR = Color.FromName(iniBorderColor); } string iniShowToolBar = ini.IniReadValue("MAIN_FORM", "SHOW_TOOLBAR"); if (string.IsNullOrEmpty(iniShowToolBar) || iniShowToolBar.CompareTo("1") == 0) { SHOW_MAIN_TOOLBAR = true; } else { SHOW_MAIN_TOOLBAR = false; } ITEMCOLOR_CREATE = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_CREATE")); ITEMCOLOR_PMC = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_PMC")); ITEMCOLOR_PRODUCT = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_PRODUCT")); ITEMCOLOR_AUDIT = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_AUDIT")); ITEMCOLOR_CANCELLED = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_CANCELLED")); ITEMCOLOR_COMPLETE = Color.FromName(clsLxms.GetParameterValue("ITEMCOLOR_COMPLETE")); URGENTCOLOR_TODAYCOMPLETE = ConvertColor(clsLxms.GetParameterValue("URGENTCOLOR_TODAYCOMPLETE"), Color.Red); URGENTCOLOR_TOMORROWCOMPLETE = ConvertColor(clsLxms.GetParameterValue("URGENTCOLOR_TOMORROWCOMPLETE"), Color.Orange); } }