wxr
2021-12-27 da5999ee08de8f6267a4ed491b79b36649c52186
备份
8个文件已添加
29个文件已修改
610 ■■■■ 已修改文件
HDL-ON_Android/AgreementActivity.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/layout/activity_splash.xml 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values-zh/strings.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Resources/values/strings.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Scan.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/SplashActivity.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/SecurityAlarm.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmebly.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/AgreementActivity.cs
@@ -1,6 +1,7 @@
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Net;
using Android.OS;
using CN.Jpush.Android.Api;
@@ -16,7 +17,7 @@
namespace HDL_ON_Android
{
    [Activity(Label = "AgreementActivity", Theme = "@style/MyTheme1")]
    [Activity(Label = "AgreementActivity", Theme = "@style/MyTheme1", ScreenOrientation = ScreenOrientation.Portrait)]
    public class AgreementActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
HDL-ON_Android/Assets/Language.ini
@@ -508,6 +508,9 @@
520=Electric Current (A)
521=Power (W)
522=Refresh
523=Delay alarm
524=Bypass
525=Enable
 
1000=Room Humidity
1001=V-chip
@@ -1639,6 +1642,9 @@
520=电流(A)
521=功率(W)
522=刷新
523=延时报警
524=停用
525=启用
 
1000=室内湿度
1001=童锁
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png
HDL-ON_Android/Assets/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -212,6 +212,10 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\btnCloseIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\btnInfoIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\AirFresh\HumiOnIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg1.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
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="202112203" android:versionName="1.4.4" package="com.hdl.onpro">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202112271" android:versionName="1.4.5" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
HDL-ON_Android/Resources/layout/activity_splash.xml
@@ -13,21 +13,22 @@
        android:orientation="vertical"
        android:background="#55000000">
        <RelativeLayout
        <LinearLayout
            android:layout_width="280dp"
            android:layout_height="417dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="vertical"
            android:background="@drawable/dialog_background2">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="25dp"
                android:layout_height="wrap_content"
                android:id="@+id/title_tv"
                android:text="@string/privacy_policy_and_service_agreement"
                android:textColor="#bb000000"
                android:layout_marginTop="15dp"
                android:layout_marginLeft="0dp"
                android:layout_marginRight="0dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:textSize="18sp"
                android:gravity="center"/>
@@ -36,7 +37,7 @@
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/msg_content_tv"
                android:layout_marginTop="49dp"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp"
                android:text="@string/read_privacy_policy_and_service_agreement_tip"
@@ -50,7 +51,7 @@
                android:gravity="center"
                android:text="@string/login_privacy_policy"
                android:textColor="#E6000000"
                android:layout_marginTop="105dp"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"/>
            <TextView
@@ -59,35 +60,41 @@
                android:text="@string/login_user_service_agreement"
                android:textColor="#E6000000"
                android:id="@+id/service_agreement_btn"
                android:layout_marginTop="140dp"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="16dp"
                android:gravity="center"/>
            <Button
                android:layout_width="120dp"
                android:layout_height="52dp"
                android:id="@+id/disagree_btn"
                android:text="@string/disagree"
                android:textColor="#245ec3"
                android:layout_marginLeft="16dp"
            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                android:layout_marginTop="120dp"
                android:layout_marginBottom="20dp"
                android:layout_alignParentBottom="true"
                android:background="@drawable/btn_disagree"/>
                android:orientation="horizontal">
            <Button
                android:layout_width="120dp"
                android:layout_height="52dp"
                android:id="@+id/agree_btn"
                android:text="@string/agree"
                android:textColor="@color/color_white"
                android:layout_alignParentRight="true"
                android:layout_alignParentBottom="true"
                android:layout_marginRight="16dp"
                android:layout_marginBottom="20dp"
                android:background="@drawable/btn_agree"/>
                <Button
                    android:layout_width="120dp"
                    android:layout_height="52dp"
                    android:id="@+id/disagree_btn"
                    android:text="@string/disagree"
                    android:textColor="#245ec3"
                    android:layout_marginLeft="13dp"
                    android:layout_alignParentBottom="true"
                    android:background="@drawable/btn_disagree"/>
                <Button
                    android:layout_width="120dp"
                    android:layout_height="52dp"
                    android:id="@+id/agree_btn"
                    android:text="@string/agree"
                    android:textColor="@color/color_white"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentBottom="true"
                    android:layout_marginLeft="14dp"
                    android:background="@drawable/btn_agree"/>
        </RelativeLayout>
            </LinearLayout>
        </LinearLayout>
    </FrameLayout>
</LinearLayout>
HDL-ON_Android/Resources/values-zh/strings.xml
@@ -22,4 +22,11 @@
    <string name="talk_open_failed">对讲打开失败</string>
    <string name="unlock_fail">开锁失败</string>
    <string name="screenshot_fail">截图失败</string>
        <string name="login_user_service_agreement">《用户服务协议》</string>
        <string name="login_privacy_policy">《隐私权政策》</string>
        <string name="privacy_policy_and_service_agreement">隐私权政策及服务条款</string>
        <string name="read_privacy_policy_and_service_agreement_tip">为了更好的保障您的合法权益,请您阅读并同意以下协议</string>
        <string name="disagree">不同意</string>
        <string name="agree">同意</string>
</resources>
HDL-ON_Android/Resources/values/strings.xml
@@ -23,10 +23,10 @@
        <string name="screenshot_fail">Fail to screenshot</string>
        <string name="login_user_service_agreement">《用户服务协议》</string>
        <string name="login_privacy_policy">《隐私权政策》</string>
        <string name="privacy_policy_and_service_agreement">隐私权政策及服务条款</string>
        <string name="read_privacy_policy_and_service_agreement_tip">为了更好的保障您的合法权益,请您阅读并同意以下协议</string>
        <string name="disagree">不同意</string>
        <string name="agree">同意</string>
        <string name="login_user_service_agreement">《User service agreement》</string>
        <string name="login_privacy_policy">《Privacy policy》</string>
        <string name="privacy_policy_and_service_agreement">Privacy policy and terms of service</string>
        <string name="read_privacy_policy_and_service_agreement_tip">In order to better protect your legitimate rights and interests, please read and agree to the following agreement</string>
        <string name="disagree">Disagree</string>
        <string name="agree">Agree</string>
</resources>
HDL-ON_Android/Scan.cs
@@ -1,5 +1,6 @@
using System;
using System.IO;
using Android.Content;
using Shared;
using ZXing.Mobile;
@@ -65,6 +66,20 @@
                else
                {
                    action?.Invoke(null);
                    Action action1 = () => {
                        Intent intent = new Intent(Android.Provider.Settings.ActionApplicationDetailsSettings);
                        intent.AddFlags(ActivityFlags.NewTask);
                        Android.Net.Uri uri = Android.Net.Uri.FromParts("package", Application.Activity.PackageName, null);
                        intent.SetData(uri);
                        Application.Activity.StartActivity(intent);
                    };
                    if (Language.CurrentLanguage == "Chinese")
                    {
                        new HDL_ON.UI.PublicAssmebly().TipOptionMsg(StringId.Tip, "相机访问权限已被拒绝,请前往系统设置打开相关权限。", action1);
                    }else
                    {
                        new HDL_ON.UI.PublicAssmebly().TipOptionMsg(StringId.Tip, "Camera access has been denied. Please go to system settings to open relevant permissions.",action1);
                    }
                }
            });
        }
