GUI/MainForm.cs
changeset 122 3ef997c53b50
parent 113 62a2848ec0a6
child 125 b1278888d9a9
     1.1 --- a/GUI/MainForm.cs	Tue May 18 19:16:55 2010 +0000
     1.2 +++ b/GUI/MainForm.cs	Thu May 20 21:23:54 2010 +0000
     1.3 @@ -149,7 +149,11 @@
     1.4        startMinMenuItem.Checked = Config.Get(startMinMenuItem.Name, false); 
     1.5        minTrayMenuItem.Checked = Config.Get(minTrayMenuItem.Name, true);
     1.6        startupMenuItem.Checked = startupManager.Startup;
     1.7 -      hddMenuItem.Checked = Config.Get(hddMenuItem.Name, true);   
     1.8 +      hddMenuItem.Checked = Config.Get(hddMenuItem.Name, true);
     1.9 +
    1.10 +      celciusToolStripMenuItem.Checked = 
    1.11 +        UnitManager.TemperatureUnit == TemperatureUnit.Celcius;
    1.12 +      fahrenheitToolStripMenuItem.Checked = !celciusToolStripMenuItem.Checked;
    1.13  
    1.14        if (startMinMenuItem.Checked) {
    1.15          if (!minTrayMenuItem.Checked) {
    1.16 @@ -439,5 +443,17 @@
    1.17      private void limitMenuItem_CheckedChanged(object sender, EventArgs e) {
    1.18        treeView.Columns[4].IsVisible = limitMenuItem.Checked;
    1.19      }
    1.20 +
    1.21 +    private void celciusToolStripMenuItem_Click(object sender, EventArgs e) {
    1.22 +      celciusToolStripMenuItem.Checked = true;
    1.23 +      fahrenheitToolStripMenuItem.Checked = false;
    1.24 +      UnitManager.TemperatureUnit = TemperatureUnit.Celcius;
    1.25 +    }
    1.26 +
    1.27 +    private void fahrenheitToolStripMenuItem_Click(object sender, EventArgs e) {
    1.28 +      celciusToolStripMenuItem.Checked = false;
    1.29 +      fahrenheitToolStripMenuItem.Checked = true;
    1.30 +      UnitManager.TemperatureUnit = TemperatureUnit.Fahrenheit;
    1.31 +    }
    1.32    }
    1.33  }