wxr
2023-09-14 8f9f20698e1256a58ee6894a9bc168a9dfb37861
Merge branch 'Dev-Branch' into wxr-2.0
15个文件已修改
218 ■■■■ 已修改文件
HDL-ON_Android/Resources/Resource.designer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/SiriIntents.csproj 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntentsUI/SiriIntentsUI.csproj 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/Resource.designer.cs
@@ -15,7 +15,7 @@
{
    
    
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
    public partial class Resource
    {
        
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -55,7 +55,7 @@
        <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
        <MtouchDebug>true</MtouchDebug>
        <MtouchI18n>cjk</MtouchI18n>
        <MtouchLink>SdkOnly</MtouchLink>
        <MtouchLink>None</MtouchLink>
        <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
        <MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
@@ -70,11 +70,12 @@
        <WarningLevel>4</WarningLevel>
        <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
        <MtouchArch>ARM64</MtouchArch>
        <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey>
        <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
        <MtouchLink>SdkOnly</MtouchLink>
        <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
        <MtouchI18n>cjk</MtouchI18n>
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <CodesignProvision>OnPro2307291-Dev</CodesignProvision>
    </PropertyGroup>
    <ItemGroup>
        <Reference Include="System" />
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        const string APP_KEY = "HDL-HOME-APP-TEST";
        const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
HDL_ON/Entity/Function/Function.cs
@@ -451,7 +451,7 @@
        public bool online {
            get
            {
                if (spk == SPK.AirSwitchP3)
                if (spk == SPK.AirSwitchP3|| spk == SPK.ElectricalTvHisense)
                {
                    return _online;
                }
HDL_ON/Entity/FunctionList.cs
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -717,9 +717,9 @@
                        functionCount = FunctionList.List.GetElectricals().Count;
                        functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.spk!=SPK.ElectricalTvHisense&&obj.trait_on_off.curValue.ToString() == "on").Count;
#if DEBUG
                        functionCount = 1;
#endif
//#if DEBUG
//                        functionCount = 1;
//#endif
                        #endregion
                        break;
                    case ShowFunction.EnergyMonitoring:
@@ -835,7 +835,9 @@
                    IsMoreLines = true,
                };
                functionView.AddChidren(btnName); 
                //不需要显示设备开状态数量;
                Button btnFunctionCount=null;
                if (item != ShowFunction.Aks
                    && item != ShowFunction.VideoDoorLock
                    && item != ShowFunction.Environmental
@@ -849,7 +851,7 @@
                    && item != ShowFunction.Acst && item != ShowFunction.IpCam
                    && functionCount != 0)
                {
                    Button btnFunctionCount = new Button()
                    btnFunctionCount = new Button()
                    {
                        X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length),
                        Y = btnName.Bottom,
@@ -1213,8 +1215,7 @@
                        {
                            var list =CommonMethod.Current.GetVideoDoorLockList();
                            var form = new VideoDoorLockListPage(()=> {
                                functionContentView?.RemoveFromParent();
                                this.RefreshFunctionView();
                                UpdateBottomView();
                            });
                            form.AddForm(list);
                        };
@@ -1226,8 +1227,7 @@
                        {
                            var list = HDL_ON.UI.UI2.FuntionControlView.Aks.AksCommonMethod.Current.GetVideoControlsList();
                            var form = new HDL_ON.UI.UI2.FuntionControlView.Aks.AksListPage(() => {
                                functionContentView?.RemoveFromParent();
                                this.RefreshFunctionView();
                                UpdateBottomView();
                            });
                            form.AddForm(list);
                        };
@@ -1249,10 +1249,16 @@
                {
                    btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                    {
                        var skipView = new FunctionPage();
                        MainPage.BasePageView.AddChidren(skipView);
                        skipView.LoadPage(functionPageTitleId);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        skipView.DelAction += () =>
                        {
                            UpdateBottomView();
                        };
                    };
                }
                index++;
@@ -1791,5 +1797,17 @@
        }
#endregion
        /// <summary>
        /// 更新底部界面
        /// </summary>
        void UpdateBottomView()
        {
            Application.RunOnMainThread(() =>
            {
                functionContentView?.RemoveFromParent();
                this.RefreshFunctionView();
            });
        }
    }
}
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -30,6 +30,7 @@
        List<Function> functionList;
        int titleId;
        public Action DelAction;
        public FunctionPage()
        {
            bodyView = this;
@@ -185,7 +186,9 @@
            }
            else if (titleId == StringId.Electric)
            {
                functionList.AddRange(FunctionList.List.GetElectricals());
            }
            else if (titleId == StringId.EnvironmentalScience)
            {
@@ -320,6 +323,7 @@
                                    functionListView.RemoveAll();
                                    showList.Remove(function);//先移除
                                    ShowFunctionRow(showList,isAppend);
                                    this.DelAction?.Invoke();
                                };
                                var functionDiv = new FunctionControlZone(function, deviceDelAction) 
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using HDL_ON.Entity;
using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
using Com.Alibaba.Fastjson;
namespace HDL_ON.UI.UI2.Intelligence.Automation
{
@@ -818,7 +819,7 @@
                    ////萤石视频门锁
                    inputDevice.condition_type = "9";
                    inputDevice.identifier = this.identifier;
                    inputDevice.condition = new List<Dictionary<string, string>>();
                    //inputDevice.condition = new List<Dictionary<string, string>>();
                }
                else if (device.spk == SPK.SensorPirHold)
                {
@@ -1304,8 +1305,10 @@
                            if (indexeList.Count > 0)
                            {
                                dicSateteList.Clear();
                                string s = string.Empty;
                                string seleTxet = string.Empty;
                                string tag = string.Empty;
                                string[] array = new string[indexeList.Count];
                                for (int i = 0; i < indexeList.Count; i++)
                                {
                                    if (i > faceIdList.Count)
@@ -1314,15 +1317,15 @@
                                    }
                                    var indexe = indexeList[i];
                                    var face = faceIdList[indexe];
                                    //数据封装<高胜说萤石那边是推送用户名>
                                    AddDictionary("open_user", face.userName, "string");
                                    s += face.userName;
                                    s += ",";
                                    tag += face.userId;
                                    tag += "_";
                                    array[i] = face.userName;
                                }
                                seleTxet= JSON.ToJSONString(array);
                                //数据封装<高胜说萤石那边是推送用户名>
                                AddDictionary("open_user",seleTxet, "string", "[]");
                                //界面显示选中值
                                btnState.Text = s;
                                btnState.Text = InpOrOutLogicMethod.Current.RemoveLastStr(seleTxet);
                                btnState.Tag = tag;
                            }
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -418,7 +418,7 @@
                                    break;
                                case SPK.VideoDoorLock:
                                    {
                                        string s = string.Empty;
                                        string userName = string.Empty;
                                        string tag = string.Empty;
                                        for (int b = 0; b < dicList.Count; b++)
                                        {
@@ -429,11 +429,9 @@
                                            //s += ",";
                                            //tag += FaceItem.userId;
                                            //tag += "_";
                                            var userName = dic["value"].ToString();
                                            s += userName;
                                            s += ",";
                                            userName = dic["value"].ToString();
                                        }
                                        inputView.btnState.Text = s;
                                        inputView.btnState.Text = RemoveLastStr(userName);
                                    }
                                    break;
                                case SPK.doorgate:
