diff -r 0a386ef7d5bb -r 1dfe9dac1651 GUI/SystemTray.cs --- a/GUI/SystemTray.cs Wed Jul 11 22:28:39 2012 +0000 +++ b/GUI/SystemTray.cs Thu Jul 12 10:17:18 2012 +0000 @@ -4,7 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - Copyright (C) 2009-2011 Michael Möller + Copyright (C) 2009-2012 Michael Möller */ @@ -20,13 +20,17 @@ public class SystemTray : IDisposable { private IComputer computer; private PersistentSettings settings; + private UnitManager unitManager; private List list = new List(); private bool mainIconEnabled = false; private NotifyIcon mainIcon; - public SystemTray(IComputer computer, PersistentSettings settings) { + public SystemTray(IComputer computer, PersistentSettings settings, + UnitManager unitManager) + { this.computer = computer; this.settings = settings; + this.unitManager = unitManager; computer.HardwareAdded += new HardwareEventHandler(HardwareAdded); computer.HardwareRemoved += new HardwareEventHandler(HardwareRemoved); @@ -103,7 +107,7 @@ if (Contains(sensor)) { return; } else { - list.Add(new SensorNotifyIcon(this, sensor, balloonTip, settings)); + list.Add(new SensorNotifyIcon(this, sensor, balloonTip, settings, unitManager)); UpdateMainIconVisibilty(); settings.SetValue(new Identifier(sensor.Identifier, "tray").ToString(), true); }