wxr
2022-05-24 610a6a826a00d47320b17478cb5ca5f60abfa291
Merge remote-tracking branch 'origin/wjc' into Dev-Branch
18个文件已修改
158 ■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -1043,6 +1043,9 @@
7154=Arrive
7155=Distress/Normal
7156=Distress
7157=whether to unlock
7158=is
@@ -2181,6 +2184,8 @@
7154=到达
7155=求救/正常
7156=求救
7157=是否开锁时
7158=是
 
HDL-ON_iOS/Resources/Language.ini
@@ -1043,6 +1043,8 @@
7154=Arrive
7155=Distress/Normal
7156=Distress
7157=whether to unlock
7158=is
@@ -2181,6 +2183,8 @@
7154=到达
7155=求救/正常
7156=求救
7157=是否开锁时
7158=是
 
HDL_ON/Common/ApiUtlis.cs
@@ -159,7 +159,8 @@
                        endTime = DateTime.Now.AddSeconds(5);
                        MainPage.Log($"读取设备信息成功");
                        var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString());
                        MainPage.Log($"sid列表获取===="+ deviceResult.Data.ToString());
                        var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString());
                        if (deviceList == null)
                        {
                            deviceList = new DevcieApiPack();
HDL_ON/Common/R.cs
@@ -2757,6 +2757,15 @@
        /// 求救
        /// </summary>
        public const int qiujiu = 7156;
        /// <summary>
        /// 是否开锁时
        /// </summary>
        public const int shifoukaisuoshi = 7157;
        /// <summary>
        /// 是
        /// </summary>
        public const int shi = 7158;
        #region LE新增
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -62,15 +62,16 @@
            likiadaodaView.frameLayout.Y = shiwaiView.frameLayout.Bottom;
            likiadaodaView.btnText.TextID = StringId.likiadaoda;
            likiadaodaView.btnIcon.UnSelectedImagePath = "LogicIcon/location.png";
            int count = 0;//输入类型个数
            if (MainView.IsGatewayType)
            {
                count = 4;
                viewLayout.AddChidren(likiadaodaView.FLayoutView());
            }
            int count = 3;//输入类型个数
            //2022年05月24日15:08:22 隐藏掉地理围栏
            //if (MainView.IsGatewayType)
            //{
            //    count = 4;
            //    viewLayout.AddChidren(likiadaodaView.FLayoutView());
            //}
            ////功能
            ///产品经理君焕要求,设备功能移到这里。<2022-3-7>
            new FunTpye(LogicMethod.condition_if).FunTypeView(viewLayout, likiadaodaView.frameLayout.Bottom, count);
            new FunTpye(LogicMethod.condition_if).FunTypeView(viewLayout, shiwaiView.frameLayout.Bottom, count);
            #endregion
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -405,6 +405,23 @@
                        };
                    }
                    break;
                //门锁
                case SPK.DoorLock:
                    {
                        LogicView.FunTypeView view = new LogicView.FunTypeView();
                        view.btnText.TextID = StringId.shifoukaisuoshi;
                        fLayout.AddChidren(view.FLayoutView());
                        view.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            DeviceView(device, view.btnState, StringId.shi, StringId.offLogic,1);
                        };
                        if (edit)
                        {
                            GetEditState(device, index, view.btnState, null, null, null);
                        }
                    }
                    break;
            }
            #region  保存
            ///保存View
@@ -482,12 +499,13 @@
        /// <param name="button">选中状态显示文本Btn控件</param>
        /// <param name="btnText1">属性状态值文本1</param>
        /// <param name="btnText2">属性状态值文本2</param>
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
        /// <param name="viewCount">view数量</param>
        private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2,int viewCount=2)
        {
            FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
            this.AddChidren(frame);
            LogicView.SwitchView switchView = new LogicView.SwitchView();
            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, (intValue) =>
            switchView.FLayoutView(frame, btnText1, btnText2, button.Text, viewCount,(intValue) =>
            {
                //设备属性值,云雀上定义好的;
                string keyVlaue = "on_off";
@@ -540,6 +558,11 @@
                            }
                        }
                        break;
                    case SPK.DoorLock:
                        {
                            keyVlaue = "door_status";
                        }
                        break;
                }
                switch (intValue)
