Exemplo n.º 1
0
        /// <summary>
        /// 填充时间标识符数组
        /// </summary>
        private static void FillTimeFLag()
        {
            int timeLength = 366 * 24 * 60;

            char[] src = "ABCDEFGHJKLMNPQRSTWXY23456789".ToCharArray();//减除不易识读的:I,O,U,V,Z,0,1
            _timeFlag = new List <string>(timeLength);
            Gean.Math.Permutations <char> permut = new Gean.Math.Permutations <char>(src, 4);
            int i = 0;

            foreach (char[] charArray in permut)
            {
                if (i >= timeLength)
                {
                    return;
                }
                StringBuilder sb = new StringBuilder();
                foreach (char c in charArray)
                {
                    sb.Append(c);
                }
                _timeFlag.Add(sb.ToString());
                i++;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 填充时间标识符数组
 /// </summary>
 private static void FillTimeFLag()
 {
     int timeLength = 366 * 24 * 60;
     char[] src = "ABCDEFGHJKLMNPQRSTWXY23456789".ToCharArray();//减除不易识读的:I,O,U,V,Z,0,1
     _timeFlag = new List<string>(timeLength);
     Gean.Math.Permutations<char> permut = new Gean.Math.Permutations<char>(src, 4);
     int i = 0;
     foreach (char[] charArray in permut)
     {
         if (i >= timeLength) return;
         StringBuilder sb = new StringBuilder();
         foreach (char c in charArray)
         {
             sb.Append(c);
         }
         _timeFlag.Add(sb.ToString());
         i++;
     }
 }