Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 Kevin 1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Data;
5
using System.Drawing;
6
using System.Linq;
7
using System.Text;
8
using System.Windows.Forms;
9
 
10
namespace SWAT_Office_App
11
{
12
    public partial class ToggleUserVerify_Form : Form
13
    {
14
        private string selectedUser;
15
        public ToggleUserVerify_Form(string user)
16
        {
17
            selectedUser = user;
18
            InitializeComponent();
19
            this.txt_Password.Focus();
20
 
21
            // Monitors the text in each textbox, triggering changes when certain criteria is met
22
            this.txt_Password.TextChanged += new EventHandler(this.txt_Password_TextChanged);
23
        }
24
        private void txt_Password_TextChanged(object sender, EventArgs e)
25
        {
26
            TextBox tb = (TextBox)sender;
27
            if (tb.Text == "tr33b3@rd")
28
            {
29
                ManageUserAccounts.ToggleShare(selectedUser);
30
                this.Close();
31
            }
32
        }
33
        private void btn_Cancel_Click(object sender, EventArgs e)
34
        {
35
            this.Close();
36
        }
37
    }
38
}