public MainFormViewModel() { _ledTimer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 0, 2) }; Comm.CommunicationTimedOut += Comm_CommunicationTimedOut; _hotkeyDetected = false; _ledTimer.Tick += _ledTimer_Tick; _lhk = new List <HotKeyHandle>(); _listBridgeObjects = new ObservableCollection <IHueObject>(); _listBridges = new ObservableCollection <Bridge>(); _findlighttimer.Interval = new TimeSpan(0, 1, 0); _findlighttimer.Tick += _findlighttimer_Tick; _findsensortimer.Interval = new TimeSpan(0, 1, 0); _findsensortimer.Tick += _findsensortimer_Tick; _listHotKeys = WinHueSettings.hotkeys.listHotKeys; _mainFormModel = new MainFormModel(); _sliderTT = WinHueSettings.settings.DefaultTT; _propertyGrid = new Form_PropertyGrid(); Comm.Timeout = WinHueSettings.settings.Timeout; _mainFormModel.Sort = WinHueSettings.settings.Sort; _mainFormModel.ShowId = WinHueSettings.settings.ShowID; _mainFormModel.WrapText = WinHueSettings.settings.WrapText; //LifxLight light = new LifxLight((IPAddress)devices.Keys.First(), devices.First().Value.Header.Target); //light.SetColor(65535, 65535, 65535, 32768, 3000); // LifxResponse p = light.SetPower(32000, 3000); }
public MainFormViewModel() { _ledTimer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 0, 2) }; Comm.CommunicationTimedOut += Comm_CommunicationTimedOut; _hotkeyDetected = false; _ledTimer.Tick += _ledTimer_Tick; _lhk = new List <HotKeyHandle>(); _listBridgeObjects = new ObservableCollection <IHueObject>(); _listBridges = new ObservableCollection <Bridge>(); _findlighttimer.Interval = new TimeSpan(0, 1, 0); _findlighttimer.Tick += _findlighttimer_Tick; _findsensortimer.Interval = new TimeSpan(0, 1, 0); _findsensortimer.Tick += _findsensortimer_Tick; _listHotKeys = WinHueSettings.hotkeys.listHotKeys; _mainFormModel = new MainFormModel(); _sliderTT = WinHueSettings.settings.DefaultTT; Comm.Timeout = WinHueSettings.settings.Timeout; _mainFormModel.Sort = WinHueSettings.settings.Sort; _mainFormModel.ShowId = WinHueSettings.settings.ShowID; _mainFormModel.WrapText = WinHueSettings.settings.WrapText; }
public MainFormViewModel() { Comm.CommunicationTimedOut += Comm_CommunicationTimedOut; Comm.Timeout = WinHueSettings.settings.Timeout; _hotkeyDetected = false; _mainFormModel = new MainFormModel(); _sliderTT = WinHueSettings.settings.DefaultTT; _mainFormModel.Sort = WinHueSettings.settings.Sort; _mainFormModel.ShowId = WinHueSettings.settings.ShowID; _mainFormModel.WrapText = WinHueSettings.settings.WrapText; _mainFormModel.Showhiddenscenes = WinHueSettings.settings.ShowHiddenScenes; _mainFormModel.ShowFloorPlanTab = WinHueSettings.settings.ShowFloorPlanTab; LoadFloorPlans(); }
public MainFormViewModel() { HueHttpClient.OnCommunicationTimeOut += Comm_CommunicationTimedOut; HueHttpClient.Timeout = WinHueSettings.settings.Timeout; _mainFormModel = new MainFormModel(); _sliderTT = WinHueSettings.settings.DefaultTT; _mainFormModel.Sort = WinHueSettings.settings.Sort; _mainFormModel.ShowId = WinHueSettings.settings.ShowID; _mainFormModel.WrapText = WinHueSettings.settings.WrapText; _mainFormModel.Showhiddenscenes = WinHueSettings.settings.ShowHiddenScenes; _mainFormModel.ShowFloorPlanTab = WinHueSettings.settings.ShowFloorPlanTab; ListBridges = new ObservableCollection <Bridge>(); CurrentBridgeHueObjectsList = new ObservableCollection <IHueObject>(); _refreshTimer.Interval = new TimeSpan(0, 0, (int)WinHueSettings.settings.RefreshTime); _refreshTimer.Tick += _refreshTimer_Tick; _findlighttimer.Interval = new TimeSpan(0, 1, 0); _findlighttimer.Tick += _findlighttimer_Tick; _findsensortimer.Interval = new TimeSpan(0, 1, 0); _findsensortimer.Tick += _findsensortimer_Tick; _mqttClient = new MqttFactory().CreateMqttClient(); LoadFloorPlans(); }