wxr
2022-04-21 3f45dd0172305bef0008e4e5a8725dedec2340c9
紧急求助按钮备份
5个文件已添加
14个文件已修改
250 ■■■■■ 已修改文件
HDL-ON_Android/Assets/Phone/FunctionIcon/Panel/PanelHelpAlarmBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Panel/PanelHelpNormalBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushReceiver.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Panel/PanelHelpAlarmBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/Panel/PanelHelpNormalBgIcon.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/Panel/PanelHelpAlarmBgIcon.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Panel/PanelHelpNormalBgIcon.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -239,6 +239,8 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorhelp.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_blue.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
@@ -1446,6 +1448,7 @@
    <Folder Include="libs\arm64-v8a\" />
    <Folder Include="Zxing\" />
    <Folder Include="Assets\Phone\FunctionIcon\CAC\" />
    <Folder Include="Assets\Phone\FunctionIcon\Panel\" />
  </ItemGroup>
  <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -80,6 +80,7 @@
            //UserInfo.Current.pushMesExpantContent = pushMes.expantContent;
            //UserInfo.Current.PushMesHomeId = pushMes.HomeId;
            UserInfo.Current.pushMessageInfo = pushMes;
            if (!string.IsNullOrEmpty(pushMes.spk))//自研可视对讲需要记录时间反呼
            UserInfo.Current.inCall = DateTime.Now;
            Shared.Application.RunOnMainThread(() =>
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202204081" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202204201">
    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" />
    <!--友盟-->
    <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -486,6 +486,7 @@
        <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" />
        <Folder Include="Base.lproj\" />
        <Folder Include="Resources\Phone\FunctionIcon\CAC\" />
        <Folder Include="Resources\Phone\FunctionIcon\Panel\" />
    </ItemGroup>
    <ItemGroup>
        <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1399,6 +1400,8 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorhelp.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_blue.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>CFBundleShortVersionString</key>
    <string>1.5.502204081</string>
    <string>1.5.502204201</string>
    <key>CFBundleVersion</key>
    <string>1.5.504081</string>
    <string>1.5.504201</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Phone/FunctionIcon/Panel/PanelHelpAlarmBgIcon.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Panel/PanelHelpNormalBgIcon.png
HDL_ON/DAL/DriverLayer/Control.cs
@@ -951,6 +951,7 @@
        /// <summary>
        /// 更新设备状态
        /// A协议数据
        /// Tag Link状态处理
        /// </summary>
        /// <param name="updateBytes"></param>
        public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false)
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -511,6 +511,7 @@
                                }
                                #endregion
                                //A网关设备状态-包含涂鸦设备
                                //Tag 网络状态解析
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send")
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
HDL_ON/Entity/Function/Function.cs
@@ -1465,7 +1465,6 @@
            spkList.Add(SensorDryContact2);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            spkList.Add(SensorHelp);
            return spkList;
        }
HDL_ON/HDL_ON.projitems
@@ -493,6 +493,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacDayHistoryPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacHistoryChoosePage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Panel\PanelHelpPage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -204,6 +204,11 @@
                        var doorLockPage = new DoorLockPage();
                        doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                    case SPK.SensorHelp:
                        var panelHelpPage = new HDL_ON.UI.UI2.FuntionControlView.Panel.PanelHelpPage();
                        panelHelpPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                        break;
                }
            };
            return eventHandler;
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -633,9 +633,10 @@
                attributes = new List<FunctionAttributes>()
                {
                    new FunctionAttributes(){ key = "status",curValue= "on",state = "on" },
                    new FunctionAttributes(){ key = "battery_value",curValue= "2000",state = "2000" },
                    new FunctionAttributes(){ key = "battery_percentage",curValue= "80",state = "80" },
                    new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
                    new FunctionAttributes(){ key = "alarm_status",curValue= "alarm",state = "alarm" },
                    new FunctionAttributes(){ key = "battery_value",curValue= "200",state = "200" },
                    new FunctionAttributes(){ key = "battery_percentage",curValue= "10",state = "10" },
                    new FunctionAttributes(){ key = "battery_state",curValue= "low",state = "low" },
                },
            });
