From 06978e3b15b8536e2d4511ae4612fec1d556e145 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 07 十一月 2019 11:19:56 +0800 Subject: [PATCH] 合并了全部的代码,IOS 图片需要从新引入工程 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 40 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs index 553133f..b472ed0 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -42,15 +42,6 @@ public void ShowForm(string deviceMac) { this.listNewDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac); - //鎺掑簭 - this.listNewDevice.Sort((obj1, obj2) => - { - if (obj1.DeviceEpoint > obj2.DeviceEpoint) - { - return 1; - } - return -1; - }); this.listDeviceType.Clear(); foreach (var device in listNewDevice) @@ -104,14 +95,14 @@ btnNote.txtInput.FinishInputEvent += () => { string oldName = Common.LocalDevice.Current.GetDeviceMacName(listNewDevice[0]); - if (btnNote.Text.Trim() == string.Empty) + if (btnNote.Text == string.Empty) { btnNote.Text = oldName; } - if (oldName != btnNote.Text.Trim()) + if (oldName != btnNote.Text) { //淇敼鍚嶅瓧 - this.DeviceReName(btnNote.Text.Trim(), false); + this.DeviceReName(btnNote.Text, false); } }; @@ -137,9 +128,6 @@ { foreach (var device in this.listNewDevice) { - //淇濆瓨杩欎釜璁惧灞炰簬鍝釜鍖哄煙 - device.DeviceRoomId = roomKeys; - device.ReSave(); var room = Room.CurrentRoom.GetRoomByDevice(device); string mainKeys = LocalDevice.Current.GetDeviceMainKeys(device); if (room == null) @@ -154,6 +142,8 @@ Room.CurrentRoom.ChangedRoom(device, roomKeys); } } + //淇濆瓨璁惧鎴块棿绱㈠紩 + Common.LocalDevice.Current.SaveRealDeviceRoomId(this.listNewDevice, roomKeys); }; //娣诲姞鍏ㄩ儴鑿滃崟 @@ -209,6 +199,11 @@ //娣诲姞銆愰棬閿佹椂闂淬�戣 this.AddDoorLocksTimeRow(); } + } + else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.AirConditioner_ZbGateway) + { + //娣诲姞銆愬鍐呮満璁剧疆銆戣(绌鸿皟涓撶敤) + this.AddIndoorUnitSettionRow(); } else { @@ -539,6 +534,7 @@ //鎵嬫媺鎺у埗 string caption = Language.StringByID(R.MyInternationalizationString.uHandPullControl); var btnFunction = new FrameRowControl(listview.rowSpace / 2); + btnFunction.UseClickStatu = false; listview.AddChidren(btnFunction); btnFunction.AddLeftCaption(caption, 600); //寮�鍏冲浘鏍� @@ -582,6 +578,35 @@ #endregion; + #region 鈻� 瀹ゅ唴鏈鸿缃�(绌鸿皟)___________________ + + /// <summary> + /// 娣诲姞銆愬鍐呮満璁剧疆銆戣(绌鸿皟涓撶敤) + /// </summary> + private void AddIndoorUnitSettionRow() + { + if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.AirConditioner_ZbGateway) + { + return; + } + //瀹ゅ唴鏈鸿缃� + string caption = Language.StringByID(R.MyInternationalizationString.uIndoorUnitSettion); + var btnFunction = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(btnFunction); + btnFunction.AddLeftCaption(caption, 600); + //鍚戝彸鍥炬爣 + btnFunction.AddRightArrow(); + //搴曠嚎 + btnFunction.AddBottomLine(); + btnFunction.ButtonClickEvent += (sender, e) => + { + var form = new DeviceAirConditioner.IndoorUnitListForm(); + form.AddForm(listNewDevice[0].DeviceAddr); + }; + } + + #endregion + #region 鈻� 閫氱敤淇℃伅___________________________ /// <summary> -- Gitblit v1.8.0