Hidistro.UI.Web/Installer/Activation.cs

(完整代码) 1KB

namespace Hidistro.UI.Web.Installer
{
    using System;
    using System.IO;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class Activation : Page
    {
        protected Button btnInstall;
        protected HtmlForm form1;
        protected Label lblErrMessage;
        protected HtmlInputText txtcode;

        protected void btnInstall_Click(object sender, EventArgs e)
        {
            string str = this.txtcode.Value;
            if (!string.IsNullOrEmpty(str) && this.CheckCode(str))
            {
                base.Response.Redirect("Install.aspx");
            }
            else
            {
                this.lblErrMessage.Text = "对不起,您的激活码错误!";
            }
        }

        internal bool CheckCode(string code)
        {
            if (!string.IsNullOrEmpty(code) && (code.Length == 6))
            {
                string path = HttpContext.Current.Server.MapPath("~/config/code.db3");
                try
                {
                    using (StreamReader reader = new StreamReader(path))
                    {
                        string str2 = reader.ReadToEnd();
                        reader.Close();
                        return str2.Contains(code);
                    }
                }
                catch
                {
                }
            }
            return false;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}

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

AI 解读 AI

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

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