2 using System.Collections.Generic;
8 public enum UpdateEventType
14 BaseDevicePhysicalAddress,
23 public class UpdateEvent : EventArgs
25 public UpdateEvent(UpdateEventType type, bool value)
31 public UpdateEvent(UpdateEventType type, int value)
37 public UpdateEvent(UpdateEventType type, string value)
43 public UpdateEvent(LibCECConfiguration config)
45 Type = UpdateEventType.Configuration;
49 public UpdateEventType Type;
50 public bool BoolValue = false;
51 public int IntValue = -1;
52 public string StringValue = String.Empty;
53 public LibCECConfiguration ConfigValue = null;
56 public abstract class UpdateProcess
58 public UpdateProcess()
62 public void SendEvent(UpdateEventType type, bool value)
64 EventHandler<UpdateEvent> temp = EventHandler;
66 temp(this, new UpdateEvent(type, value));
69 public void SendEvent(UpdateEventType type, int value)
71 EventHandler<UpdateEvent> temp = EventHandler;
73 temp(this, new UpdateEvent(type, value));
76 public void SendEvent(UpdateEventType type, string value)
78 EventHandler<UpdateEvent> temp = EventHandler;
80 temp(this, new UpdateEvent(type, value));
83 public void SendEvent(LibCECConfiguration config)
85 EventHandler<UpdateEvent> temp = EventHandler;
87 temp(this, new UpdateEvent(config));
93 SendEvent(UpdateEventType.ProcessCompleted, true);
96 public abstract void Process();
97 public event EventHandler<UpdateEvent> EventHandler;