From eaaa2635f9ef5e431e00df922731a54c20cf7016 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 31 七月 2023 19:41:58 +0800 Subject: [PATCH] 三相空开备份 --- HDL_ON/Entity/Function/Function.cs | 105 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 94 insertions(+), 11 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 5b7f073..a5ec58e 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -171,6 +171,9 @@ string iconPath = spk.Replace(".", ""); switch (spk) { + case SPK.AirSwitchP3: + iconPath = "electricalbreaker"; + break; case SPK.PanelSocket: iconPath = "electricalsocket"; break; @@ -727,9 +730,9 @@ /// <summary> /// 淇濆瓨鎴块棿缁戝畾淇℃伅 /// </summary> - public void UpdataRoomIds() + public async void UpdataRoomIds() { - new System.Threading.Thread(() => + new System.Threading.Thread( () => { var pack = ApiUtlis.Ins.HttpRequest.UpdataDevcieBindRoomInfo(this); //鐩存帴淇濆瓨鏈湴锛� @@ -803,25 +806,27 @@ var list = new List<FunctionAttributes>(); if (spk == SPK.GroupControl) { - var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); - if (gc != null) + lock (list) { - foreach (var temp in gc.sids) + var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); + if (gc != null) { - var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); - if (light != null) + foreach (var temp in gc.sids) { - foreach (var attr in light.attributes) + var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); + if (light != null) { - if (list.Find((obj) => obj.key == attr.key) == null) + foreach (var attr in light.attributes) { - list.Add(attr); + if (list.Find((obj) => obj.key == attr.key) == null) + { + list.Add(attr); + } } } } } } - } else { @@ -1153,6 +1158,79 @@ /// </summary> public static class FunctionAttributeKey { + #region 涓夌浉绌哄紑灞炴�� + /// <summary> + /// A鐩稿姛鐜� + /// </summary> + public const string PowerA = "power_a"; + /// <summary> + /// B鐩稿姛鐜� + /// </summary> + public const string PowerB = "power_b"; + /// <summary> + /// C鐩稿姛鐜� + /// </summary> + public const string PowerC = "power_c"; + /// <summary> + /// A鐩哥數鍘� + /// </summary> + public const string VoltageA = "voltage_a"; + /// <summary> + /// B鐩哥數鍘� + /// </summary> + public const string VoltageB = "voltage_b"; + /// <summary> + /// C鐩哥數鍘� + /// </summary> + public const string VoltageC = "voltage_c"; + /// <summary> + /// A鐩哥數娴� + /// </summary> + public const string CurrentA = "current_a"; + /// <summary> + /// B鐩哥數娴� + /// </summary> + public const string CurrentB = "current_b"; + /// <summary> + /// C鐩哥數娴� + /// </summary> + public const string CurrentC = "current_c"; + /// <summary> + /// A鐩告俯搴� + /// </summary> + public const string TempA = "temp_a"; + /// <summary> + /// B鐩告俯搴� + /// </summary> + public const string TempB = "temp_b"; + /// <summary> + /// C鐩告俯搴� + /// </summary> + public const string TempC = "temp_c"; + /// <summary> + /// 杩囨祦鍊� + /// </summary> + public const string MaxCurrent = "max_current"; + /// <summary> + /// 杩囨俯鍊� + /// </summary> + public const string MaxTemp = "max_temp"; + /// <summary> + /// A鐩哥數閲� + /// </summary> + public const string ElectricityA = "electricity_a"; + /// <summary> + /// B鐩哥數閲� + /// </summary> + public const string ElectricityB = "electricity_b"; + /// <summary> + /// C鐩哥數閲� + /// </summary> + public const string ElectricityC = "electricity_c"; + + #endregion + + public const string _null = ""; /// <summary> /// 瀹夐槻甯冮槻鐘舵�� @@ -2056,6 +2134,10 @@ /// 鏅鸿兘绌哄紑 /// </summary> public const string AirSwitch = "electrical.breaker"; + /// <summary> + /// 涓夌浉鏅鸿兘绌哄紑 + /// </summary> + public const string AirSwitchP3 = "electrical.breakerP3"; #region 娑傞甫 /// <summary> @@ -2109,6 +2191,7 @@ spkList.Add(ElectricTuyaWaterValve); spkList.Add(ElectricTuyaWaterValve2); spkList.Add(AirSwitch); + spkList.Add(AirSwitchP3); return spkList; } -- Gitblit v1.8.0