From 203c3a3ffde6259413d9743f6a723b95b1e7989c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 06 七月 2023 22:43:05 +0800
Subject: [PATCH] 门锁功能

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs |   42 +++++++++++++++++++++++++++---------------
 1 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 7aeb9f2..2104754 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -229,10 +229,10 @@
                         ///寮�鍏�
                         LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView();
                         curtainSwitchView.btnText.TextID = StringId.switchLogic;
-                        fLayout.AddChidren(curtainSwitchView.FLayoutView());
+                        //fLayout.AddChidren(curtainSwitchView.FLayoutView());//2023骞�04鏈�17鏃�16:27:10 浜у搧瑕佹眰鐨勫幓鎺�
                         ///鐧惧垎姣�
                         LogicView.FunTypeView crtainPercentumView = new LogicView.FunTypeView();
-                        crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom;
+                        //crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom;
                         crtainPercentumView.btnText.TextID = StringId.percentum;
                         fLayout.AddChidren(crtainPercentumView.FLayoutView());
                         crtainPercentumView.btnState.Text = "5%";//浜у搧缁忕悊鏅撹緣瑕佹眰鏀圭殑 2021-11-06
@@ -297,6 +297,7 @@
                     break;
                 case SPK.AcStandard:
                 case SPK.HvacAC:
+                case SPK.AcIr:
                     {
                         #region 鐣岄潰
                         ///寮�鍏�
@@ -330,6 +331,9 @@
                         {
                             SwitchViewMethod(device, acSwitchVie.btnState, 2);
                         };
+                        int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min;
+                        int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max;
+                        string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state;
                         ///娓╁害鐐瑰嚮浜嬩欢
                         temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
@@ -343,11 +347,10 @@
                                 //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
                                 string keyVlaue = "set_temp";
                                 selectedState = device.spk + "_" + keyVlaue;
-                                string set_temp_value = stateStr.Replace("鈩�", "");
+                                string set_temp_value = stateStr.Replace(unit, "");
                                 //鏁版嵁灏佽
                                 AddDictionary(keyVlaue, set_temp_value);
-                            });
-
+                            }, min,max, unit);
 
                         };
                         ///妯″紡鐐瑰嚮浜嬩欢
@@ -434,6 +437,9 @@
                         ///娓╁害鐐瑰嚮浜嬩欢
                         temperatureView.btnClick.MouseUpEventHandler += (sender, e) =>
                         {
+                            int min = device.GetAttribute("set_temp") == null ? 16 : device.GetAttribute("set_temp").min;
+                            int max = device.GetAttribute("set_temp") == null ? 32 : device.GetAttribute("set_temp").max;
+                            string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state;
                             string tempValue = temperatureView.btnState.Text;
                             LogicView.TemperatureView tempView = new LogicView.TemperatureView();
                             tempView.FLayoutView(this, tempValue, (stateStr) =>
@@ -443,11 +449,11 @@
                                 //璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
                                 string keyVlaue = "set_temp";
                                 selectedState = device.spk + "_" + keyVlaue;
-                                string set_temp_value = stateStr.Replace("鈩�", "");
+                                string set_temp_value = stateStr.Replace(unit, "");
                                 //鏁版嵁灏佽
                                 AddDictionary(keyVlaue, set_temp_value);
 
-                            });
+                            }, min, max, unit);
 
                         };
                         ///妯″紡鐐瑰嚮浜嬩欢
@@ -599,25 +605,30 @@
                                 {
                                     //HDL_ON.DriverLayer.Control.Ins.GetMusicDirectory(device);
                                     //var palyListName = Music.SendMethod.mMethod.GetListName(device); 
-                                    var palyList= Music.SendMethod.Current.GetListMusic(device, "hdl_special");
-                                    List<string> musicNameList = new List<string>();
+                                    var palyList= Music.SendMethod.Current.GetSingleSongList(device, "hdl_special","");
+                                    List<string> songNameList = new List<string>(); 
                                     for (int i = 0; i < palyList.songs.Count; i++)
                                     {
-                                        var music = palyList.songs[i];
-                                        musicNameList.Add(music.name);
+                                        var song = palyList.songs[i]; 
+                                        songNameList.Add(song.name);
                                     }
                                     Application.RunOnMainThread(() =>
                                     {
                                         loading.Hide();
                                         PublicInterface publicInterface = new PublicInterface();
-                                        publicInterface.FrameOrVv(this, musicNameList, new List<string> { funTypeView.btnState.Text }, palyList.group, (index2) =>
+                                        publicInterface.FrameOrVv(this, songNameList, new List<string> { funTypeView.btnState.Text }, palyList.group, (index2) =>
                                         {
-                                            var musicSelecetd = palyList.songs[index2];
+                                            var songSelecetd = palyList.songs[index2]; 
                                             //鐣岄潰鏄剧ず閫変腑鍊�
-                                            funTypeView.btnState.Text = musicSelecetd.name;
+                                            funTypeView.btnState.Text = songSelecetd.name;
                                             //鏁版嵁灏佽
                                             AddDictionary("playlist_name", palyList.group);//鍒楄〃鍚�
-                                            AddDictionary("song_name", musicSelecetd.name);//姝屾洸鍚�
+                                            AddDictionary("song_name", songSelecetd.name);//姝屾洸鍚�
+                                            if (!string.IsNullOrEmpty(songSelecetd.url))
+                                            {
+                                                //瀛樺湪url灏变竴璧峰彂閫佽繃鍘�
+                                                AddDictionary("url", songSelecetd.url);
+                                            }
 
                                         },false);
 
@@ -694,6 +705,7 @@
                                 break;
                             }
                         case SPK.HvacAC:
+                        case SPK.AcIr:
                         case SPK.AcStandard:
                         case SPK.FloorHeatStandard:
                         case SPK.HvacFloorHeat:

--
Gitblit v1.8.0