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