Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 52 → Rev 53

/SWAT Office App/trunk/SWAT Office App/Main_Menu_Form.cs
13,6 → 13,7
{
public Menu_Main()
{
DebugText.startNewSession();
InitializeComponent();
Settings_Form.ImportSettings();
this.KeyPress += new KeyPressEventHandler(Menu_Main_KeyPress);
23,13 → 24,15
// Monitors for keypresses
switch (e.KeyChar)
{
case '1':
case '1': // Manage User Accounts and Shares
ManageUserAccounts_Form user_Mgmt = new ManageUserAccounts_Form();
user_Mgmt.ShowDialog();
break;
case '2':
case '2': // DriveLogger
// Check to make sure that an instance of DriveLogger isnt already running
if (!DriveLogger_Form.instanceAlreadyRunning)
{
DebugText.appendText("Starting instance of DriveLogger");
DriveLogger_Form driveForm = new DriveLogger_Form();
driveForm.Show();
}
38,20 → 41,22
MessageBox.Show("An instance of DriveLogger is already running");
}
break;
case '3':
case '3': // Reimage USB Drives
// Check to make sure that another imaging thread isnt running
if (!Reimage_USB_Drives.threadsRunning)
{
DebugText.appendText("Starting reimaging of USB drives");
Reimage_USB_Drives.reimageUSBDrives();
}
else
{
MessageBox.Show("Another file copy operation is currently in progress.\n" +
"Please wait for transfer to finish before starting another");
}
break;
case '4':
case '4': // Program Settings
SettingsVerify_Form settingsForm = new SettingsVerify_Form();
settingsForm.ShowDialog();
break;
case '?':
case '?': // About
AboutBox aboutForm = new AboutBox();
aboutForm.ShowDialog();
break;
59,35 → 64,39
}
private void btn_Main_UserMgmt_Click(object sender, EventArgs e)
{
// Manage User Accounts and Shares
ManageUserAccounts_Form userMgmtForm = new ManageUserAccounts_Form();
userMgmtForm.ShowDialog();
}
private void btn_DriveLogger_Click(object sender, EventArgs e)
{
// DriveLogger
if (!DriveLogger_Form.instanceAlreadyRunning)
{
DebugText.appendText("Starting instance of DriveLogger");
DriveLogger_Form driveForm = new DriveLogger_Form();
driveForm.Show();
}
else
{
MessageBox.Show("An instance of DriveLogger is already running");
}
}
private void btn_Main_Settings_Click(object sender, EventArgs e)
{
SettingsVerify_Form settingsForm = new SettingsVerify_Form();
settingsForm.ShowDialog();
}
private void btn_Reimage_USB_Drives_Click(object sender, EventArgs e)
{
if (!DriveLogger_Form.instanceAlreadyRunning)
// Reimage USB Drives
if (!Reimage_USB_Drives.threadsRunning)
{
DebugText.appendText("Starting reimaging of USB drives");
Reimage_USB_Drives.reimageUSBDrives();
}
else
{
MessageBox.Show("Another file copy operation is currently in progress.\n" +
"Please wait for transfer to finish before starting another");
}
}
private void btn_Main_Settings_Click(object sender, EventArgs e)
{
// Program Settings
SettingsVerify_Form settingsForm = new SettingsVerify_Form();
settingsForm.ShowDialog();
}
}
}