黄学彪
2020-12-14 e90209beae6a4e822cecb18e6889f8bda23f630e
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
@@ -7,6 +7,9 @@
using static ZigBee.Device.Panel;
namespace Shared.Phone.UserCenter.Device.Bind
{
    /// <summary>
    /// 特殊面板的绑定界面【只能绑定特定类型,每种类型只有一个目标】
    /// </summary>
    public class PaneTargetsBaseForm : BindCommonLayout
    {
        #region  构造函数
@@ -14,7 +17,7 @@
        /// 构造函数
        /// </summary>
        /// <param name="device"></param>
        /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器;5:空调目标</param>
        /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器;5:空调目标,6:地暖目标【暂时没做,因为没有该设备,后期增加】</param>
        /// <param name="bindDev">绑定目标 </param>
        public PaneTargetsBaseForm(CommonDevice device, CommonDevice bindDev, DeviceBind.BindInfo.BindType deviceBindType)
        {
@@ -68,6 +71,7 @@
        /// 3:湿度传感器
        /// 4:PM2.5传感器
        /// 5:空调目标
        /// 6:地暖目标【暂时没做,因为没有该设备,后期增加】
        /// </summary>
        DeviceBind.BindInfo.BindType curDeviceBindType = 0;
        /// <summary>
@@ -131,6 +135,10 @@
        /// </summary>
        public Action<string> actionAcTarget = null;
        /// <summary>
        /// Fh绑定目标回调
        /// </summary>
        public Action<string> actionFhTarget = null;
        /// <summary>
        /// 是否能刷新
        /// </summary>
        private bool canFresh = false;
@@ -172,6 +180,9 @@
                    break;
                case DeviceBind.BindInfo.BindType.AC:
                    titleText = Language.StringByID(R.MyInternationalizationString.AcTargets);
                    break;
                case DeviceBind.BindInfo.BindType.Fh:
                    titleText = Language.StringByID(R.MyInternationalizationString.uFloorHeatingTarget);
                    break;
            }
            this.TopFrameLayout(this, titleText);
@@ -260,7 +271,7 @@
                TextAlignment = TextAlignment.CenterLeft,
            };
            bottomTipPicFrameLayout.AddChidren(btnTipText);
            bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(2) + btnTipText.GetTextWidth();
            bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(12) + btnTipText.GetTextWidth();
            bottomTipPicFrameLayout.Gravity = Gravity.CenterHorizontal;
            EventHandler<MouseEventArgs> eHandlerEmptyTargets = (sender, e) =>
@@ -291,8 +302,8 @@
            btnFinifh = new Button()
            {
                Width = Application.GetRealWidth(907),
                Height = Application.GetRealHeight(127),
                Width = Application.GetRealWidth(907),
                Height = Application.GetRealHeight(127),
                Y = Application.GetRealHeight(49 + 35),
                Gravity = Gravity.CenterHorizontal,
                Radius = (uint)Application.GetRealHeight(127) / 2,
@@ -389,7 +400,7 @@
                    }
                }
                if (index == roomTempList.Count - 1 && index > 3)
                if (index == roomTempList.Count - 1 && index > 2)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
@@ -545,13 +556,13 @@
                {
                    line2.Visible = false;
                }
                if (Common.LocalDevice.Current.CheckDeviceIsOnline(device) == true)
                {
                    btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.TextBlack;
                }
                else
                {
                    btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                if (Common.LocalDevice.Current.CheckDeviceIsOnline(device) == true)
                {
                    btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.TextBlack;
                }
                else
                {
                    btnBindName.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
                }
                switch (curDeviceBindType)
                {
@@ -833,10 +844,10 @@
                                    {
                                        curControlDev.currentSelectRoomId = tempDevRoom.Id;
                                        curControlDev.currentSelectFloorId = tempDevRoom.FloorId;
                                    }
                                    else
                                    {
                                        curControlDev.currentSelectRoomId = "UndistributedId";
                                    }
                                    else
                                    {
                                        curControlDev.currentSelectRoomId = "UndistributedId";
                                    }
                                }