HDL-ON_Android/SplashActivity.cs
@@ -1,6 +1,7 @@
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Net;
using Android.OS;
using CN.Jpush.Android.Api;
@@ -15,7 +16,7 @@
namespace HDL_ON_Android
{
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity")]
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity",ScreenOrientation = ScreenOrientation.Portrait) ]
    [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })]
    public class SplashActivity : Activity
    {
@@ -40,6 +41,7 @@
            base.OnActivityResult(requestCode, resultVal, data);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
@@ -49,6 +51,8 @@
            //OverridePendingTransition(0, 0);
            //initAll();
            if (HDL_ON.OnAppConfig.Instance.FirstRunApp)
            {
                
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1380,6 +1380,10 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\btnInfoIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\AirFresh\HumiOnIcon.png" />
      <BundleResource Include="Resources\Phone\PersonalCenter\SiriIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg1.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg2.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg3.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\EnvironmentalScience\HistoryOpionBg4.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.4.302112201</string>
    <string>1.4.302112271</string>
    <key>CFBundleVersion</key>
    <string>1.4.12201</string>
    <string>1.4.12271</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>Use geographic location to provide services such as weather</string>
    <key>NSAppleMusicUsageDescription</key>
HDL-ON_iOS/Resources/Language.ini
@@ -508,6 +508,9 @@
520=Electric Current (A)
521=Power (W)
522=Refresh
523=Delay alarm
524=Bypass
525=Enable
 
1000=Room Humidity
1001=V-chip
@@ -1639,6 +1642,9 @@
520=电流(A)
521=功率(W)
522=刷新
523=延时报警
524=停用
525=启用
 
1000=室内湿度
1001=童锁
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png
HDL_ON/Common/R.cs
@@ -4,7 +4,18 @@
{
    public static class StringId
    {
        /// <summary>
        /// 启用
        /// </summary>
        public const int Enable = 525;
        /// <summary>
        /// 停用
        /// </summary>
        public const int Bypass = 524;
        /// <summary>
        /// 触发后延时报警
        /// </summary>
        public const int DelayAlarm = 523;
        /// <summary>
        /// 刷新
        /// </summary>
HDL_ON/DAL/DriverLayer/Control.cs
@@ -503,11 +503,18 @@
            {
                new System.Threading.Thread(() =>
                {
                    foreach (var temp in functions)
                    foreach (var function in functions)
                    {
                        Dictionary<string, string> d1 = new Dictionary<string, string>();
                        d1.Add(FunctionAttributeKey.OnOff, open ? "on" : "off");
                        SendWriteCommand(temp, d1);
                         if (function.spk == SPK.PanelSocket)
                        {
                            if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                            {
                                d1.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                            }
                        }
                        SendWriteCommand(function, d1);
                        System.Threading.Thread.Sleep(100);
                    }
                })
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -458,7 +458,6 @@
                                            if (temp != null)
                                            {
                                                Control_Udp.ReceiveRepeatManager(temp.id, null);
                                                foreach (var updataSecurity in temp.objects)
                                                {
                                                    var updataLocalSecurity = FunctionList.List.securities.Find((obj) => obj.sid == updataSecurity.sid);
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -33,6 +33,10 @@
        /// </summary>
        public string delay ="0";
        /// <summary>
        /// 报警延时
        /// </summary>
        public string output_delay = "0";
        /// <summary>
        /// 状态
        /// 布防:enable
        /// 撒防:disable
@@ -272,9 +276,9 @@
        /// </summary>
        public string sid;
        /// <summary>
        /// Bypass设置 true:启用中、false:临时bypass中
        /// Bypass设置 false:启用中、true:临时bypass中
        /// </summary>
        public string bypass;
        public string bypass = "false";
        /// <summary>
        /// 安防输入条件
        /// </summary>
@@ -457,6 +461,10 @@
        /// 值    
        /// </summary>
        public string value;
        /// <summary>
        /// Bypass设置 true:临时bypass中、false:启用中
        /// </summary>
        public bool bypass = false;
    }
    /// <summary>
@@ -483,7 +491,7 @@
        /// <summary>
        /// 本地不存在数据(数据可能被删了)
        /// </summary>
        public bool NoLocalData ()
        public bool LocalData ()
        {
            var function = FunctionList.List.GetLightList().Find((obj) => obj.sid == sid);
            if (function != null)
HDL_ON/Entity/FunctionList.cs
@@ -139,6 +139,23 @@
            var spkList = SPK.ArmSensorSpkList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 安防中心支持的传感器列表
        /// </summary>
        public List<Function> GetArmCenterList()
        {
            var spkList = new List<string>()
            {
                SPK.SensorPir,
                SPK.SensorDoorWindow,
                SPK.SensorSmoke,
                SPK.SensorWater,
                SPK.SensorGas,
            };
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
        /// 可视对讲列表,当为null或size为0则不显示可视对讲icon
@@ -175,6 +192,19 @@
        /// </summary>
        public List<SecurityAlarm> securities = new List<SecurityAlarm>();
        public List<SecurityAlarm> GetOrdinarySecurities()
        {
            var ordinarySecurities = new List<SecurityAlarm>();
            foreach (var mode in securities)
            {
                if (mode.type == "all_day" || mode.type == "mute")
                {
                    continue;
                }
                ordinarySecurities.Add(mode);
            }
            return ordinarySecurities;
        }
        /// <summary>
        /// 加载功能列表
HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
    /// <summary>
    /// 版本号
    /// </summary>
    public static string VersionString = "1.4.4";
    public static string VersionString = "1.4.5";
    ///// <summary>
    ///// 客户端类型
    ///// </summary>
HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -277,7 +277,7 @@
            Button btnMsg = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(25),
                Height = Application.GetRealHeight(35),
                Y = btnTitle.Bottom,
                Width = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.Center,
@@ -463,7 +463,7 @@
            Button btnMsg = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Height = Application.GetRealHeight(25),
                Height = Application.GetRealHeight(35),
                Y = btnTitle.Bottom,
                Width = Application.GetRealHeight(200),
                TextAlignment = TextAlignment.Center,
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -168,6 +168,9 @@
        /// </summary>
        public void LoadView(UserInfo userInfo = null)
        {
#if __Android__
            OnAppConfig.Instance.isAgreePrivacyPolicy = false;
#endif
            var btnIcon = new Button()
            {
                X = Application.GetRealWidth(28),
@@ -252,7 +255,7 @@
            };
#endif
            #region 登录方式选择
#region 登录方式选择
            btnPhoneLogin = new Button()
            {
                X = Application.GetRealWidth(28),
@@ -278,9 +281,9 @@
                TextSize = CSS_FontSize.TextFontSize,
            };
            bodyView.AddChidren(btnEmailLogin);
            #endregion
#endregion
            #region 账号填写
#region 账号填写
            accountView = new FrameLayout()
            {
                X = Application.GetRealWidth(28),
@@ -368,9 +371,9 @@
                accountView.AddChidren(btnAccountIcon);
            }
            #endregion
#endregion
            #region 密码填写
#region 密码填写
            passwordView = new FrameLayout()
            {
                X = Application.GetRealWidth(28),
@@ -414,7 +417,7 @@
            };
            passwordView.AddChidren(etPassword);
            #region 密码登录-控件加载
#region 密码登录-控件加载
            btnVisiblePassword = new Button()
            {
                X = Application.GetRealWidth(223),
@@ -446,9 +449,9 @@
                TextSize = 12,
            };
            passwordView.AddChidren(btnForgetPassword);
            #endregion
#endregion
            #region 验证码登录-控件加载
#region 验证码登录-控件加载
            btnGetVerificationCode = new Button()
            {
                X = Application.GetRealWidth(219),
@@ -462,7 +465,7 @@
                IsSelected = false,
            };
            passwordView.AddChidren(btnGetVerificationCode);
            #endregion
#endregion
            btnPasswordViewBottomLine = new Button()
            {
@@ -473,9 +476,9 @@
            };
            passwordView.AddChidren(btnPasswordViewBottomLine);
            #endregion
#endregion
            #region 注册与快捷登录
#region 注册与快捷登录
            btnRegister = new Button()
            {
                X = Application.GetRealWidth(28),
@@ -502,7 +505,7 @@
            };
            bodyView.AddChidren(btnSwitchLoginMode);
            #endregion
#endregion
            btnLogin = new Button()
            {
@@ -547,7 +550,7 @@
                //楼层房间列表
                var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id };
                floor1.SaveRoomFile();
                #region 房间一 -- 客厅
#region 房间一 -- 客厅
                //处理房间列表
                var room1 = new Room()
@@ -627,8 +630,8 @@
                SpatialInfo.CurrentSpatial.RoomList.Add(room4);
                #region 客厅
                #region 功能
#region 客厅
#region 功能
                var lightRgb1 = new Function()
                {
                    sid = "light1",
@@ -754,8 +757,8 @@
                    },
                };
                fh.SaveFunctionFile();
                #endregion
                #region 场景
#endregion
#region 场景
                var scene1 = new Scene()
                {
                    sid = "scene1",
@@ -907,9 +910,9 @@
                };
                scene2.SaveSceneFile();
                #endregion
                #endregion
                #region 餐厅
#endregion
#endregion
#region 餐厅
                var lightSwitch3 = new Function()
                {
                    sid = "light6",
@@ -1013,8 +1016,8 @@
                    }
                };
                scene4.SaveSceneFile();
                #endregion
                #region 卧室
#endregion
#region 卧室
                var ac = new Function()
                {
                    sid = "ac1",
@@ -1053,7 +1056,7 @@
                //    collect = false,
                //};
                //scene6.SaveSceneFile();
                #endregion
#endregion
                var lightSwitch6 = new Function()
@@ -1071,7 +1074,7 @@
                };
                lightSwitch6.SaveFunctionFile();
                #endregion
#endregion
                var fileList = Common.FileUtlis.Files.ReadFiles();
                foreach(var file in fileList)
@@ -1090,7 +1093,7 @@
            LoadEventList();
            account = etAccount.Text.Trim();
            #if DEBUG1211
#if DEBUG1211
            //本地模式
            Button btnLocalMode = new Button()
            {
@@ -1112,15 +1115,15 @@
            MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString());
            #endif
#endif
            #region 隐私政策
#region 隐私政策
            AddServiceAgreementControl(bodyView);
            #endregion
#endregion
        }
        #region ■ 服务协议___________________________
#region ■ 服务协议___________________________
        bool isAgreePrivacyPolicy = false;
        /// <summary>
        /// 添加服务协议控件
@@ -1263,6 +1266,6 @@
            return true;
        }
        #endregion
#endregion
    }
}
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -600,23 +600,23 @@
            //});
            FunctionList.List.Functions.Add(new Function()
            {
                spk = SPK.HvacAirFreshJinmao,
                name = "测试金茂新风",
                attributes = new List<FunctionAttributes>()
                {
                    new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
                    new FunctionAttributes(){ key = "mode",curValue= "humidification",state = "humidification" ,value = new List<string>(){ "humidification", "fan" } },
                    new FunctionAttributes(){ key = "energy",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
                    new FunctionAttributes(){ key = "fan",curValue= "level_1",state = "level_1" ,value = new List<string>(){ "level_1", "level_2", "level_3","auto" } },
                    new FunctionAttributes(){ key = "humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "indoor_temp",curValue= "26",state = "26" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "indoor_humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "filter_remain",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
                    new FunctionAttributes(){ key = "filter_timeout",curValue= "false",state = "false" ,value = new List<string>(){ "true", "false"  }},
                },
            });
            //FunctionList.List.Functions.Add(new Function()
            //{
            //    spk = SPK.HvacAirFreshJinmao,
            //    name = "测试金茂新风",
            //    attributes = new List<FunctionAttributes>()
            //    {
            //        new FunctionAttributes(){ key = "on_off",curValue= "on",state = "on" },
            //        new FunctionAttributes(){ key = "mode",curValue= "humidification",state = "humidification" ,value = new List<string>(){ "humidification", "fan" } },
            //        new FunctionAttributes(){ key = "energy",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } },
            //        new FunctionAttributes(){ key = "fan",curValue= "level_1",state = "level_1" ,value = new List<string>(){ "level_1", "level_2", "level_3","auto" } },
            //        new FunctionAttributes(){ key = "humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "indoor_temp",curValue= "26",state = "26" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "indoor_humidity",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "filter_remain",curValue= "0",state = "0" ,value = new List<string>(){  },min = 0,max = 100 },
            //        new FunctionAttributes(){ key = "filter_timeout",curValue= "false",state = "false" ,value = new List<string>(){ "true", "false"  }},
            //    },
            //});
            //FunctionList.List.Functions.Add(new Function()
            //{
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -493,6 +493,14 @@
                        d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
                        Control.Ins.SendWriteCommand(function, d);
                    }
                    else if (function.spk == SPK.PanelSocket)
                    {
                        if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                        {
                            d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                        }
                        Control.Ins.SendWriteCommand(function, d);
                    }
                    else
                    {
                        d.Add("on_off", function.trait_on_off.curValue.ToString());
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -881,8 +881,10 @@
            };
            arcBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                temp = arcBar.Progress;
                device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                btnTemp.Text = arcBar.Progress.ToString();
                controlTime = DateTime.Now;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                Control.Ins.SendWriteCommand(device, d);
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -26,15 +26,7 @@
        SecurityAlarm securityAlarm;
        Action refreshAction;
        /// <summary>
        /// 安防输出-临时
        /// </summary>
        List<SecurityOutput> tempOutput = new List<SecurityOutput>();
        /// <summary>
        /// 安防输入-临时
        /// </summary>
        List<SecurityInput> tempInput = new List<SecurityInput>();
        public AddAlarmDeploymentPage(SecurityAlarm alarm, Action action)
        {
@@ -132,7 +124,7 @@
                };
                delayedRow.AddChidren(btnDelayedTitle);
                btnDelayedTitle.Text += ":";
                btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth()+Application.GetRealWidth(10);
                btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth() + Application.GetRealWidth(10);
                var btnDelayedText = new Button()
                {
@@ -175,6 +167,7 @@
            else
            {
                new TopViewDiv(bodyView, title).LoadTopView();
                securityAlarm.status = "enable";
            }
            //布防功能
@@ -341,22 +334,22 @@
                    tip.Show(MainPage.BaseView);
                    return;
                }
                if (securityAlarm.output.Count == 0)
                {
                    var tipText = "请选择告警目标";
                    if(Language.CurrentLanguage !="Chinese")
                    {
                        tipText = "Please select the alarm target";
                    }
                    var tip = new Tip()
                    {
                        Text = tipText,
                        CloseTime = 3,
                        Direction = AMPopTipDirection.None
                    };
                    tip.Show(MainPage.BaseView);
                    return;
                }
                //if (securityAlarm.output.Count == 0)
                //{
                //    var tipText = "请选择告警目标";
                //    if(Language.CurrentLanguage !="Chinese")
                //    {
                //        tipText = "Please select the alarm target";
                //    }
                //    var tip = new Tip()
                //    {
                //        Text = tipText,
                //        CloseTime = 3,
                //        Direction = AMPopTipDirection.None
                //    };
                //    tip.Show(MainPage.BaseView);
                //    return;
                //}
                var waitPage = new Loading();
                waitPage.Start();
@@ -478,8 +471,15 @@
                {
                    if (target.GetFunction() != null)
                    {
                        inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText()));
                    inputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                        var inputView = new InputRow(target);
                        inputTargetView.AddChidren(inputView);
                        inputView.InitView();
                        EventHandler<MouseEventArgs> eventHandler = (sener, e) => {
                            securityAlarm.input.Remove(target);
                            iniInputTargetView();
                        };
                        inputView.SetDelClickeEvent(eventHandler);
                        inputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                    }
                    count++;
                }
@@ -564,7 +564,6 @@
            };
            contentView.AddChidren(outputTargetView);
            outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
            iniAlarmListView();
            #endregion
@@ -578,13 +577,79 @@
        private void iniAlarmListView()
        {
            outputTargetView.RemoveAll();
            if (securityAlarm.output.Count > 0)
            {
                if (securityAlarm.type == "all_day" || securityAlarm.type == "mute")
                { }
                else
                {
                    #region 告警延时
                    var delayedRow = new FrameLayout()
                    {
                        Height = Application.GetRealHeight(50),
                        BackgroundColor = CSS_Color.MainBackgroundColor,
                    };
                    outputTargetView.AddChidren(delayedRow);
                    var btnDelayedTitle = new Button()
                    {
                        X = Application.GetRealWidth(16),
                        Width = Application.GetRealWidth(72),
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.FirstLevelTitleColor,
                        TextSize = CSS_FontSize.TextFontSize,
                        TextID = StringId.DelayAlarm,
                    };
                    delayedRow.AddChidren(btnDelayedTitle);
                    btnDelayedTitle.Text += ":";
                    btnDelayedTitle.Width = btnDelayedTitle.GetTextWidth() + Application.GetRealWidth(10);
                    var btnDelayedText = new Button()
                    {
                        X = btnDelayedTitle.Right,
                        Width = Application.GetRealWidth(330),
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.TextualColor,
                        TextSize = CSS_FontSize.TextFontSize,
                        Text = securityAlarm.output_delay + "s"
                    };
                    delayedRow.AddChidren(btnDelayedText);
                    btnDelayedText.MouseUpEventHandler = (sender, e) =>
                    {
                        Action<string> action = (obj) =>
                        {
                            securityAlarm.output_delay = obj;
                            btnDelayedText.Text = securityAlarm.output_delay + "s";
                        };
                        new PublicAssmebly().SetSceneDelayDialog(action, securityAlarm.output_delay);
                    };
                    var btnDelayedRight = new Button()
                    {
                        X = Application.GetRealWidth(343),
                        Gravity = Gravity.CenterVertical,
                        Width = Application.GetMinRealAverage(16),
                        Height = Application.GetMinRealAverage(16),
                        UnSelectedImagePath = "Public/RightIcon.png",
                    };
                    delayedRow.AddChidren(btnDelayedRight);
                    delayedRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                    #endregion
                }
                foreach (var outTarget in securityAlarm.output)
                {
                    if (outTarget.NoLocalData())
                    if (outTarget.LocalData())
                    {
                        var outputRow = new OutputRow(outTarget.name, outTarget.RoomName, outTarget);
                        var outputRow = new OutputRow( outTarget);
                        outputTargetView.AddChidren(outputRow);
                        outputRow.InitView(outTarget.name, outTarget.RoomName);
                        EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                            var delTemp = securityAlarm.output.Find((obj) => obj.sid == outTarget.sid);
                            if(delTemp!=null)
@@ -594,11 +659,11 @@
                            outputRow.RemoveFromParent();
                            outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
                        };
                        outputTargetView.AddChidren(outputRow);
                        outputRow.SetDelClickeEvent(eventHandler);
                    }
                    outputTargetView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(49), Height = 1, BackgroundColor = CSS_Color.DividingLineColor });
                }
                outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count);
                outputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.output.Count + 50);
            }
            else
            {
@@ -658,18 +723,28 @@
        Button btnSubTitle;
        public InputRow(string title, string subtitle,string state)
        Button btnDel;
        Button btnBypass;
        SecurityInput input;
        public InputRow(SecurityInput input)
        {
            this.LineColor = 0x00000000;
            this.Height = Application.GetRealHeight(65);
            this.BackgroundColor = CSS_Color.MainBackgroundColor;
            this.input = input;
        }
        public void InitView( )//(, , );
        {
            btnTitle = new Button()
            {
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(44),
                Width = Application.GetRealWidth(320),
                Text = title,
                Text = input.GetFunction().name,
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
@@ -682,7 +757,7 @@
                Y = Application.GetRealHeight(24),
                Height = Application.GetRealHeight(44),
                Width = Application.GetRealWidth(320),
                Text = subtitle,
                Text = input.GetFunction().GetRoomListName(),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
@@ -696,10 +771,46 @@
                TextAlignment = TextAlignment.CenterRight,
                TextSize = CSS_FontSize.TextFontSize,
                TextColor = CSS_Color.FirstLevelTitleColor,
                Text = state
                Text = input.StateText()
            };
            this.AddChidren(btnState);
            btnBypass = new Button()
            {
                BackgroundColor = CSS_Color.WarningColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Bypass,
                TextAlignment = TextAlignment.Center,
            };
            this.AddRightView(btnBypass);
            btnBypass.MouseUpEventHandler = (sender, e) => {
                if (input.bypass == "true")
                {
                    input.bypass = "false";
                    btnBypass.BackgroundColor = CSS_Color.WarningColor;
                    btnBypass.TextID = StringId.Bypass;
                }
                else
                {
                    input.bypass = "true";
                    btnBypass.BackgroundColor = CSS_Color.MainColor;
                    btnBypass.TextID = StringId.Enable;
                }
            };
            if (input.bypass == "true")
            {
                btnBypass.BackgroundColor = CSS_Color.MainColor;
                btnBypass.TextID = StringId.Enable;
            }
            btnDel = new Button()
            {
                BackgroundColor = CSS_Color.TextualColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextID = StringId.Del,
                TextAlignment = TextAlignment.Center,
            };
            this.AddRightView(btnDel);
        }
@@ -708,6 +819,11 @@
            this.MouseUpEventHandler = eventHandler;
            btnTitle.MouseUpEventHandler = eventHandler;
            btnSubTitle.MouseUpEventHandler = eventHandler;
        }
        public void SetDelClickeEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
    }
