Rev 9 | Blame | Last modification | View Log | RSS feed
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SWAT_Office_App
{
public partial class ToggleUserVerify_Form : Form
{
private string selectedUser;
public ToggleUserVerify_Form(string user)
{
selectedUser = user;
InitializeComponent();
this.txt_Password.Focus();
// Monitors the text in each textbox, triggering changes when certain criteria is met
this.txt_Password.TextChanged += new EventHandler(this.txt_Password_TextChanged);
}
private void txt_Password_TextChanged(object sender, EventArgs e)
{
TextBox tb = (TextBox)sender;
if (tb.Text == Settings_Form.globalAdminPassword)
{
if (!ManageUserAccounts.ToggleShare(selectedUser))
{
DebugText.appendText("Error in toggling share");
MessageBox.Show("Error in toggling share", "Error");
}
this.Close();
}
}
private void btn_Cancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}