WJC
2019-12-30 f1c3921b08bb22ac6f5db22d620e01d7e8e5c49f
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
@@ -697,6 +697,7 @@
            };
            flMain.AddChidren(devicefra);
            devicefra.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
            #region  -------取消   完成
            var timetype = new RowLayout
            {
@@ -746,7 +747,6 @@
            };
            timetype.AddChidren(Btncomplete);
            #endregion
            string SelectedDeviceStatusaction = "no";
            actionsInfo.Add("LinkType", 0);
@@ -1057,6 +1057,8 @@
                        openframelayout.AddChidren(horizontalSeekBarRow);
                        var horizontalSeekBarVol = new DiyImageSeekBar
                        {
                            Y = openrowlayout.Bottom,
                            X = Application.GetRealWidth(80),
                            Width = Application.GetRealWidth(920),
                            Height = Application.GetRealHeight(160),
                            IsProgressTextShow = true,//显示百分比
@@ -1068,7 +1070,7 @@
                            ProgressTextSize = 13,//显示百分比字体大小 
                            SeekBarViewHeight = Application.GetRealHeight(10),//进度条的高度
                        };
                        horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
                        openframelayout.AddChidren(horizontalSeekBarVol);
                        #endregion
@@ -1141,7 +1143,7 @@
                        #endregion
                        int Progressvalue = 100;
                        horizontalSeekBarVol.OnProgressChangedEvent += (sender, e) =>
                        EventHandler<int> progressclick = (sender, e) =>
                        {
                            SelectedDeviceStatusaction = "yes";
                            Progressvalue = horizontalSeekBarVol.Progress;
@@ -1159,6 +1161,8 @@
                            switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
                        };
                        horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
                        horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
                        ///确认事件
                        EventHandler<MouseEventArgs> openclick = (sender, e) =>
                        {
@@ -1355,6 +1359,8 @@
                        openframelayout.AddChidren(horizontalSeekBarRow);
                        var horizontalSeekBarVol = new DiyImageSeekBar
                        {
                            Y = openrowlayout.Bottom,
                            X = Application.GetRealWidth(80),
                            Width = Application.GetRealWidth(920),
                            Height = Application.GetRealHeight(160),
                            IsProgressTextShow = true,//显示百分比
@@ -1366,7 +1372,7 @@
                            ProgressTextSize = 13,//显示百分比字体大小 
                            SeekBarViewHeight = Application.GetRealHeight(10),//进度条的高度
                        };
                        horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
                        openframelayout.AddChidren(horizontalSeekBarVol);
                        #endregion
@@ -1406,7 +1412,7 @@
                        #endregion
                        int Progressvalue = 100;
                        horizontalSeekBarVol.OnProgressChangedEvent += (sender, e) =>
                        EventHandler<int> progressclick = (sender, e) =>
                        {
                            SelectedDeviceStatusaction = "yes";
                            Progressvalue = horizontalSeekBarVol.Progress;
@@ -1422,6 +1428,8 @@
                            switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
                        };
                        horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
                        horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
                        ///确认事件
                        EventHandler<MouseEventArgs> openclick = (sender, e) =>
                        {
@@ -1741,7 +1749,6 @@
                        }
                    }
                    break;
                case DeviceType.Thermostat:
                    {
@@ -1749,8 +1756,14 @@
                        Dictionary<string, string> temperaturedictionary = new Dictionary<string, string>();
                        Dictionary<string, string> modedictionary = new Dictionary<string, string>();
                        Dictionary<string, string> 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
@@ -1799,15 +1812,14 @@
                        };
                        devicefra.AddChidren(PickerViewfra);
                        //遮挡空调滑动view;
                        var pausePickerViewfra = new FrameLayout
                        {
                            Y = openframelayout.Bottom,
                            Height = Application.GetRealHeight(600),
                            BackgroundColor = 0x60ffffff,
                        };
                        devicefra.AddChidren(pausePickerViewfra);
                        var mUIPickerView = new UIPickerView
                        {
@@ -1842,6 +1854,9 @@
                            mList1.Add(i.ToString() + " " + "℃");
                        }
                        mUIPickerView.setNPicker(mList1, mList2, mList3);
                        mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0);
                        mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1);
                        mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2);
                        ///默认状态
@@ -1880,9 +1895,13 @@
                        #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";
@@ -1900,14 +1919,16 @@
                        };
                        #endregion
                        //默认26,自动,中风
                        int indextemperature = 10, indexmode = 2, indexspeed = 1;
                        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;
@@ -1918,6 +1939,9 @@
                                }
                                else
                                {
                                    mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 0);
                                    mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 1);
                                    mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 2);
                                    openBtnSelected.Visible = true;
                                    closeBtnSelected.Visible = false;
                                    pausePickerViewfra.Height = Application.GetRealHeight(0);
@@ -2011,6 +2035,9 @@
                        ///确认事件
                        EventHandler<MouseEventArgs> openclick = (sender, e) =>
                        {
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 0);
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 1);
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnSelectedColor, 2);
                            //清除之前数据;
                            taskListInfo.Clear();
                            //加载新数据;
@@ -2044,7 +2071,9 @@
                        ///取消事件
                        EventHandler<MouseEventArgs> closeclick = (sender, e) =>
                        {
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 0);
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 1);
                            mUIPickerView.setTextColorCenter(ZigbeeColor.Current.LogicBtnCancelColor, 2);
                            //清除之前数据;
                            taskListInfo.Clear();
                            dictionary(modedictionary, "TaskType", "5");
@@ -2066,7 +2095,6 @@
            }
            Btncomplete.MouseUpEventHandler += (sender, e) =>
            {