Subversion Repositories Code-Repo

Rev

Rev 9 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 53
Line 23... Line 23...
23
            this.txt_Password1.TextChanged += new EventHandler(this.txt_Box1_TextChanged);
23
            this.txt_Password1.TextChanged += new EventHandler(this.txt_Box1_TextChanged);
24
            this.txt_Password2.TextChanged += new EventHandler(this.txt_Box2_TextChanged);
24
            this.txt_Password2.TextChanged += new EventHandler(this.txt_Box2_TextChanged);
25
        }
25
        }
26
        private void txt_Box1_TextChanged(object sender, EventArgs e)
26
        private void txt_Box1_TextChanged(object sender, EventArgs e)
27
        {
27
        {
28
            // Office password is set here
-
 
29
            if (txt_Password1.Text == "tr33b3@rd")
28
            if (txt_Password1.Text == Settings_Form.globalAdminPassword)
30
            {
29
            {
31
                this.txt_Password1.Visible = false;
30
                this.txt_Password1.Visible = false;
32
                this.txt_Password2.Visible = true;
31
                this.txt_Password2.Visible = true;
33
                this.lbl_Prompt1.Visible = false;
32
                this.lbl_Prompt1.Visible = false;
34
                this.lbl_Prompt2.Visible = true;
33
                this.lbl_Prompt2.Visible = true;
Line 47... Line 46...
47
        {
46
        {
48
            this.Close();
47
            this.Close();
49
        }
48
        }
50
        private void btn_Ok_Click(object sender, EventArgs e)
49
        private void btn_Ok_Click(object sender, EventArgs e)
51
        {
50
        {
52
            ManageUserAccounts.ChangeUserPassword(selectedUsername, txt_Password2.Text);
51
            if (!ManageUserAccounts.ChangeUserPassword(selectedUsername, txt_Password2.Text))
-
 
52
            {
-
 
53
                DebugText.appendText("Error occured while changing password");
-
 
54
                MessageBox.Show("Error occured while changing password", "Error");
-
 
55
            }
53
            this.Close();
56
            this.Close();
54
        }
57
        }
55
    }
58
    }
56
}
59
}