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 Menu1_Main : Form
13
    {
14
        public Menu1_Main()
15
        {
16
            InitializeComponent();
17
            Settings_Form.ImportSettings();
15 Kevin 18
            this.KeyPress += new KeyPressEventHandler(Menu1_Main_KeyPress);
9 Kevin 19
        }
15 Kevin 20
 
21
        void Menu1_Main_KeyPress(object sender, KeyPressEventArgs e)
22
        {
23
            switch (e.KeyChar)
24
            {
25
                case '1':
26
                    if (Reimage_USB_Drives.threadsRunning == false)
27
                        Reimage_USB_Drives.reimageUSBDrives();
28
                    else
29
                    {
30
                        MessageBox.Show("Another file copy operation is currently in progress.\n" +
31
                                        "Please wait for transfer to finish before starting another");
32
                    }
33
                    break;
34
                case '2':
35
                    ManageUserAccounts_Form user_Mgmt = new ManageUserAccounts_Form();
36
                    user_Mgmt.ShowDialog();
37
                    break;
38
                case '3':
39
                    SettingsVerify_Form settingsForm = new SettingsVerify_Form();
40
                    settingsForm.ShowDialog();
41
                    break;
42
                case '?':
43
                    AboutBox aboutForm = new AboutBox();
44
                    aboutForm.ShowDialog();
45
                    break;
46
            }
47
        }
9 Kevin 48
        private void btn_Main_UserMgmt_Click(object sender, EventArgs e)
49
        {
15 Kevin 50
            ManageUserAccounts_Form userMgmtForm = new ManageUserAccounts_Form();
51
            userMgmtForm.ShowDialog();
9 Kevin 52
        }
53
        private void btn_Main_Settings_Click(object sender, EventArgs e)
54
        {
15 Kevin 55
            SettingsVerify_Form settingsForm = new SettingsVerify_Form();
56
            settingsForm.ShowDialog();
9 Kevin 57
        }
58
        private void btn_Reimage_USB_Drives_Click(object sender, EventArgs e)
59
        {
60
            if (Reimage_USB_Drives.threadsRunning == false)
61
                Reimage_USB_Drives.reimageUSBDrives();
62
            else
63
            {
64
                MessageBox.Show("Another file copy operation is currently in progress.\n" +
65
                                "Please wait for transfer to finish before starting another");
66
            }
67
        }
68
 
69
        private void Menu1_Main_Load(object sender, EventArgs e)
70
        {
71
 
72
        }
73
 
74
    }
75
}