cec-config-gui: make the progress bar invisible when done. disable the physical addre...
[deb_libcec.git] / src / cec-config-gui / actions / SendImageViewOn.cs
CommitLineData
96fa7764
LOK
1using System;
2using System.Collections.Generic;
3using System.Text;
4using CecSharp;
5
6namespace CecConfigGui.actions
7{
8 class SendImageViewOn : UpdateProcess
9 {
10 public SendImageViewOn(ref LibCecSharp lib, CecLogicalAddress address)
11 {
12 Lib = lib;
13 Address = address;
14 }
15
16 public override void Process()
17 {
18 SendEvent(UpdateEventType.StatusText, "Sending the 'power on' command to " + Lib.ToString(Address) + "...");
19 SendEvent(UpdateEventType.ProgressBar, 50);
20
21 bool bResult = Lib.PowerOnDevices(Address);
ece1582e 22 SendEvent(UpdateEventType.StatusText, bResult ? "Command sent successfully." : "The 'image view on' command was not acked.");
96fa7764
LOK
23 SendEvent(UpdateEventType.ProgressBar, 100);
24 }
25
26 private LibCecSharp Lib;
27 private CecLogicalAddress Address;
28 }
29}