Ejemplo n.º 1
0
        public LoginForm(ref Web web)
        {
            InitializeComponent();
            this.web = web;
            web.getPage(refer,Encoding.GetEncoding("GB2312"),null,true);
            codeImg.Image = web.getCodeImg(codeImgUrl, refer);
            stuNum.Text = INI.ReadIniData("user", "uid", "", @".\helper.ini");
            string password = INI.ReadIniData("user", "pwd", "", @".\helper.ini");

            if (password != "")
                this.remember.Checked = true;
            if(password != "")
                pwd.Text = Crypt.Decrypt(password);
            this.AcceptButton = login;
        }
Ejemplo n.º 2
0
        private void InitValue()
        {
            web = new Web();
            sm = new ScoreManager();

            if (!File.Exists("helper.ini"))
            {
                //INI.WriteIniData("basic", "DEPARTMENT_PATH", "department.txt", @".\helper.ini");
                INI.WriteIniData("user", "uid", "", @".\helper.ini");
                INI.WriteIniData("user", "pwd", "", @".\helper.ini");
            }

            term.Text = "全部学期";
            pro_class.Text = "第一学位";
        }