cec: updated changelog and bumped version numbers for 1.6.1
[deb_libcec.git] / src / cec-config-gui / actions / SendActivateSource.cs
CommitLineData
a42ad439 1using CecSharp;
96fa7764
LOK
2
3namespace CecConfigGui.actions
4{
5 class SendActivateSource : UpdateProcess
6 {
7 public SendActivateSource(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 'activate source' command to " + Lib.ToString(Address) + "...");
16 SendEvent(UpdateEventType.ProgressBar, 50);
17
18 bool bResult = Lib.SetStreamPath(Address);
ece1582e 19 SendEvent(UpdateEventType.StatusText, bResult ? "Command sent successfully." : "The 'active source' command was not acked.");
96fa7764
LOK
20 SendEvent(UpdateEventType.ProgressBar, 100);
21 }
22
23 private LibCecSharp Lib;
24 private CecLogicalAddress Address;
25 }
26}