From 0a11352dffeb8d5f31dd40b9728fe1abf4537f04 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期五, 01 九月 2023 18:06:45 +0800
Subject: [PATCH] 2023年09月01日18:06:42

---
 HDL-ON_Android/HDL-ON_Android.csproj                                       |    2 +
 HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs                        |   83 +++++++++++++++++++++++++++++++++++++++++
 HDL-ON_iOS/Resources/Language.ini                                          |    5 ++
 HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png     |    0 
 HDL-ON_Android/Assets/Language.ini                                         |    5 ++
 HDL-ON_iOS/HDL-ON_iOS.csproj                                               |    2 +
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs |    8 ++++
 HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs               |    4 +
 HDL_ON/Common/R.cs                                                         |    4 ++
 HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png    |    0 
 HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png   |    0 
 HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png  |    0 
 12 files changed, 112 insertions(+), 1 deletions(-)

diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index b8cc67c..3906c56 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1228,6 +1228,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -2626,6 +2627,7 @@
 7173=鐓ф槑搴�
 7174=鐓ф槑搴﹂珮浜�
 7175=鐓ф槑搴︿綆浜�
+7176=鍏夌収
 
 
   
@@ -4015,6 +4017,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -5394,6 +5397,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -6779,6 +6783,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png
new file mode 100644
index 0000000..5cc0740
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png
new file mode 100644
index 0000000..e1b2657
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 5c21aa2..f71fe68 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -596,6 +596,8 @@
     <AndroidAsset Include="Assets\Phone\HisenseTv\shouyeSelected.png" />
     <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjianSelected.png" />
     <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjiaSelected.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\IlluminationBg.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\IlluminationIcon.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidResource Include="Resources\values\colors.xml" />
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index e87b2d8..0ddf75d 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1750,6 +1750,8 @@
       <BundleResource Include="Resources\Phone\HisenseTv\shouyeSelected.png" />
       <BundleResource Include="Resources\Phone\HisenseTv\yingliangjianSelected.png" />
       <BundleResource Include="Resources\Phone\HisenseTv\yingliangjiaSelected.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\IlluminationBg.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\IlluminationIcon.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 8d3200e..eb68283 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1228,6 +1228,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -2626,6 +2627,7 @@
 7173=鐓ф槑搴�
 7174=鐓ф槑搴﹂珮浜�
 7175=鐓ф槑搴︿綆浜�
+7176=鍏夌収
 
 
 
@@ -4012,6 +4014,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -5391,6 +5394,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
@@ -6776,6 +6780,7 @@
 7173=Illuminance
 7174=Exceed
 7175=Under
+7176=HV
 
 8501=Video door lock
 8502=Electric quantity
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png
new file mode 100644
index 0000000..5cc0740
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationBg.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png
new file mode 100644
index 0000000..e1b2657
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/EnvirSensor/IlluminationIcon.png
Binary files differ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 90f7c7d..65ddc23 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3539,6 +3539,10 @@
         /// 鐓ф槑搴︿綆浜�
         /// </summary>
         public const int zhaomingdudiyu = 7175;
+        /// <summary>
+        /// 鍏夌収
+        /// </summary>
+        public const int guangzhao = 7176;
 
 
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
index 58cfe45..2ba2c67 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -351,6 +351,10 @@
         /// </summary>
         void LoadSensorDiv(Function sensor,int index)
         {
+            if (sensor.spk==SPK.SensorLight) {
+                //鍏堣繃婊ゆ帀鍏夌収浼犳劅鍣�
+                return;
+            }
             var levelColorList = sensorTemp.GetLevelColorList(sensor.spk);
             var levelTextList = sensorTemp.GetLevelTextList(sensor.spk);
             {
@@ -392,6 +396,10 @@
                         imagePath = "FunctionIcon/EnvirSensor/HchoBg.png";
                         iconPath = "FunctionIcon/EnvirSensor/HchoIcon.png";
                         break;
+                    case SPK.SensorLight:
+                        imagePath = "FunctionIcon/EnvirSensor/IlluminationBg.png";
+                        iconPath = "FunctionIcon/EnvirSensor/IlluminationIcon.png";
+                        break;
                 }
                 sensorView.BackgroundImagePath = imagePath;
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
index d1a5acc..a2dfbb0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
@@ -93,7 +93,7 @@
             this.btnRoomName = btnRoomName;
             this.btnCollectionIcon = btnCollectionIcon;
             this.comerom = comerom;
-            this.action = action;
+            this.action = action; 
 
         }
 
