예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        public XWPFieldMask(string Mask, XWPFieldMaskType MaskType)
        {
            _mask = Mask;

            _maskType = MaskType;
        }
예제 #4
0
 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;
     }
 }