public void Configure() { ProximityReader reader = new ProximityReader(Settings.Default.COMPort); ProximityCM proximityCM = new ProximityCM(reader); proximityBarCS = new ProximityBarCS(proximityCM); proximityCM.OnNotifyContextServices += proximityBarCS.UpdateMonitorReading; ContextMonitorContainer.AddMonitor(proximityCM); ContextServiceContainer.AddContextService(proximityBarCS); }
public ProximityCM(ProximityReader r) { Reader = r; updateType = CAF.ContextAdapter.ContextAdapterUpdateType.OnRequest; updateInterval = 500; }