示例#1
0
        public static bool Check25W(string mapnumber25W)
        {
            if (string.IsNullOrEmpty(mapnumber25W) || !mapnumber25W.Contains("-") || !mapnumber25W.Contains("[") || !mapnumber25W.Contains("]"))
            {
                return(false);
            }
            string[] split = mapnumber25W.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries);
            if (split.Length != 3 || !Mapnumber100W.ValidateRowNum(split[0]) || !Mapnumber100W.ValidateColumnNum(split[1]))
            {
                return(false);
            }
            string k = split[2];

            string[] subSplit = k.Split(new char[] { '[', ']' }, StringSplitOptions.RemoveEmptyEntries);
            int      len      = subSplit.Length;

            if (len != 1)
            {
                return(false);
            }
            int sum = OldMapnumber.SumCount(OldMapnumberDefine.MaxCount25W);

            string[] strs = OldMapnumber.AllAllowedNums(sum);
            return(MapnumberCommon.Contain(strs, subSplit[0]));
        }
示例#2
0
 public static bool Check50W(string mapnumber50W)
 {
     if (string.IsNullOrEmpty(mapnumber50W) || !mapnumber50W.Contains("-"))
     {
         return(false);
     }
     string[] split = mapnumber50W.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries);
     return(split.Length == 3 && Mapnumber100W.ValidateRowNum(split[0]) && Mapnumber100W.ValidateColumnNum(split[1]) && Contain(OldMapnumberDefine.ABCD, split[2]));
 }