cec-config-gui: fixed typo that saved the incorrect base device setting
[deb_libcec.git] / src / cec-config-gui / actions / RescanDevices.cs
1 using CecSharp;
2 using System.Windows.Forms;
3
4 namespace CecConfigGui.actions
5 {
6 class RescanDevices : UpdateProcess
7 {
8 public RescanDevices(ref LibCecSharp lib)
9 {
10 Lib = lib;
11 }
12
13 public override void Process()
14 {
15 SendEvent(UpdateEventType.ProgressBar, 10);
16 SendEvent(UpdateEventType.StatusText, "Polling active devices");
17 Lib.RescanActiveDevices();
18
19 SendEvent(UpdateEventType.ProgressBar, 80);
20 SendEvent(UpdateEventType.StatusText, "Refreshing device list");
21 SendEvent(UpdateEventType.PollDevices);
22
23 SendEvent(UpdateEventType.ProgressBar, 100);
24 SendEvent(UpdateEventType.StatusText, "Ready.");
25 }
26
27 private LibCecSharp Lib;
28 }
29 }