cec-config-gui: set cbPortNumber enabled when the physical address override isn't...
[deb_libcec.git] / src / cec-config-gui / actions / UpdateConfiguration.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using CecSharp;
5
6 namespace CecConfigGui.actions
7 {
8 class UpdateConfiguration : UpdateProcess
9 {
10 public UpdateConfiguration(ref LibCecSharp lib, LibCECConfiguration config)
11 {
12 Lib = lib;
13 Config = config;
14 }
15
16 public override void Process()
17 {
18 SendEvent(UpdateEventType.ProgressBar, 10);
19 SendEvent(UpdateEventType.StatusText, "Setting the new configuration");
20
21 Lib.SetConfiguration(Config);
22
23 SendEvent(UpdateEventType.ProgressBar, 100);
24 SendEvent(UpdateEventType.StatusText, "Ready.");
25 }
26
27 private LibCecSharp Lib;
28 private LibCECConfiguration Config;
29 }
30 }