@@ -168,7 +168,9 @@
             //寮�鏈�
             kaijiFL.SetClickListener((fl, btnImage, btnText) =>
             {
+                //Send.Current.Open("b7686438");
                 ControlCommand(HisenseTVFunctionalAttributeConstant.on_off, "on");
+
             });
             //鍏虫満
             guanFL.SetClickListener((fl, btnImage, btnText) =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
index 9f0a66a..525e5e4 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -1,5 +1,8 @@
 锘縰sing System;
 using System.Collections.Generic;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
 using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
@@ -26,6 +29,46 @@
                 return sendMethod;
 
             }
+
+        }
+        /// <summary>
+        /// 鎵撳紑娴蜂俊鐢佃
+        /// </summary>
+        /// <param name="deviceMac">鐢佃mac</param>
+        public void Open(string deviceMac)
+        {
+            CommonMethod.Current.SunThread(() =>
+            {
+                // 鍒涘缓UdpClient瀹炰緥
+                UdpClient udpClient = new UdpClient();
+                try
+                {
+                    // 璁剧疆鍙戦�佸拰鎺ユ敹鏁版嵁鐨処P鍜岀鍙�
+                    IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Parse("255.255.255.255"), 9);
+                    // 鍙戦�佹暟鎹�
+                    //byte[] data = System.Text.Encoding.ASCII.GetBytes("Hello, UDP Server!");
+                    byte[] data = StrToToHexByte(deviceMac);
+                    for (int i = 0; i < 16; i++)
+                    {
+                        udpClient.Send(data, data.Length, iPEndPoint);
+                        //Console.WriteLine("鏁版嵁宸插彂閫�");
+                    }
+                    //// 鎺ユ敹鏁版嵁
+                    //IPEndPoint remoteEP = new IPEndPoint(IPAddress.Any, 0);
+                    //byte[] receivedData = udpClient.Receive(ref remoteEP);
+                    //string receivedMessage = System.Text.Encoding.ASCII.GetString(receivedData);
+                    //Console.WriteLine("鎺ユ敹鍒扮殑鏁版嵁锛�" + receivedMessage);
+                }
+                catch (Exception e)
+                {
+                    Console.WriteLine("鍙戠敓閿欒锛�" + e.Message);
+                }
+                finally
+                {
+                    // 鍏抽棴UdpClient杩炴帴
+                    udpClient.Close();
+                }
+            }, TipType.none);
 
         }
 
@@ -65,6 +108,46 @@
             { IsBackground = true }.Start();
         }
 
+        /// <summary>
+        /// 灏�16杩涘埗鐨勫瓧绗︿覆杞负byte[]
+        /// </summary>
+        /// <param name="hexDeviceMacString"></param>
+        /// <returns></returns>
+        private byte[] StrToToHexByte(string hexDeviceMacString)
+        {
+            if (string.IsNullOrEmpty(hexDeviceMacString))
+            {
+                return new byte[] { };
+            }
+            hexDeviceMacString = hexDeviceMacString.Replace(" ", "").Replace("_","");
+            if ((hexDeviceMacString.Length % 2) != 0) {
+                return new byte[] { };
+            }
+            byte[] returnBytes = new byte[hexDeviceMacString.Length / 2];
+            for (int i = 0; i < returnBytes.Length; i++)
+                returnBytes[i] = Convert.ToByte(hexDeviceMacString.Substring(i * 2, 2), 16);
+            return returnBytes;
+        } 
+
+        /// <summary>
+        /// 浜岃繘鍒舵暟缁勮浆鍗佸叚杩涘埗瀛楃涓�
+        /// </summary>
+        /// <param name="btyes"></param>
+        /// <returns></returns>
+        private string Byte2hex(byte[] btyes) 
+        {
+            StringBuilder sb = new StringBuilder(btyes.Length * 2);
+            for (int i = 0; i < btyes.Length; i++)
+            {
+                int hight = ((btyes[i] >> 4) & 0x0f);
+                int low = btyes[i] & 0x0f;
+                sb.Append(hight > 9 ? (char)((hight - 10) + 'a') : (char)(hight + '0'));
+                sb.Append(low > 9 ? (char)((low - 10) + 'a') : (char)(low + '0'));
+            }
+            return sb.ToString();
+        }
+
+
 
         /// <summary>
         ///璇锋眰鏈嶅姟鍣紙涓庝綇瀹呮湁鍏�:渚嬪锛沨omeId锛� 

--
Gitblit v1.8.0