diff -r ec4ccaa1210d -r b4f0f206173d Hardware/Computer.cs --- a/Hardware/Computer.cs Sat Mar 27 19:55:09 2010 +0000 +++ b/Hardware/Computer.cs Fri Apr 02 16:05:07 2010 +0000 @@ -46,8 +46,6 @@ public class Computer : IComputer { - private Timer timer; - private List groups = new List(); private bool open = false; @@ -91,19 +89,6 @@ Add(new HDD.HDDGroup()); open = true; - - timer = new Timer( - delegate(Object stateInfo) { - #if !DEBUG - try { - #endif - Update(); - #if !DEBUG - } catch (Exception exception) { - Utilities.CrashReport.Save(exception); - } - #endif - }, null, 1000, 1000); } private void SubHardwareUpdate(IHardware hardware) { @@ -113,14 +98,12 @@ } } - private void Update() { + public void Update() { foreach (IGroup group in groups) foreach (IHardware hardware in group.Hardware) { hardware.Update(); SubHardwareUpdate(hardware); } - if (Updated != null) - Updated(); } public bool HDDEnabled { @@ -226,9 +209,6 @@ } public void Close() { - timer.Dispose(); - timer = null; - if (!open) return; @@ -239,9 +219,7 @@ open = false; } - public event UpdateEventHandler Updated; public event HardwareEventHandler HardwareAdded; public event HardwareEventHandler HardwareRemoved; - } }