public static void AddTemplate(string Name,Color ForeColor,Font Font) { globalTemplate gt = new globalTemplate(); gt.Name = Name; gt.ForeColor = ForeColor; gt.Font = Font; if (globalTemplates.FindIndex((temp) => temp.Name == Name) < 0) globalTemplates.Add(gt); }
public static void AddTemplate(string Name, Color ForeColor, Font Font) { globalTemplate gt = new globalTemplate(); gt.Name = Name; gt.ForeColor = ForeColor; gt.Font = Font; if (globalTemplates.FindIndex((temp) => temp.Name == Name) < 0) { globalTemplates.Add(gt); } }
public static void SetTemplate(Control control, string Name) { globalTemplate temp = globalTemplates.Find((gt) => gt.Name == Name); if (temp == null) { AddTemplate(Name, DefaultColor, DefaultFont); } temp = globalTemplates.Find((gt) => gt.Name == Name); control.ForeColor = temp.ForeColor; control.Font = temp.Font; }
public static Font GetTemplateFont(string Name) { globalTemplate gt = globalTemplates.Find((temp) => temp.Name == Name); if (gt != null) { return(gt.Font); } else { return(DefaultFont); } }
public static Color GetTemplateForeColor(string Name) { globalTemplate gt = globalTemplates.Find((temp) => temp.Name == Name); if (gt != null) { return(gt.ForeColor); } else { return(DefaultColor); } }
public static void ChangeTemplate(string Name, Color NeoColor, Font NeoFont) { globalTemplate gt = globalTemplates.Find((t) => t.Name == Name); if (gt == null) { AddTemplate(Name, NeoColor, NeoFont); } else { gt.ForeColor = NeoColor; gt.Font = NeoFont; } }