GUI/MainForm.cs
changeset 185 edb59f3745e8
parent 178 67b9b4d8c5fc
child 198 d5de6fa31bc6
     1.1 --- a/GUI/MainForm.cs	Mon Sep 13 22:55:25 2010 +0000
     1.2 +++ b/GUI/MainForm.cs	Tue Sep 14 19:23:11 2010 +0000
     1.3 @@ -198,7 +198,13 @@
     1.4  
     1.5        autoStart = new UserOption(null, startupManager.Startup, startupMenuItem, settings);
     1.6        autoStart.Changed += delegate(object sender, EventArgs e) {
     1.7 -        startupManager.Startup = autoStart.Value; 
     1.8 +        try {
     1.9 +          startupManager.Startup = autoStart.Value;
    1.10 +        } catch (InvalidOperationException) {
    1.11 +          MessageBox.Show("Updating the auto-startup option failed.", "Error", 
    1.12 +            MessageBoxButtons.OK, MessageBoxIcon.Error);
    1.13 +          autoStart.Value = startupManager.Startup;
    1.14 +        }
    1.15        };
    1.16  
    1.17        readHddSensors = new UserOption("hddMenuItem", true, hddMenuItem, settings);