1.1 --- a/Server/MainForm.Hid.cs Sat Sep 26 11:56:49 2015 +0200
1.2 +++ b/Server/MainForm.Hid.cs Sat Sep 26 16:35:27 2015 +0200
1.3 @@ -31,12 +31,6 @@
1.4 /// </summary>
1.5 private Hid.Handler iHidHandler;
1.6
1.7 - ///
1.8 - private PowerManager.SettingNotifier iPowerSettingNotifier;
1.9 -
1.10 - ///
1.11 - private Cec.Client iCecClient;
1.12 -
1.13 /// <summary>
1.14 /// Register HID devices so that we receive corresponding WM_INPUT messages.
1.15 /// </summary>
1.16 @@ -98,30 +92,9 @@
1.17 }
1.18 iHidHandler.OnHidEvent += HandleHidEventThreadSafe;
1.19
1.20 - //TODO: Move this some place else
1.21 - iPowerSettingNotifier = new PowerManager.SettingNotifier(Handle);
1.22 - iPowerSettingNotifier.OnMonitorPowerOn += MonitorPowerOn;
1.23 - iPowerSettingNotifier.OnMonitorPowerOff += MonitorPowerOff;
1.24 -
1.25 - //CEC
1.26 - iCecClient = new Cec.Client();
1.27 - if (!iCecClient.Connect(1000))
1.28 - {
1.29 - Debug.WriteLine("WARNING: No CEC connection!");
1.30 - }
1.31 }
1.32
1.33 - void MonitorPowerOn()
1.34 - {
1.35 - Debug.WriteLine("ON");
1.36 - iCecClient.PowerOnDevices(CecSharp.CecLogicalAddress.Tv);
1.37 - }
1.38
1.39 - void MonitorPowerOff()
1.40 - {
1.41 - Debug.WriteLine("OFF");
1.42 - iCecClient.StandbyDevices(CecSharp.CecLogicalAddress.Tv);
1.43 - }
1.44
1.45
1.46 /// <summary>
1.47 @@ -428,6 +401,8 @@
1.48 SwitchToThisWindow(existingProcesses[0].MainWindowHandle, true);
1.49 }
1.50 }
1.51 +
1.52 +
1.53 /// <summary>
1.54 /// We need to handle WM_INPUT.
1.55 /// </summary>
1.56 @@ -443,13 +418,7 @@
1.57 break;
1.58 }
1.59
1.60 - //Hook in our power manager
1.61 - if (iPowerSettingNotifier!=null)
1.62 - {
1.63 - iPowerSettingNotifier.WndProc(ref message);
1.64 - }
1.65 -
1.66 - //Is that needed? Check the docs.
1.67 + //Pass this on to base class.
1.68 base.WndProc(ref message);
1.69 }
1.70 }