Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (Assistance.getSHA1ofString(textBox1.Text) == MainForm.Settings.SHA1ofPASSWORD)
            {
                obj1.Enabled = true;
                obj1.Visible = true;


                this.Visible = false;
            }
            else
            {
                MessageBox.Show("密码错误!");
                if (forcedInput == true)
                {
                    obj1.Dispose();
                    this.Dispose();
                }
                else
                {
                    obj1.Enabled = true;
                    this.Dispose();
                }
            }
        }
Ejemplo n.º 2
0
 public string getSHA1()
 {
     string str;
     str = this.Id + this.Name + this.Grade + MainForm.Settings.SHA1ofPASSWORD;
     CurrentSHA1 = Assistance.getSHA1ofString(str);
     return CurrentSHA1;
 }