Subversion Repositories Code-Repo

Rev

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

Rev 9 Rev 15
Line 13... Line 13...
13
    {
13
    {
14
        public Menu1_Main()
14
        public Menu1_Main()
15
        {
15
        {
16
            InitializeComponent();
16
            InitializeComponent();
17
            Settings_Form.ImportSettings();
17
            Settings_Form.ImportSettings();
-
 
18
            this.KeyPress += new KeyPressEventHandler(Menu1_Main_KeyPress);
-
 
19
        }
-
 
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
            }
18
        }
47
        }
19
        private void btn_Main_UserMgmt_Click(object sender, EventArgs e)
48
        private void btn_Main_UserMgmt_Click(object sender, EventArgs e)
20
        {
49
        {
21
            ManageUserAccounts_Form user_Mgmt = new ManageUserAccounts_Form();
50
            ManageUserAccounts_Form userMgmtForm = new ManageUserAccounts_Form();
22
            user_Mgmt.ShowDialog();
51
            userMgmtForm.ShowDialog();
23
        }
52
        }
24
        private void btn_Main_Settings_Click(object sender, EventArgs e)
53
        private void btn_Main_Settings_Click(object sender, EventArgs e)
25
        {
54
        {
26
            SettingsVerify_Form newForm = new SettingsVerify_Form();
55
            SettingsVerify_Form settingsForm = new SettingsVerify_Form();
27
            newForm.ShowDialog();
56
            settingsForm.ShowDialog();
28
        }
57
        }
29
        private void btn_Reimage_USB_Drives_Click(object sender, EventArgs e)
58
        private void btn_Reimage_USB_Drives_Click(object sender, EventArgs e)
30
        {
59
        {
31
            if (Reimage_USB_Drives.threadsRunning == false)
60
            if (Reimage_USB_Drives.threadsRunning == false)
32
                Reimage_USB_Drives.reimageUSBDrives();
61
                Reimage_USB_Drives.reimageUSBDrives();