static void ApplyStyle(Control C, Layer03_Common.Str_Style? Style) { if (Style == null) { return; } Layer03_Common.Str_Style Inner_Style = Style.Value; if (C.Controls.Count > 0) { UcBase_Ex.ApplyStyle(C, Style); } if (C is TextBox) { C.Font = Inner_Style.Font; C.ForeColor = Inner_Style.Color; } }
public static Boolean ValidateField( ref List<Str_ValidationItem> ValidationItems , String Name , Layer03_Common.Str_Style? Style_Normal , Layer03_Common.Str_Style? Style_Invalid , Boolean IsValid , String InvalidMsg) { Str_ValidationItem Vi = new Str_ValidationItem(); Vi.Name = Name; Vi.IsValid = IsValid; if (IsValid) { Vi.Style = Style_Normal; } else { Vi.Style = Style_Invalid; Vi.InvalidMsg = InvalidMsg; } ValidationItems.Add(Vi); return IsValid; }