@@ -583,6 +606,7 @@
                            }
                        }
                        break;
                    case StringId.shi:
                    case StringId.kaiqi:
                        {
                            value = "open";
@@ -607,6 +631,8 @@
                        {
                            value = "fall";
                        }; break;
                }
                //显示文本
                button.TextID = intValue;
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -219,10 +219,11 @@
                    areaView.btnClick.MouseUpEventHandler += (sender, e2) =>
                    {
                        fLayout.RemoveFromParent();
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
                        string clickText = areaView.btnClick.Tag.ToString();
                        funAllAreaView.btnText2.Text = clickText;
                        UserInfo.Current.logicselectedFunction = clickText;
                        ///获取设备单个大类spk列表(例如:灯光类,空调类...)
                        var typeFunctionList2 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                        var typeFunctionList2 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(clickText);
                        ///获取设备单个小类列表(例如:灯光1,灯光2...)
                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList2, functionList);
                       this.LoadingDeviceListView(vv, lists2);
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -447,6 +447,19 @@
                                    }
                                    break;
                                case SPK.DoorLock:
                                    {
                                        foreach (var dic in dicList)
                                        {
                                            string value = dic["value"];
                                            if (value == "open")
                                            {
                                                inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
                                            }
                                        }
                                    }
                                    break;
                            }
                        }
                        break;
@@ -1984,6 +1997,19 @@
                        }
                    }
                    break;
                case SPK.DoorLock:
                    {
                        foreach (var dic in dicList)
                        {
                            string value = dic["value"];
                            if (value == "open")
                            {
                                button1.Text = Language.StringByID(StringId.shi);
                            }
                        }
                    }
                    break;
            }
        }
        /// <summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -397,6 +397,11 @@
                        strPath = "LogicIcon/sensor.png";
                    }
                    break;
                case SPK.DoorLock:
                    {
                        strPath = "FunctionIcon/DoorLock/DoorLock.png";
                    }
                    break;
            }
            return strPath;
@@ -488,6 +493,12 @@
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.Electric));
            }
            ///门锁类
            var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock);
            if (doorlock != null)
            {
                deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock));
            }
            return deviceStrTypeList;
        }
@@ -568,6 +579,11 @@
                functionTypeList.Add(SPK.AirSwitch);
                functionTypeList.Add(SPK.PanelSocket);
                functionTypeList.Add(SPK.ElectricSocket);
            }
            ///门锁类
            else if (deviceType == Language.StringByID(StringId.DoorLock))
            {
                functionTypeList.Add(SPK.DoorLock);
            }
            else
            {
@@ -668,6 +684,7 @@
                        deviceTypeList.Add(SPK.ElectricSocket);
                        deviceTypeList.Add(SPK.HvacCac);
                        deviceTypeList.Add(SPK.SensorHelp);
                        deviceTypeList.Add(SPK.DoorLock);
                    }
                    break;
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs
@@ -97,7 +97,7 @@
        /// View的方法
        /// </summary>
        ///  <param name="frame">父控件</param>
        /// <param name="i">显示选择View数量</param>
        /// <param name="i">表示View数量</param>
        ///<param name="stateVuale">之前的状态值</param>
        /// <param name="action">返回回调</param>
        /// <returns></returns>
