public BridgeDetectionPairingView() { _pairTimer.Interval = new TimeSpan(0, 0, 0, 2); _pairTimer.Tick += _pairTimer_Tick; _timeoutTimer.Interval = new TimeSpan(0, 0, 1, 0); _timeoutTimer.Tick += _timeoutTimer_Tick; Hue.OnDetectionComplete += Hue_OnDetectionComplete; Hue.OnBridgeDetectionFailed += Hue_OnBridgeDetectionFailed; Hue.OnIpScanComplete += Hue_OnIpScanComplete; Hue.OnIpScanProgressReport += Hue_OnIpScanProgressReport; if (BridgeStore.ListBridges.Count == 0) { Cursor_Tools.ShowWaitCursor(); CanAddManualIp = false; CanScan = false; CanDetectBridge = false; log.Info("Starting bridge detection."); Hue.DetectBridge(); } else { _defaultset = BridgeStore.ListBridges.Any(x => x.IsDefault); } }
private void DetectBridge() { CanDetectBridge = false; CanScan = false; CanAddManualIp = false; OnPropertyChanged("CanDetectBridge"); Cursor_Tools.ShowWaitCursor(); Hue.DetectBridge(); }
public BridgeDetectionPairingView() { _pairTimer.Interval = new TimeSpan(0, 0, 0, 2); _pairTimer.Tick += _pairTimer_Tick; _timeoutTimer.Interval = new TimeSpan(0, 0, 1, 0); _timeoutTimer.Tick += _timeoutTimer_Tick; _listBridge = new ObservableCollection <Bridge>(); if (_listBridge.Count == 0) { CanAddManualIp = false; Cursor_Tools.ShowWaitCursor(); Hue.OnDetectionComplete += Hue_OnDetectionComplete; Hue.OnBridgeDetectionFailed += Hue_OnBridgeDetectionFailed; log.Info("Starting bridge detection."); Hue.DetectBridge(); _canscan = false; } else { AssociateApiKey(_listBridge); } }