@@ -884,6 +885,7 @@
        /// <summary>
        /// 加载设备功能显示区域
        /// Tag 收藏卡片
        /// </summary>
        void LoadDeviceFunctionControlZone()
        {
@@ -1097,6 +1099,7 @@
        /// <summary>
        /// 加载功能控制卡片
        /// Tag 卡片自定义
        /// </summary>
        void LoadDeviceFunctionDiv(FrameLayout view, Function function)
        {
@@ -1311,6 +1314,11 @@
                    LoadEvent_ControlClothesHanger(function, btnUp, btnDown);
                }
                //紧急求助
                else if (function.spk == SPK.SensorHelp)
                {
                }
                else
                {
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -647,6 +647,7 @@
            var functionCategoryCount = 0;
            //Tag 分类卡片显示
            foreach (var item in DB_ResidenceData.Instance.functionTypeList)
            {
                int functionCount = 0;
@@ -709,8 +710,7 @@
#endif
                        break;
                    case ShowFunction.Panel:
                        functionCount = FunctionList.List.GetPanelList().Count;
                        break;
                    case ShowFunction.SecurityMonitoring:
                        if (!MainPage.NoLoginMode)
@@ -790,10 +790,28 @@
                };
                functionView.AddChidren(btnName);
                //Tag 数量显示
                if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom
                    && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music
                    && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter
                    && functionCount != 0)
                {
                    if (item == ShowFunction.Panel)
                    {
                        Button btnFunctionCount = new Button()
                        {
                            X = Application.GetRealWidth(16),
                            Y = btnName.Bottom,
                            Width = Application.GetRealWidth(120),
                            Height = Application.GetRealHeight(24),
                            TextColor = CSS_Color.PromptingColor1,
                            TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                            TextAlignment = TextAlignment.CenterLeft,
                            Text = functionCount.ToString(),
                        };
                        functionView.AddChidren(btnFunctionCount);
                    }
                    else
                {
                    Button btnFunctionCount = new Button()
                    {
@@ -822,6 +840,7 @@
                    };
                    functionView.AddChidren(btnOpenCount);
                }
                }
                Button btnFunctionViewBg;
@@ -832,6 +851,7 @@
                };
                functionView.AddChidren(btnFunctionViewBg);
                //Tag 调试事件判断
                int functionPageTitleId = 0;
                switch (item)
                {
@@ -1024,7 +1044,8 @@
                        };
                        break;
                    case ShowFunction.Panel:
                        btnName.TextID = StringId.Panel;
                        btnName.TextID = StringId.SmartPanel;
                        functionPageTitleId = StringId.SmartPanel;
                        break;
                    case ShowFunction.SecurityMonitoring:
                        btnName.TextID = StringId.SecurityMonitoring;
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -54,6 +54,7 @@
        /// <summary>
        /// 加载功能类型控制卡片
        /// Tag 功能属性显示
        /// </summary>
        public void LoadFunctionDiv()
        {
@@ -76,8 +77,7 @@
            {//音乐没有开关按钮
                MusicFragment();
            }
            else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)
                || SPK.PanelSpkList().Contains(function.spk)) //传感器没有开关按钮)
            else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //传感器没有开关按钮)
            {
                var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                if (powerLowTipAttr != null)
@@ -101,6 +101,46 @@
            {
                btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png";
            }
            else if(SPK.PanelSpkList().Contains(function.spk))//智能面板设备
            {
                var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
                if (powerLowTipAttr != null)
                {
                    if (powerLowTipAttr.state.ToLower() == "low")
                    {
                        Button btnTipPowerLow = new Button()
                        {
                            X = Application.GetRealWidth(307),
                            Y = Application.GetRealHeight(70),
                            Width = Application.GetRealWidth(24),
                            Height = Application.GetRealWidth(24),
                            UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                            SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
                        };
                        this.AddChidren(btnTipPowerLow);
                    }
                }
                var alarmStatusAttr = function.GetAttribute("alarm_status");
                if(alarmStatusAttr !=null)
                {
                    var btnAlarmStatus = new Button()
                    {
                        X = Application.GetRealWidth(8 + 10 + 32),
                        Y = Application.GetRealHeight(53),
                        Width = Application.GetRealWidth(200),
                        Height = Application.GetRealHeight(24),
                        TextAlignment = TextAlignment.CenterLeft,
                        TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
                        Tag = "AlarmStatus"
                    };
                    if(alarmStatusAttr.state == "alarm")
                    {
                        btnAlarmStatus.TextID = StringId.InAlarm;
                        btnAlarmStatus.TextColor = CSS_Color.WarningColor;
                    }
                    bodyDiv.AddChidren(btnAlarmStatus);
                }
            }
            else
            {
                if (function.spk == SPK.ClothesHanger)//晾衣架
HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -114,6 +114,7 @@
            };
            bodyView.AddChidren(functionListView);
            //Tag 显示列表
            if (titleId == StringId.Lights)
            {
                functionList.AddRange(FunctionList.List.GetLightList());
HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs
New file
@@ -0,0 +1,142 @@
using System;
using HDL_ON.Entity;
using HDL_ON.Stan;
using HDL_ON.UI.CSS;
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Panel
{
    public class PanelHelpPage : DeviceFunctionCardCommonForm
    {
        #region ■ 变量声明___________________________
        /// <summary>
        /// 图标
        /// </summary>
        private IconViewControl btnIcon = null;
        /// <summary>
        /// 文本控件
        /// </summary>
        private NormalViewControl btnSuctionView = null;
        #endregion
        #region ■ 初始化_____________________________
        /// <summary>
        /// 初始化白色区域的内容
        /// </summary>
        public override void InitFrameWhiteContent()
        {
            base.ShowColltionButton = false;
            base.SetTitleText(Language.StringByID(StringId.SmartPanel));
            //添加第二索引页
            this.AddSecondPage();
            //初始化第一个索引页的内容
            this.InitFrameWhiteContent1();
            //初始化第二个索引页的内容
            this.InitFrameWhiteContent2();
            //刷新界面状态
            this.RefreshFormStatu();
            //读取状态
            new System.Threading.Thread(() =>
            {
                DriverLayer.Control.Ins.SendReadCommand(device);
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 初始化第一个索引页的内容
        /// </summary>
        private void InitFrameWhiteContent1()
        {
            btnIcon = new IconViewControl(198)
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealWidth(146),
                UnSelectedImagePath = "FunctionIcon/Panel/PanelHelpNormalBgIcon.png",
                SelectedImagePath = "FunctionIcon/Panel/PanelHelpAlarmBgIcon.png",
            };
            FrameWhiteCentet1.AddChidren(btnIcon);
            btnSuctionView = new NormalViewControl(300, 84, true)
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnIcon.Bottom,
                TextAlignment = TextAlignment.Center,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.MainColor,
                SelectedTextColor = CSS_Color.AuxiliaryColor2,
                //BackgroundColor = 0xFFFF0000
            };
            FrameWhiteCentet1.AddChidren(btnSuctionView);
        }
        /// <summary>
        /// 初始化第二个索引页的内容
        /// </summary>
        private void InitFrameWhiteContent2()
        {
            var paging = new ArmSensorHistroyPaging(device);
            paging.InitFrame(FrameWhiteCentet2);
        }
        #endregion
        #region ■ 设备状态反馈_______________________
        /// <summary>
        /// 设备状态反馈
        /// </summary>
        /// <param name="i_LocalDevice"></param>
        public override void DeviceStatuPush(Function i_LocalDevice)
        {
            //不是同一个东西
            if (this.device.sid != i_LocalDevice.sid) { return; }
            //刷新界面状态
            this.RefreshFormStatu();
        }
        #endregion
        #region ■ 发送各种命令_______________________
        #endregion
        #region ■ 刷新界面状态_______________________
        /// <summary>
        /// 刷新界面状态
        /// </summary>
        private void RefreshFormStatu()
        {
            Application.RunOnMainThread(() => {
                var temp = device.attributes.Find((sta) => sta.key == "alarm_status");
                if (temp != null)
                {
                    if (temp.state == "alarm")
                    {
                        btnIcon.IsSelected = true;
                        btnSuctionView.TextID = StringId.InAlarm;
                        btnSuctionView.IsSelected = true;
                    }
                    else
                    {
                        btnIcon.IsSelected = false;
                        btnSuctionView.TextID = StringId.SensorNormalState;
                        btnSuctionView.IsSelected = false;
                    }
                }
            });
        }
        #endregion
        #region ■ 一般方法___________________________
        #endregion
    }
}