黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetStatuSelectAcForm.cs
@@ -64,7 +64,7 @@
            //头部信息
            var btnTitle = new NormalViewControl(frameBack.Width, Application.GetRealHeight(65), false);
            btnTitle.Y = Application.GetRealHeight(34);
            btnTitle.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
            btnTitle.Text = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
            btnTitle.TextColor = UserCenterColor.Current.TextColor4;
            btnTitle.TextSize = 16;
            btnTitle.TextAlignment = TextAlignment.Center;
@@ -92,7 +92,7 @@
            frameBack.AddChidren(btnFinish);
            //线
            var btnLine1 = new NormalViewControl(frameBack.Width, ControlCommonResourse.BottomLineHeight, false);
            var btnLine1 = new NormalViewControl(frameBack.Width, HdlControlResourse.BottomLineHeight, false);
            btnLine1.Y = Application.GetRealHeight(138);
            btnLine1.BackgroundColor = UserCenterColor.Current.ButtomLine;
            frameBack.AddChidren(btnLine1);
@@ -100,8 +100,8 @@
            //开
            var rowOpen = new FrameRowControl();
            rowOpen.Y = btnLine1.Bottom + Application.GetRealHeight(69);
            rowOpen.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
            rowOpen.RightOffset = ControlCommonResourse.XXLeft - Application.GetRealWidth(81);
            rowOpen.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
            rowOpen.RightOffset = HdlControlResourse.XXLeft - Application.GetRealWidth(81);
            frameBack.AddChidren(rowOpen);
            var btnOpen = rowOpen.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSimpleOpen), 400);
            btnOpen.TextColor = UserCenterColor.Current.TextGrayColor3;
@@ -112,45 +112,45 @@
            var btnOpenLine = rowOpen.AddBottomLine();
            //空调配置选择空间
            var pickerView = new UIPickerView();
            pickerView.Y = rowOpen.Bottom;
            pickerView.Height = Application.GetRealHeight(564);
            frameBack.AddChidren(pickerView);
            //这里加一个遮罩,让它不能点击
            var framePickerShaw = new FrameLayout();
            framePickerShaw.Y = pickerView.Y;
            var pickerView = new UIPickerView();
            pickerView.Y = rowOpen.Bottom;
            pickerView.Height = Application.GetRealHeight(564);
            frameBack.AddChidren(pickerView);
            //这里加一个遮罩,让它不能点击
            var framePickerShaw = new FrameLayout();
            framePickerShaw.Y = pickerView.Y;
            framePickerShaw.Height = pickerView.Height;
            framePickerShaw.BackgroundColor = 0x60ffffff;
            frameBack.AddChidren(framePickerShaw);
            //恒温器 Data1(数值): 0加热/1制冷/2自动调节/3 设置工作模式/4 设置加热度数 5/设置制冷度数 6/设置风扇模式
            //恒温器Data2数值如下:
            //【当Data1=0|1|2时,Data2为要变化的度数,单位:0.1℃ 。】
            //【若Data1=3,Data2为要设定的空调模式(0-9),0:off,1:auto,3:cool, 4:heat ,5:emergency heating, 6:precooling,7:fan only ,8:dry,9:sleep。】
            //【若Data1=4|5,Data2为加热或制冷度数,单位0.01摄氏度。】
            //【若Data1=6,Data2为要设定的风扇模式(0-6),0:off,1:low,2:medium,3:high,4:on,5:auto,6:smart】
            var listTemperature = new List<int>();
            frameBack.AddChidren(framePickerShaw);
            //恒温器 Data1(数值): 0加热/1制冷/2自动调节/3 设置工作模式/4 设置加热度数 5/设置制冷度数 6/设置风扇模式
            //恒温器Data2数值如下:
            //【当Data1=0|1|2时,Data2为要变化的度数,单位:0.1℃ 。】
            //【若Data1=3,Data2为要设定的空调模式(0-9),0:off,1:auto,3:cool, 4:heat ,5:emergency heating, 6:precooling,7:fan only ,8:dry,9:sleep。】
            //【若Data1=4|5,Data2为加热或制冷度数,单位0.01摄氏度。】
            //【若Data1=6,Data2为要设定的风扇模式(0-6),0:off,1:low,2:medium,3:high,4:on,5:auto,6:smart】
            var listTemperature = new List<int>();
            var listTemperatureStr = new List<string>();
            for (int i = 16; i <= 32; i++)
            {
                listTemperature.Add(i);
                listTemperatureStr.Add($"{i} ℃");
            }
            //模式
            var listMode = new List<int> { 1, 3, 4, 7, 8 };
            var listModeStr = new List<string> {
                Language.StringByID(R.MyInternationalizationString.Mode_Auto),
                Language.StringByID(R.MyInternationalizationString.Mode_Cool),
                Language.StringByID(R.MyInternationalizationString.Mode_Heat),
                Language.StringByID(R.MyInternationalizationString.Mode_FanOnly),
                Language.StringByID(R.MyInternationalizationString.Mode_Dry)
            };
            //风速
            var listFan = new List<int> { 1, 2, 3 };
            var listFanStr = new List<string> {
                Language.StringByID(R.MyInternationalizationString.Fan_Low),
                Language.StringByID(R.MyInternationalizationString.Fan_Middle),
                Language.StringByID(R.MyInternationalizationString.Fan_Height)
            };
            for (int i = 16; i <= 32; i++)
            {
                listTemperature.Add(i);
                listTemperatureStr.Add($"{i} ℃");
            }
            //模式
            var listMode = new List<int> { 1, 3, 4, 7, 8 };
            var listModeStr = new List<string> {
                Language.StringByID(R.MyInternationalizationString.Mode_Auto),
                Language.StringByID(R.MyInternationalizationString.Mode_Cool),
                Language.StringByID(R.MyInternationalizationString.Mode_Heat),
                Language.StringByID(R.MyInternationalizationString.Mode_FanOnly),
                Language.StringByID(R.MyInternationalizationString.Mode_Dry)
            };
            //风速
            var listFan = new List<int> { 1, 2, 3 };
            var listFanStr = new List<string> {
                Language.StringByID(R.MyInternationalizationString.Fan_Low),
                Language.StringByID(R.MyInternationalizationString.Fan_Middle),
                Language.StringByID(R.MyInternationalizationString.Fan_Height)
            };
            pickerView.setNPicker(listTemperatureStr, listModeStr, listFanStr);
            //空调控件默认为灰色
            pickerView.setTextColorCenter(UserCenterColor.Current.TextGrayColor1, 0);
