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);
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        public static Font GetTemplateFont(string Name)
        {
            globalTemplate gt = globalTemplates.Find((temp) => temp.Name == Name);

            if (gt != null)
            {
                return(gt.Font);
            }
            else
            {
                return(DefaultFont);
            }
        }
Ejemplo n.º 5
0
        public static Color GetTemplateForeColor(string Name)
        {
            globalTemplate gt = globalTemplates.Find((temp) => temp.Name == Name);

            if (gt != null)
            {
                return(gt.ForeColor);
            }
            else
            {
                return(DefaultColor);
            }
        }
Ejemplo n.º 6
0
        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;
            }
        }