gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
@@ -1040,7 +1040,7 @@
                        };
                        openrowlayout.AddChidren(btnopen);
                        var openBtnSelected = new SelectedButton();
                        var openBtnSelected = new SelectedButton();
                        openrowlayout.AddChidren(openBtnSelected);
                        var horizontalSeekBarRow = new RowLayout
@@ -1049,7 +1049,7 @@
                            Width = Application.GetRealWidth(920),
                            Height = Application.GetRealHeight(160),
                            X = Application.GetRealWidth(80),
                           LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                            LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
                        };
                        openframelayout.AddChidren(horizontalSeekBarRow);
                        var horizontalSeekBarVol = new DiyImageSeekBar
@@ -1064,7 +1064,7 @@
                            ThumbImagePath = "ZigeeLogic/progressbtn2.png",//进度条按钮图标
                            ThumbImageHeight = Application.GetRealHeight(56),//进度条按钮图标的高度(默认正方形:宽和高一样)
                            ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                            ProgressTextSize = 13,//显示百分比字体大小
                            ProgressTextSize = 12,//显示百分比字体大小
                            SeekBarViewHeight = Application.GetRealHeight(10),//进度条的高度
                        };
@@ -1142,7 +1142,6 @@
                        int Progressvalue = 100;
                        EventHandler<int> progressclick = (sender, e) =>
                         {
                             Console.WriteLine("12345");
                             SelectedDeviceStatusaction = "yes";
                             Progressvalue = horizontalSeekBarVol.Progress;
                             if (switchdictionary.ContainsKey("TaskType"))
@@ -1357,8 +1356,8 @@
                        openframelayout.AddChidren(horizontalSeekBarRow);
                        var horizontalSeekBarVol = new DiyImageSeekBar
                        {
                            X = Application.GetRealWidth(80),
                            Y = openrowlayout.Bottom,
                            X = Application.GetRealWidth(80),
                            Width = Application.GetRealWidth(920),
                            Height = Application.GetRealHeight(160),
                            IsProgressTextShow = true,//显示百分比
@@ -1366,9 +1365,9 @@
                            ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//选中进度条颜色
                            ThumbImagePath = "ZigeeLogic/progressbtn2.png",//进度条按钮图标
                            ThumbImageHeight = Application.GetRealHeight(56),//进度条按钮图标的高度(默认正方形:宽和高一样)
                            ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                            ProgressTextSize = 14,//显示百分比字体大小
                            SeekBarViewHeight = Application.GetRealHeight(10),//进度条的高度
                            ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,//进度条原颜色
                            ProgressTextSize = 12,//显示百分比字体大小
                            SeekBarViewHeight = Application.GetRealHeight(10),
                        };
                        openframelayout.AddChidren(horizontalSeekBarVol);
@@ -1747,7 +1746,7 @@
                        }
                    }
                    break;
                ///空调
                case DeviceType.Thermostat:
                    {
@@ -1755,8 +1754,15 @@
                       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);
@@ -1803,11 +1809,12 @@
                        };
                        devicefra.AddChidren(PickerViewfra);
                        //遮挡空调滑动view;
                        var pausePickerViewfra= new FrameLayout
                        {
                            Y = openframelayout.Bottom,
                            Height = Application.GetRealHeight(600),
                            BackgroundColor=0x60ffffff,
                        };
                        devicefra.AddChidren(pausePickerViewfra);
@@ -1882,11 +1889,14 @@
                        var closeBtnSelected = new SelectedButton();
                        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";
@@ -1898,20 +1908,23 @@
                                dictionary(temperaturedictionary, "Data2", a.ToString());
                                SpeedState(speedstring, speeddictionary);
                            }
                        };
                        #endregion
                        //默认26,自动,中风
                        int indextemperature = 10, indexmode = 2, indexspeed = 1;
                       mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0);
                        mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1);
                        mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2);
                        #endregion
                        if (edit && TaskList != null)
                        {
                            foreach (var value in TaskList)
                            {
                                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;
@@ -1925,6 +1938,9 @@
                                    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);
                                }
@@ -1998,7 +2014,7 @@
                                        }
                                        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;
@@ -2012,10 +2028,18 @@
                        }
                        ///更新最新空调状态;
                        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();
                            //加载新数据;
@@ -2027,10 +2051,7 @@
                            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];
@@ -2049,6 +2070,10 @@
                        ///取消事件
                        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");
@@ -2083,9 +2108,9 @@
                {
                    if (!edit)
                    {
                        var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
                                               Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
                                               Language.StringByID(MyInternationalizationString.confrim));
                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
                               Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
                              Language.StringByID(MyInternationalizationString.confrim));
                        alert.Show();
                        return;
                    }