@@ -161,15 +161,15 @@
            int selectTemperatureIndex = 0;
            int selectModelIndex = 0;
            int selectFanIndex = 0;
            pickerView.OnSelectChangeEvent = (value1, value2, value3) =>
            {
                //更改索引
                selectTemperatureIndex = value1;
                selectModelIndex = value2;
                selectFanIndex = value3;
            pickerView.OnSelectChangeEvent = (value1, value2, value3) =>
            {
                //更改索引
                selectTemperatureIndex = value1;
                selectModelIndex = value2;
                selectFanIndex = value3;
            };
            //底线
            var btnPickerLine = new NormalViewControl(btnOpenLine.Width, ControlCommonResourse.BottomLineHeight, false);
            var btnPickerLine = new NormalViewControl(btnOpenLine.Width, HdlControlResourse.BottomLineHeight, false);
            btnPickerLine.X = btnOpenLine.X;
            btnPickerLine.Y = pickerView.Bottom;
            btnPickerLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
@@ -178,8 +178,8 @@
            //关
            var rowClose = new FrameRowControl();
            rowClose.Y = btnPickerLine.Bottom + Application.GetRealHeight(12);
            rowClose.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
            rowClose.RightOffset = ControlCommonResourse.XXLeft - Application.GetRealWidth(81);
            rowClose.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
            rowClose.RightOffset = HdlControlResourse.XXLeft - Application.GetRealWidth(81);
            frameBack.AddChidren(rowClose);
            var btnClose = rowClose.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSimpleClose), 400);
            btnClose.TextColor = UserCenterColor.Current.TextGrayColor3;
@@ -303,18 +303,18 @@
            {
                var listData = new List<Safeguard.TaskListInfo>();
                //关
                if (btnCloseSelect.Visible == true)
                {
                    var taskInfo = new Safeguard.TaskListInfo();
                    taskInfo.TaskType = 5;
                    taskInfo.Data1 = 3;
                    taskInfo.Data2 = 0;
                    listData.Add(taskInfo);
                }
                //开
                else if (btnOpenSelect.Visible == true)
                {
                    //送风
                if (btnCloseSelect.Visible == true)
                {
                    var taskInfo = new Safeguard.TaskListInfo();
                    taskInfo.TaskType = 5;
                    taskInfo.Data1 = 3;
                    taskInfo.Data2 = 0;
                    listData.Add(taskInfo);
                }
                //开
                else if (btnOpenSelect.Visible == true)
                {
                    //送风
                    var taskInfo = new Safeguard.TaskListInfo();
                    taskInfo.TaskType = 5;
                    taskInfo.Data1 = 6;
@@ -335,24 +335,24 @@
                    //1:自动 3:制冷 4:制热 7:送风 8:除湿
                    //自动
                    if (listMode[selectModelIndex] == 1)
                    {
                    if (listMode[selectModelIndex] == 1)
                    {
                        taskInfo3.Data1 = 7;
                        listData.Add(taskInfo3);
                    }
                    //制热
                        listData.Add(taskInfo3);
                    }
                    //制热
                    else if (listMode[selectModelIndex] == 4)
                    {
                        taskInfo3.Data1 = 4;
                        listData.Add(taskInfo3);
                    }
                    //制冷,除湿默认都是 制冷
                    }
                    //制冷,除湿默认都是 制冷
                    else if (listMode[selectModelIndex] == 3 || listMode[selectModelIndex] == 8)
                    {
                        taskInfo3.Data1 = 5;
                        listData.Add(taskInfo3);
                    }
                    //送风没有温度的概念
                    }
                    //送风没有温度的概念
                }
                //获取状态的显示文本