@@ -1502,7 +1500,8 @@
                                        if (stateStr.StartsWith(";"))
                                        {
                                            stateStr = stateStr.Substring(1, stateStr.Length - 1);
                                        } else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        }
                                        else if (stateStr.EndsWith(Language.StringByID(StringId.volumeMusic)))
                                        {
                                            stateStr = stateStr.Substring(0, stateStr.Length - 3);
                                        }
@@ -2460,7 +2459,7 @@
                    break;
                case SPK.VideoDoorLock:
                    {
                        string s = string.Empty;
                        string userName = string.Empty;
                        string tag = string.Empty;
                        for (int b = 0; b < dicList.Count; b++)
                        {
@@ -2471,11 +2470,10 @@
                            //s += ",";
                            //tag += FaceItem.userId;
                            //tag += "_";
                            var userName = dic["value"].ToString();
                            s += userName;
                            s += ",";
                            userName = dic["value"].ToString();
                        }
                        button1.Text = s;
                        button1.Text = RemoveLastStr(userName);
                        button1.Tag = tag;
                    }
                    break;
@@ -3106,6 +3104,20 @@
            return face;
        }
        /// <summary>
        /// 删除最后一个 ","
        /// </summary>
        /// <param name="s">字符串</param>
        /// <returns></returns>
        public string RemoveLastStr(string s)
        {
            if (string.IsNullOrEmpty(s))
            {
                return string.Empty;
            }
            return s.Replace("[","").Replace("]","").Replace("\"","").TrimEnd(',');
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs
@@ -14,7 +14,7 @@
        {
            this.Width = Application.GetRealWidth(width);
            this.Height = Application.GetRealWidth(height);
            this.Radius = (uint)Application.GetRealHeight(cornerValue);
            this.Radius = (uint)Application.GetRealWidth(cornerValue);
            this.BackgroundColor = MusicColor.ViewColor;
            this.Gravity = Gravity.CenterHorizontal;
        }
@@ -97,7 +97,7 @@
            Gravity=Gravity.Center,
            Width = Application.GetRealWidth(76),
            Height = Application.GetRealWidth(76),
            Radius = (uint)Application.GetRealHeight(38),
            Radius = (uint)Application.GetRealWidth(38),
            BackgroundColor = MusicColor.WhiteColor,
@@ -107,7 +107,7 @@
            Gravity = Gravity.Center,
            Width = Application.GetRealWidth(28),
            Height = Application.GetRealWidth(28),
            Radius = (uint)Application.GetRealHeight(14),
            Radius = (uint)Application.GetRealWidth(14),
            BackgroundColor = 0xff1B2D4D,
            SelectedBackgroundColor = MusicColor.SelectedColor,
            Name = "确定"
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -526,7 +526,12 @@
                    Radius = (uint)Application.GetRealWidth(22),
                    BackgroundColor = CSS_Color.MainBackgroundColor,
                };
                //如果是成员隐藏收藏功能
                if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
                {
                contentView.AddChidren(delTextBtn);
                }
                EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
                {
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
@@ -105,7 +105,7 @@
            //初始化事件
            this.EventListener();
            //读取数据
            //this.ReadData();
            this.ReadData();
        }
