Commit | Line | Data |
---|---|---|
6d866874 | 1 | using CecSharp; |
6d866874 LOK |
2 | |
3 | namespace CecConfigGui.actions | |
4 | { | |
5 | class RescanDevices : UpdateProcess | |
6 | { | |
3efda01a LOK |
7 | public RescanDevices(ref LibCecSharp lib) |
8 | { | |
9 | Lib = lib; | |
10 | } | |
11 | ||
6d866874 LOK |
12 | public override void Process() |
13 | { | |
14 | SendEvent(UpdateEventType.ProgressBar, 10); | |
15 | SendEvent(UpdateEventType.StatusText, "Polling active devices"); | |
3efda01a LOK |
16 | Lib.RescanActiveDevices(); |
17 | ||
18 | SendEvent(UpdateEventType.ProgressBar, 80); | |
19 | SendEvent(UpdateEventType.StatusText, "Refreshing device list"); | |
6d866874 LOK |
20 | SendEvent(UpdateEventType.PollDevices); |
21 | ||
22 | SendEvent(UpdateEventType.ProgressBar, 100); | |
23 | SendEvent(UpdateEventType.StatusText, "Ready."); | |
24 | } | |
3efda01a LOK |
25 | |
26 | private LibCecSharp Lib; | |
6d866874 LOK |
27 | } |
28 | } |