| | |
| | | var temperaturedictionary = new Dictionary<string, string>(); |
| | | var modedictionary = new Dictionary<string, string>(); |
| | | var speeddictionary = new Dictionary<string, string>(); |
| | | dictionary(temperaturedictionary, "TaskType", "5"); |
| | | dictionary(modedictionary, "TaskType", "5"); |
| | | dictionary(modedictionary, "Data1", "3"); |
| | | dictionary(speeddictionary, "TaskType", "5"); |
| | | dictionary(speeddictionary, "Data1", "6"); |
| | | taskListInfo.Add(temperaturedictionary); |
| | | taskListInfo.Add(modedictionary); |
| | | taskListInfo.Add(speeddictionary); |
| | | #endregion |
| | | |
| | | #region 空调View |
| | | |
| | | devicefra.Y = Application.GetRealHeight(1920 - 600 - 210 - 160*2); |
| | |
| | | }; |
| | | devicefra.AddChidren(PickerViewfra); |
| | | |
| | | |
| | | //遮挡空调滑动view; |
| | | var pausePickerViewfra= new FrameLayout |
| | | { |
| | | Y = openframelayout.Bottom, |
| | | Height = Application.GetRealHeight(600), |
| | | BackgroundColor=0x60ffffff, |
| | | }; |
| | | devicefra.AddChidren(pausePickerViewfra); |
| | | |
| | |
| | | closerowlayout.AddChidren(closeBtnSelected); |
| | | #endregion |
| | | |
| | | |
| | | //默认26,自动,中风 |
| | | int indextemperature = 10, indexmode = 2, indexspeed = 1; |
| | | mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) => |
| | | { |
| | | indextemperature = s1; |
| | | indexmode = s2; |
| | | indexspeed = s3; |
| | | if (openBtnSelected.Visible) |
| | | { |
| | | SelectedDeviceStatusaction = "yes"; |
| | |
| | | dictionary(temperaturedictionary, "Data2", a.ToString()); |
| | | |
| | | SpeedState(speedstring, speeddictionary); |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2); |
| | | #endregion |
| | | //默认26,自动,中风 |
| | | int indextemperature = 10, indexmode = 2, indexspeed = 1; |
| | | |
| | | if (edit && TaskList != null) |
| | | { |
| | | |
| | |
| | | { |
| | | if (TaskList.Count == 1) |
| | | { |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2); |
| | | //数组只有一个元素说明当前空调状态为关; |
| | | openBtnSelected.Visible = false; |
| | | closeBtnSelected.Visible = true; |
| | |
| | | openBtnSelected.Visible = true; |
| | | closeBtnSelected.Visible = false; |
| | | pausePickerViewfra.Height = Application.GetRealHeight(0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 1); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 2); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | indexspeed = mList3.IndexOf(speedtext); |
| | | } |
| | | //4---设置加热度数;5---设置制冷、除湿度数;7---设置自动度数 |
| | | //4-设置加热度数;5-设置制冷、除湿度数;7-设置自动度数 |
| | | else if (value["Data1"] == "4" || value["Data1"] == "5" || value["Data1"] == "7") |
| | | { |
| | | var s = int.Parse(value["Data2"]) / 100; |
| | |
| | | } |
| | | ///更新最新空调状态; |
| | | mUIPickerView.setCurrentItems(indextemperature, indexmode, indexspeed); |
| | | |
| | | |
| | | ///确认事件 |
| | | EventHandler<MouseEventArgs> openclick = (sender, e) => |
| | | { |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 1); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 2); |
| | | mUIPickerView.setCurrentItems(indextemperature, indexmode, indexspeed); |
| | | pausePickerViewfra.Height = Application.GetRealHeight(0); |
| | | SelectedDeviceStatusaction = "yes"; |
| | | openBtnSelected.Visible = true; |
| | | closeBtnSelected.Visible = false; |
| | | //清除之前数据; |
| | | taskListInfo.Clear(); |
| | | //加载新数据; |
| | |
| | | taskListInfo.Add(temperaturedictionary); |
| | | taskListInfo.Add(modedictionary); |
| | | taskListInfo.Add(speeddictionary); |
| | | pausePickerViewfra.Height = Application.GetRealHeight(0); |
| | | SelectedDeviceStatusaction = "yes"; |
| | | openBtnSelected.Visible = true; |
| | | closeBtnSelected.Visible = false; |
| | | |
| | | var temperature = mList1[indextemperature].Split(' ')[0]; |
| | | var modestring = mList2[indexmode].Split(' ')[0]; |
| | | var speedstring = mList3[indexspeed].Split(' ')[0]; |
| | |
| | | ///取消事件 |
| | | EventHandler<MouseEventArgs> closeclick = (sender, e) => |
| | | { |
| | | |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1); |
| | | mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2); |
| | | mUIPickerView.setCurrentItems(indextemperature, indexmode, indexspeed); |
| | | //清除之前数据; |
| | | taskListInfo.Clear(); |
| | | dictionary(modedictionary, "TaskType", "5"); |