@@ -293,6 +293,26 @@
        {
            try
            {
                if (this.device == null)
                {
                    //设备不在线控制失败
                    Application.RunOnMainThread(() =>
                    {
                        CommonMethod.Current.ShowTip(Language.StringByID(StringId.shebeibuzaixian), 3);
                    });
                    return;
                }
                if (!this.device.online)
                {
                    //设备不在线控制失败
                    Application.RunOnMainThread(() =>
                    {
                        CommonMethod.Current.ShowTip(Language.StringByID(StringId.shebeibuzaixian), 3);
                    });
                    return;
                }
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add(key, value);
                Send.Current.SendControlCommand(this.device, dic, action);
@@ -304,14 +324,27 @@
        /// </summary>
        private void ReadData()
        {
            if (this.device == null)
            {
                return;
            }
            CommonMethod.Current.Loading.Start();
            CommonMethod.Current.SunThread(() =>
            {
                try
                {
                    CommonMethod.Current.MainThread(() =>
                    var isRefreshDeviceStatus = Send.Current.RefreshDeviceStatus(new List<string> { this.device.deviceId });
                    if (isRefreshDeviceStatus)
                    {
                    });
                        var fun = Send.Current.GetDeviceInfo(this.device.deviceId);
                        if (fun != null)
                        {
                            //更新真实在线状态
                            this.device.online = fun.online;
                        }
                    }
                }
                catch { }
                finally
@@ -431,7 +464,7 @@
            yinliangFL.Y = Application.GetRealHeight(260);
            yinliangFL.X = shouyeFL.X;
            yinliangFL.BackgroundColor = 0xffF2F3F7;
            yinliangFL.Radius = (uint)Application.GetRealHeight(34);
            yinliangFL.Radius = (uint)Application.GetRealWidth(34);
            btn_jia = new Button
            {
@@ -723,8 +756,10 @@
            this.IsMoreLines = true;
            this.BackgroundColor = 0xffECEDEE;
            this.SelectedBackgroundColor = 0xFFF2F3F7;
            this.Radius = (uint)Application.GetRealHeight(30);
            this.Radius = (uint)Application.GetRealHeight(19);
            this.Padding = new Padding(0, 0, 0, 0);
        }
        /// <summary>
        /// 事件监听方法
@@ -781,6 +816,7 @@
            SelectedTextColor = MusicColor.MusicTxet14SelectedColor,
            TextSize = TextSize.Text16,
            TextID = StringId.kongzhi,
            Padding = new Padding(0, 0, 0, 0),
            IsBold = true,
        };
@@ -814,7 +850,8 @@
            TextColor = MusicColor.TextColor,
            SelectedTextColor = MusicColor.MusicTxet14SelectedColor,
            TextSize = TextSize.Text16,
            Text = "信号源",
            TextID = StringId.xinhaoyuan,
            Padding = new Padding(0, 0, 0, 0),
            IsBold = true,
        };
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -73,6 +73,56 @@
        }
        /// <summary>
        /// 刷新设备状态
        /// </summary>
        /// <param name="tipType">是否需要提示,默认提示</param>
        /// <returns></returns>
        public bool RefreshDeviceStatus(List<string> functionIds, TipType tipType = TipType.flicker)
        {
            try
            {
                Dictionary<string, object> d = new Dictionary<string, object>();
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", functionIds);
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "刷新设备状态");
                if (!this.DataChecking(responsePackNew, tipType))
                {
                    return false;
                }
                return true;
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 获取设备详情
        /// </summary>
        /// <param name="tipType">是否需要提示,默认提示</param>
        /// <returns></returns>
        public Function GetDeviceInfo(string functionId, TipType tipType = TipType.flicker)
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceIds", new List<string>() { functionId });
            var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GetDevcieInfoList, "获取设备详情");
            if (!this.DataChecking(responsePackNew, tipType))
            {
                return null;
            }
            var functionList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Function>>(responsePackNew.Data.ToString());
            if (functionList != null && functionList.Count > 0)
            {
                return functionList[0];
            }
            return null;
        }
        /// <summary>
        ///删除设备
        /// </summary>
        /// <param name="deviceId">设备id</param>
SiriIntents/SiriIntents.csproj
@@ -37,7 +37,7 @@
    <DefineConstants></DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <CodesignKey>iPhone Distribution</CodesignKey>
    <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
    <MtouchUseLlvm>true</MtouchUseLlvm>
    <MtouchFloat32>true</MtouchFloat32>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
@@ -45,6 +45,7 @@
    <MtouchArch>ARM64</MtouchArch>
    <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
    <MtouchVerbosity></MtouchVerbosity>
    <CodesignProvision>OnProSiri230729-1-Dev</CodesignProvision>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
    <DebugType>pdbonly</DebugType>
SiriIntentsUI/SiriIntentsUI.csproj
@@ -38,7 +38,7 @@
    <DefineConstants></DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <CodesignKey>iPhone Distribution</CodesignKey>
    <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey>
    <MtouchUseLlvm>true</MtouchUseLlvm>
    <MtouchFloat32>true</MtouchFloat32>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
@@ -47,6 +47,7 @@
    <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
    <MtouchVerbosity></MtouchVerbosity>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
    <DebugType>pdbonly</DebugType>