public static DevExpress.Utils.FormatType GetFormatType(XWPFieldMaskType MaskType) { switch (MaskType) { case XWPFieldMaskType.Numeric: return DevExpress.Utils.FormatType.Numeric; case XWPFieldMaskType.Date: return DevExpress.Utils.FormatType.DateTime; case XWPFieldMaskType.RegEx: return DevExpress.Utils.FormatType.Custom; } return DevExpress.Utils.FormatType.None; }
public static DevExpress.XtraEditors.Mask.MaskType ConvertMaskType(XWPFieldMaskType MaskType) { switch (MaskType) { case XWPFieldMaskType.Numeric: return DevExpress.XtraEditors.Mask.MaskType.Numeric; case XWPFieldMaskType.Date: return DevExpress.XtraEditors.Mask.MaskType.DateTime; case XWPFieldMaskType.RegEx: return DevExpress.XtraEditors.Mask.MaskType.RegEx; } return DevExpress.XtraEditors.Mask.MaskType.None; }
public XWPFieldMask(string Mask, XWPFieldMaskType MaskType) { _mask = Mask; _maskType = MaskType; }
private static string FormatMaskType(XWPFieldMaskType MaskType) { switch (MaskType) { case XWPFieldMaskType.RegEx: return "r:"; case XWPFieldMaskType.Numeric: return "n:"; case XWPFieldMaskType.Date: return "d:"; default: return null; } }