| | |
| | | string selectedDeviceStatus = ""; |
| | | Dictionary<string, object> actionsInfo = null; |
| | | List<Dictionary<string, string>> TaskList = null; |
| | | public void Show(CommonDevice common, bool edit, Dictionary<string, object> editdeviceActionInfo = null) |
| | | public void Show(CommonDevice common, bool edit,string str_if,Dictionary<string, object> editdeviceActionInfo = null) |
| | | { |
| | | actionsInfo = editdeviceActionInfo; |
| | | this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | |
| | | middle.AddChidren(openView.Show()); |
| | | openView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | CurrentDeviceView("夜灯开关", common, edit,openView.seletecdTextBtn); |
| | | CurrentDeviceView("夜灯开关", common, edit, openView.seletecdTextBtn); |
| | | }; |
| | | |
| | | LogicView.LightView brightnessView = new LogicView.LightView(); |
| | | brightnessView.frameLayout.Y = openView.frameLayout.Bottom; |
| | | brightnessView.titleBtn.Text = Language.StringByID(MyInternationalizationString.brightness); |
| | | brightnessView.titleBtn.Text = Language.StringByID(MyInternationalizationString.brightness); |
| | | middle.AddChidren(brightnessView.Show()); |
| | | brightnessView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | |
| | | LogicView.LightView colorTemperatureView = new LogicView.LightView(); |
| | | colorTemperatureView.frameLayout.Y = brightnessView.frameLayout.Bottom; |
| | | colorTemperatureView.titleBtn.Text = Language.StringByID(MyInternationalizationString.colorTemperature); |
| | | colorTemperatureView.titleBtn.Text = Language.StringByID(MyInternationalizationString.colorTemperature); |
| | | middle.AddChidren(colorTemperatureView.Show()); |
| | | colorTemperatureView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | var logicCommunalPage = new LogicCommunalPage(); |
| | | UserView.HomePage.Instance.AddChidren(logicCommunalPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | logicCommunalPage.Show(() => { }); |
| | | |
| | | if (str_if == "logic") |
| | | { |
| | | var logicCommunalPage = new LogicCommunalPage(); |
| | | UserView.HomePage.Instance.AddChidren(logicCommunalPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | logicCommunalPage.Show(() => { }); |
| | | } |
| | | else if (str_if == "lockaction") |
| | | { |
| | | //门锁联动事件 |
| | | var lockLogicCommunalPage = new DoorLockLogic.LockLogicCommunalPage(); |
| | | UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lockLogicCommunalPage.Show(() => { }); |
| | | } |
| | | |
| | | }; |
| | | |
| | |
| | | case "8": |
| | | { |
| | | var intvalue = int.Parse(tasks["Data1"]); |
| | | var lightbrightnessvalue = intvalue / 100; |
| | | var lightbrightnessvalue = 1000000 / (intvalue * 100); |
| | | colorTemperatureView.seletecdTextBtn.Text = lightbrightnessvalue.ToString() + "K"; |
| | | } |
| | | break; |
| | |
| | | } |
| | | } |
| | | } |
| | | public void CurrentDeviceView(string if_str, CommonDevice common, bool edit,Button button) |
| | | public void CurrentDeviceView(string if_str, CommonDevice common, bool edit, Button button) |
| | | { |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | |
| | | { |
| | | case "夜灯开关": |
| | | { |
| | | |
| | | |
| | | Dictionary<string, string> switchDictionary = new Dictionary<string, string>(); |
| | | Send.dictionary(switchDictionary, "TaskType", "1"); |
| | | Send.dictionary(switchDictionary, "Data2", "0"); |
| | |
| | | status = Language.StringByID(MyInternationalizationString.close); |
| | | |
| | | }; |
| | | if ( TaskList != null&& TaskList.Count!=0) |
| | | if (TaskList != null && TaskList.Count != 0) |
| | | { |
| | | foreach (var value in TaskList) |
| | | { |
| | |
| | | SeekBarViewHeight = Application.GetRealHeight(12),//进度条的高度10 |
| | | MinValue = 30, |
| | | MaxValue = 60, |
| | | ProgressBarUnitSring="K",//切换单位 |
| | | ProgressBarUnitSring = "K",//切换单位 |
| | | }; |
| | | completeView.Show(2).AddChidren(horizontalSeekBarVol); |
| | | EventHandler<int> progressclick = (sender, e) => |
| | | { |
| | | selectedDeviceStatus = "8"; |
| | | var lightbrightnessvalue = (100 * horizontalSeekBarVol.Progress); |
| | | var lightbrightnessvalue = 1000000 / (100 * horizontalSeekBarVol.Progress); |
| | | Send.dictionary(brightnessDictionary, "Data1", lightbrightnessvalue.ToString()); |
| | | DicValue("8", brightnessDictionary); |
| | | status = horizontalSeekBarVol.Progress.ToString() + "K"; |
| | |
| | | if (value["TaskType"] == "8") |
| | | { |
| | | var intvalue = int.Parse(value["Data1"]); |
| | | var lightbrightnessvalue = intvalue / 100; |
| | | var lightbrightnessvalue = 1000000 / (intvalue * 100); |
| | | horizontalSeekBarVol.Progress = lightbrightnessvalue; |
| | | break; |
| | | } |
| | |
| | | Dictionary<string, string> switchDictionary = new Dictionary<string, string>(); |
| | | Send.dictionary(switchDictionary, "TaskType", "7"); |
| | | Send.dictionary(switchDictionary, "Data2", "0"); |
| | | |
| | | |
| | | |
| | | mFunView openView = new mFunView(); |
| | | openView.frameLayout.Y = Application.GetRealHeight(140 + 20); |