code.aspx.cs

(开头部分) 3KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.Data.SqlClient;
using System.IO;
public partial class front_code : System.Web.UI.Page
{
    private const double ImageLengthbase = 12.5;
    private const int ImageHeight = 22;
    private const int ImageLineNumber = 25;
    private const int ImagePointNumber = 100;
    public static string ValidateKey = "ValidateKey";
    private int length = 3;
    private string code = string.Empty;
    public int Length
    {
        get { return length; }
        set { length = value; }
    }
    public string Code
    {
        get { return code; }
    }
    public string CreateCode(int length)
    {
        if (length <= 0) return string.Empty;
        int number;
        char checkcode;
        Random random = new Random();

        for (int i = 0; i < length; i++)
        {
            number = random.Next();

       
                checkcode = (char)('0' + (char)(number % 10));
         

            code += checkcode.ToString();
        }

        Session["ValidateCode"] = code;
        return code;
    }
    public void CreateValidateImage(string Code)
    {
        if (string.IsNullOrEmpty(Code) == true) return;
        Session["ValidateCode"] = Code;
        Bitmap image = new Bitmap((int)Math.Ceiling(Code.Length * ImageLengthbase), ImageHeight);
后面还有 51 行代码,购买后查看完整代码

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

AI 解读 AI

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

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