2 using System.Collections.Generic;
8 public enum UpdateEventType
14 BaseDevicePhysicalAddress,
25 public class UpdateEvent : EventArgs
27 public UpdateEvent(UpdateEventType type)
32 public UpdateEvent(UpdateEventType type, bool value)
38 public UpdateEvent(UpdateEventType type, int value)
44 public UpdateEvent(UpdateEventType type, string value)
50 public UpdateEvent(LibCECConfiguration config)
52 Type = UpdateEventType.Configuration;
56 public UpdateEventType Type;
57 public bool BoolValue = false;
58 public int IntValue = -1;
59 public string StringValue = String.Empty;
60 public LibCECConfiguration ConfigValue = null;
63 public abstract class UpdateProcess
65 public UpdateProcess()
69 public void SendEvent(UpdateEventType type)
71 EventHandler<UpdateEvent> temp = EventHandler;
73 temp(this, new UpdateEvent(type));
76 public void SendEvent(UpdateEventType type, bool value)
78 EventHandler<UpdateEvent> temp = EventHandler;
80 temp(this, new UpdateEvent(type, value));
83 public void SendEvent(UpdateEventType type, int value)
85 EventHandler<UpdateEvent> temp = EventHandler;
87 temp(this, new UpdateEvent(type, value));
90 public void SendEvent(UpdateEventType type, string value)
92 EventHandler<UpdateEvent> temp = EventHandler;
94 temp(this, new UpdateEvent(type, value));
97 public void SendEvent(LibCECConfiguration config)
99 EventHandler<UpdateEvent> temp = EventHandler;
101 temp(this, new UpdateEvent(config));
107 SendEvent(UpdateEventType.ProcessCompleted, true);
110 public abstract void Process();
111 public event EventHandler<UpdateEvent> EventHandler;