Merge branch 'development'
[deb_libcec.git] / src / cec-config-gui / actions / SendImageViewOn.cs
1 using CecSharp;
2
3 namespace CecConfigGui.actions
4 {
5 class SendImageViewOn : UpdateProcess
6 {
7 public SendImageViewOn(ref LibCecSharp lib, CecLogicalAddress address)
8 {
9 Lib = lib;
10 Address = address;
11 }
12
13 public override void Process()
14 {
15 SendEvent(UpdateEventType.StatusText, "Sending the 'power on' command to " + Lib.ToString(Address) + "...");
16 SendEvent(UpdateEventType.ProgressBar, 50);
17
18 bool bResult = Lib.PowerOnDevices(Address);
19 SendEvent(UpdateEventType.StatusText, bResult ? "Command sent successfully." : "The 'image view on' command was not acked.");
20 SendEvent(UpdateEventType.ProgressBar, 100);
21 }
22
23 private LibCecSharp Lib;
24 private CecLogicalAddress Address;
25 }
26 }