From 9064c76e6a795ae735cac52d98bed178a27c2a87 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 10 一月 2020 16:38:16 +0800 Subject: [PATCH] 合并代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 41 ++++++++--------------------------------- 1 files changed, 8 insertions(+), 33 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs index a4c9e34..0554fa7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs @@ -213,9 +213,9 @@ }; } -#endregion + #endregion -#region 鈻� 淇敼鍚嶅瓧___________________________ + #region 鈻� 淇敼鍚嶅瓧___________________________ /// <summary> /// 璁惧閲嶅懡鍚嶇劧鍚庢墦寮�鏂扮殑鐢婚潰 @@ -251,47 +251,22 @@ /// </summary> private async void SetAllEpointName() { - var tempValue = Common.LocalDevice.Current.GetDeviceObjectText(this.listNewDevice); - var arry = tempValue.Split(new string[] { "(" }, StringSplitOptions.RemoveEmptyEntries); - var objName = arry[0].Trim(); - - //鑾峰彇璁惧绫诲瀷 - var deviceInfoType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(this.listNewDevice); foreach (var device in this.listNewDevice) { if (Common.LocalDevice.Current.GetSimpleEpointName(device) != string.Empty) { + //鏈夊悕瀛椾笉澶勭悊 continue; } - var epointName = objName; - if (this.listNewDevice.Count > 1) - { - if (deviceInfoType.BeloneType == Common.DeviceBeloneType.A鎸夐敭闈㈡澘 && device.Type == DeviceType.TemperatureSensor) - { - //闈㈡澘鐨勬渶鍚庝竴涓洖璺槸娓╁害浼犳劅鍣� - epointName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId11); - } - else if (deviceInfoType.ConcreteType == Common.DeviceConcreteType.Sensor_Pir) - { - //pir浼犳劅鍣�,瀹冨張鎼炵壒娈婁笢瑗�,浼犳劅鍣ㄨ嚜韬敤鑷繁鐨勫悕瀛�,缁х數鍣ㄥ洖璺殑璇濃�︹�� - if (device.Type == DeviceType.OnOffOutput) - { - epointName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2300); - } - } - else - { - //XXXXX(N鍥炶矾) - epointName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")"; - } - } + //鑾峰彇绔偣鍚嶅瓧 + var epointName = Common.LocalDevice.Current.GetDeviceEpointName(device); await Common.LocalDevice.Current.ReName(device, epointName, ShowErrorMode.NO); } } -#endregion + #endregion -#region 鈻� 鐢婚潰鍏抽棴___________________________ + #region 鈻� 鐢婚潰鍏抽棴___________________________ /// <summary> /// 鐢婚潰鍏抽棴 @@ -308,6 +283,6 @@ base.CloseFormBefore(); } -#endregion + #endregion } } -- Gitblit v1.8.0