APCGC_CBS.Common/ValidateCode.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Text;

namespace APCGC_CBS.Common
{
    public class ValidateCode
    {
        /// <summary>
        /// 生成验证码图片
        /// </summary>
        /// <param name="validateCode"></param>
        /// <param name="codeWidth"></param>
        /// <param name="codeHeight"></param>
        /// <param name="fontSize"></param>
        /// <returns></returns>
        public byte[] CreateValidateGraphic(int vCodeLen, int codeWidth, int codeHeight, int fontSize, ImageFormat imgFormat, ref string validateCode)
        {
            string chkCode = string.Empty;
            Color[] color = new Color[]
            {
                Color.Black,
                Color.Red,
                Color.Blue,
                Color.Green,
                Color.Orange,
                Color.Brown,
                Color.Brown,
                Color.DarkBlue
            };
            string[] font = new string[]
            {
                "Times New Roman",
                "Verdana",
                "Arial",
                "Gungsuh",
                "Impact"
            };
            char[] character = new char[]
            {
                '2',
                '3',
                '4',
                '5',
                '6',
                '8',
                '9',
                'a',
                'b',
                'd',
                'e',
                'f',
                'h',
                'k',
                'm',
                'n',
                'r',
后面还有 70 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。