@@ -166,23 +166,30 @@
        /// View的方法
        /// </summary>
        ///  <param name="frame">父控件</param>
        /// <param name="text1">父控件</param>
        /// <param name="text2">显示选择View数量</param>
        /// <param name="text1">第一个备注</param>
        /// <param name="text2">第二个备注</param>
        ///<param name="stateVuale">之前的状态值</param>
        /// <param name="i">表示View数量</param>
        /// <param name="action">返回回调</param>
        /// <returns></returns>
        public void FLayoutView(FrameLayout frame, int text1, int text2, string stateVuale, Action<int> action,bool tag=true)
        public void FLayoutView(FrameLayout frame, int text1, int text2, string stateVuale, int i, Action<int> action,bool tag=true)
        {
            int i = 2;
            frameLayout.Y = Application.GetRealHeight(603 - (44 * i));
            frameLayout.Height = Application.GetRealHeight(44 * i);
            frame.AddChidren(frameLayout);
            frame.AddChidren(btnCancel);
            btnOn.TextID = text1;
            btnOff.TextID = text2;
            frameLayout.AddChidren(btnOn);
            frameLayout.AddChidren(btnLine);
            frameLayout.AddChidren(btnOff);
            if (i == 1)
            {
                frameLayout.AddChidren(btnOn);
            }
            else if (i == 2)
            {
                frameLayout.AddChidren(btnOn);
                frameLayout.AddChidren(btnLine);
                frameLayout.AddChidren(btnOff);
            }
            //取消点击事件
            btnCancel.MouseUpEventHandler += (sender1, e1) =>
            {
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -173,7 +173,7 @@
        logicIfon.Add("noticeConfig", noticeConfigJObject);
        logicIfon.Add("pushConfigs", pushConfigsArray);
        logicjArray.Add(logicIfon);
        //string str = logicIfon.ToString();
       //string str = logicIfon.ToString();
        var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
        responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add, 5);
        //如果是token过期则刷新token
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -171,7 +171,7 @@
                        ///开关点击事件
                        curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
                        {
                            SwitchViewMethod(device, curtainSwitchView.btnState, 3);
                            SwitchViewMethod(device, curtainSwitchView.btnState, 2);
                        };
                        ///百分比点击事件
                        crtainPercentumView.btnClick.MouseUpEventHandler += (sender, e) =>
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMethod.cs
@@ -574,6 +574,8 @@
                                str = Language.StringByID(StringId.shebeibucunzai);
                            }
                            break;
                        case "124006":
                        case "14006":
                            {
                                str = Language.StringByID(StringId.shebeibuzaixian);
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -291,6 +291,7 @@
        /// <returns></returns>
        public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20)
        {
            MainPage.Log("请求数据=="+o.ToString());
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -170,7 +170,7 @@
            this.picLockControl = new PicViewControl(256, 260);
            picLockControl.Y = Application.GetRealHeight(129);
            picLockControl.Gravity = Gravity.CenterHorizontal;
            picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png";
            picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png";
            FrameWhiteCentet1.AddChidren(picLockControl);
            picLockControl.ButtonClickEvent += (sender, e) =>
            {
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs
@@ -53,7 +53,7 @@
     
        /// <summary>
        /// 上一次更新的时间
        /// 记录数据反馈的时间(因为有时间网络差数据不回复,导致刷新当前播放音乐时间不正确)
        /// 记录数据反馈的时间(因为有时候网络差数据不回复,导致刷新当前播放音乐时间不正确)
        /// ((当前时间)DateTime.Now - (记录时间)LastDateTimeLastDateTime).TotalSeconds=误差时间(秒)
        /// </summary>
        public DateTime LastDateTime;
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -453,7 +453,7 @@
                                //停止播放
                                playView.startTimeBtn.Text =playTime;
                                //playView.startTimeBtn.Text ="00:00";
                                ///歌曲记录暂停时间;<LastDateTime 计算时间播放时间有用到>
                                ///记录歌曲暂停时间;<LastDateTime 计算播放时间有用到>
                                A31MusicModel.Current.LastDateTime = DateTime.Now;
                            }
                            playView.songNameTextView.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -122,10 +122,10 @@
                var musicListFunction = FunctionList.List.GetMusicList();
                for (int i = 0; i < musicListFunction.Count; i++)
                {
                    var function = musicListFunction[i];
                    var function = musicListFunction[i];
                    var music = A31MusicModel.A31MusicModelList.Find((obj) =>
                   (obj.functionMusic.deviceId == function.deviceId && function.spk == "music.standard") || (
                     obj.functionMusic.deviceId == function.deviceId && function.spk == "av.music")
                   (obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.MusicStandard) || (
                     obj.functionMusic.deviceId == function.deviceId && function.spk == SPK.AvMusic)
                    );
                    if (music == null)
                    {