@@ -728,13 +844,17 @@
        SecurityOutput output;
        public OutputRow(string title, string subtitle, SecurityOutput inOutput)
        public OutputRow(SecurityOutput inOutput)
        {
            output = inOutput;
            this.LineColor = 0x00000000;
            this.Height = Application.GetRealHeight(65);
            this.BackgroundColor = CSS_Color.MainBackgroundColor;
        }
        public void InitView(string title, string subtitle )
        {
            btnTitle = new Button()
            {
@@ -807,17 +927,14 @@
            {
                BackgroundColor = CSS_Color.WarningColor,
                TextColor = CSS_Color.MainBackgroundColor,
                TextAlignment = TextAlignment.Center,
                TextID = StringId.Del,
            };
            this.AddRightView(btnDel);
        }
        public void SetDelClick(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
        public void SetClickEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnState.MouseUpEventHandler = eventHandler;
@@ -825,7 +942,10 @@
            btnSubTitle.MouseUpEventHandler = eventHandler;
        }
        public void SetDelClickeEvent(EventHandler<MouseEventArgs> eventHandler)
        {
            btnDel.MouseUpEventHandler = eventHandler;
        }
        private void ShowStateDialog()
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
@@ -66,7 +66,7 @@
            btnFloor.MouseUpEventHandler = (sender, e) =>
            {
                string nowSelectId = null;
                var list = FunctionList.List.GetArmSensorList();
                var list = FunctionList.List.GetArmCenterList();
#if DEBUG
                list.AddRange(FunctionList.List.GetLightList());
@@ -93,7 +93,7 @@
            bodyView.AddChidren(functionListView);
            var listAllFun = FunctionList.List.GetArmSensorList();
            var listAllFun = FunctionList.List.GetArmCenterList();
#if DEBUG
            listAllFun.AddRange(FunctionList.List.GetLightList());
#endif
@@ -145,7 +145,7 @@
            if (functions == null)
            {
                //初始值
                functions = FunctionList.List.GetArmSensorList();
                functions = FunctionList.List.GetArmCenterList();
            }
@@ -177,6 +177,8 @@
                            inValue = "alarm";
                            break;
                        case SPK.SensorDoorWindow:
                        case SPK.SensorDryContact:
                        case SPK.SensorDryContact2:
                            inKey = "contact_status";
                            inValue = "open";
                            break;
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs
@@ -285,7 +285,7 @@
                addDefensePage.LoadPage(Language.StringByID(StringId.BurglarAlarm));
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            disasterAlarmView.SetClick(disasterAlarmViewClick);
            burglarAlarmView.SetClick(burglarAlarmViewClick);
            fixedDeploymentTypeView.AddChidren(burglarAlarmView);
            #endregion
@@ -329,6 +329,10 @@
            armDiyViewList.Clear();
            foreach (var mode in FunctionList.List.securities)
            {
                if(mode.type== "all_day"|| mode.type == "mute")
                {
                    continue;
                }
                var armDiyView = new ArmDiyView("FunctionIcon/ArmCenter/AtHomeDefenseIcon.png", "FunctionIcon/ArmCenter/AtHomeDefenseIconOn.png",
                mode.name,mode.sid);
                customDeploymentView.AddChidren(armDiyView);
@@ -348,7 +352,7 @@
                armDiyViewList.Add(armDiyView);
            }
            if (FunctionList.List.securities.Count < 4)
            if (FunctionList.List.GetOrdinarySecurities().Count < 4)
            {
                var view = new ArmDiyView("FunctionIcon/ArmCenter/AddDefenseIcon.png", "FunctionIcon/ArmCenter/AddDefenseIcon.png",
                  Language.StringByID(StringId.Custom),"customSid");
@@ -428,6 +432,7 @@
                TextID = StringId.Cancel,
                TextColor = CSS_Color.WarningColor,
                IsBold = true,
                TextSize = CSS_FontSize.SubheadingFontSize,
            };
            contentView.AddChidren(btnCancel);
@@ -486,6 +491,10 @@
                {
                    if (bodyView != null)
                    {
                        if(updataTemp.type == "all_day"|| updataTemp.type == "mute")
                        {
                            return;
                        }
                        bodyView.refreshAction?.Invoke();
                        //布防
@@ -504,8 +513,9 @@
                        else
                        {
                            //撤防
                            if(bodyView.InDefenseMode.sid == updataTemp.sid)
                            if (bodyView.InDefenseMode.sid == updataTemp.sid)
                            {
                                bodyView.InDefenseMode.status = updataTemp.status;
                                foreach (var tempView in bodyView.armDiyViewList)
                                {
                                    tempView.LightingView(false);
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage.cs
@@ -293,9 +293,11 @@
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    //Control.Send(CommandType_A.write, this.function);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null) {
                        d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                    }
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
@@ -307,9 +309,12 @@
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    //Control.Send(CommandType_A.write, this.function);
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("on_off", function.trait_on_off.curValue.ToString());
                    if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
                    {
                        d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
                    }
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_CumulativePowerConsumption.cs
@@ -174,11 +174,11 @@
            #region 选择数据日期范围
            var showDataTypeView = new FrameLayout()
            {
                X = Application.GetRealWidth(183),
                X = Application.GetRealWidth(136),
                Y = Application.GetRealHeight(12),
                Width = Application.GetRealWidth(144),
                Width = Application.GetRealWidth(144+47),
                Height = Application.GetRealHeight(24),
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png",
                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png",
            };
            diagramView.AddChidren(showDataTypeView);
@@ -214,41 +214,68 @@
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.month),//DateTime.Now.Month.ToString() +
                Text = Language.StringByID(StringId.month)
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Month);
            var btnShowHistroyData_Year = new Button()
            {
                X = Application.GetRealWidth(48 * 3),
                Width = Application.GetRealWidth(48),
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.PromptingColor2,
                SelectedTextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = Language.StringByID(StringId.Years),
            };
            showDataTypeView.AddChidren(btnShowHistroyData_Year);
            btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg1.png";
                btnShowHistroyData_Day.IsSelected = true;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "hour";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg2.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Week.IsSelected = true;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "week";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg3.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = false;
                curQueryType = "month";
                brokenLine.YvalueText = "";
                    LoadMothed_GetHistoryData();
                LoadMothed_GetHistoryData();
            };
            btnShowHistroyData_Year.MouseUpEventHandler = (sender, e) =>
            {
                showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/HistoryOpionBg4.png";
                btnShowHistroyData_Day.IsSelected = false;
                btnShowHistroyData_Month.IsSelected = false;
                btnShowHistroyData_Year.IsSelected = true;
                btnShowHistroyData_Week.IsSelected = false;
                curQueryType = "year_month";
                brokenLine.YvalueText = "";
                LoadMothed_GetHistoryData();
            };
            #endregion