示例#1
0
 public string GenerateCode(VerifyBuilder builder, out Bitmap image)
 {
     string str = "";
     var random = new Random((int) DateTime.Now.Ticks);
     string[] strArray = CodeSerial.Split(new[] {','});
     for (int i = 0; i < Length; i++)
     {
         int index = random.Next(0, strArray.Length - 1);
         str = str + strArray[index];
     }
     image = builder.Build(str);
     return str;
 }
示例#2
0
        public string GenerateCode(VerifyBuilder builder, out Bitmap image)
        {
            string str    = "";
            var    random = new Random((int)DateTime.Now.Ticks);

            string[] strArray = CodeSerial.Split(new[] { ',' });
            for (int i = 0; i < Length; i++)
            {
                int index = random.Next(0, strArray.Length - 1);
                str = str + strArray[index];
            }
            image = builder.Build(str);
            return(str);
        }