From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 22 六月 2022 11:22:18 +0800 Subject: [PATCH] 修改引用路径 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs | 63 +++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 17 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs index 899ed8e..2a36e2c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs @@ -261,7 +261,7 @@ btnPosition.ButtonClickEvent += (sender, e) => { //瀹氫綅 - Common.LocalDevice.Current.SetFixedPositionCommand(listdevice[0]); + Common.LocalDevice.Current.SetFixedPositionCommand(listdevice[0], true); }; } @@ -309,7 +309,7 @@ return; } var listMacDevice = LocalDevice.Current.GetDevicesByMac(deviceMac, false); - if (LocalDevice.Current.IsMiniLight(listMacDevice[0]) == true) + if (listMacDevice.Count > 0 && LocalDevice.Current.IsMiniLight(listMacDevice[0]) == true) { //mini澶滅伅鐨勫姛鑳借缃晫闈� var room = HdlRoomLogic.Current.GetRoomByDevice(listMacDevice[0]); @@ -489,6 +489,16 @@ { //鏅鸿兘闂ㄩ攣 if (deviceEnumInfo.BeloneType == DeviceBeloneType.A鏅鸿兘闂ㄩ攣) + { + var form = new DeviceMacInfoEditorForm(); + form.AddForm(device.DeviceAddr); + } + else if (deviceEnumInfo.BeloneType == DeviceBeloneType.A鏅捐。鏋�) + { + var form = new DeviceMacInfoEditorForm(); + form.AddForm(device.DeviceAddr); + } + else if (deviceEnumInfo.BeloneType == DeviceBeloneType.A绌烘皵璐ㄩ噺) { var form = new DeviceMacInfoEditorForm(); form.AddForm(device.DeviceAddr); @@ -710,7 +720,7 @@ } //濡傛灉鏄湪绾跨殑 var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.NowSelectGatewayId); - if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(nowGateway) == true) + if (HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(nowGateway) == true) { //妫�娴嬪箍鎾埌鐨勮繖涓綉鍏虫槸鍚︽嫢鏈変綇瀹匢D ZbGateway realWay = null; @@ -726,6 +736,11 @@ ProgressBar.Close(); if (result2 == -1) { + HdlThreadLogic.Current.RunMain(() => + { + //闅愯棌涓嬫媺鍒锋柊鐗规晥 + listView.EndHeaderRefreshing(); + }); return; } } @@ -737,7 +752,7 @@ } //鑾峰彇鍏ㄩ儴璁惧 - int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway, false); + int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway.GwId, false); if (this.Parent == null) { return; @@ -778,7 +793,7 @@ { if (this.gatewayViewRow != null && this.gatewayViewRow.zbGatewayId == selectGwId) { - bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbGateway); + bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbGateway); //鍒锋柊鎺т欢鍦ㄧ嚎鐘舵�� this.gatewayViewRow?.RefreshOnlineStatu(); //鏍规嵁缃戝叧鍦ㄧ嚎鐘舵�佸埛鏂拌澶囧湪绾跨姸鎬� @@ -974,10 +989,10 @@ return; } //娣诲姞鍗囩骇鍥轰欢淇℃伅(鎴愪笉鎴愬姛閮芥棤鎵�璋�) - var result = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, ota.HwVersion.ToString(), ota.ImgTypeId.ToString()); + var result = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.A璁惧, ota.HwVersion.ToString(), ota.ImgTypeId.ToString()); //鑾峰彇璁惧鏈�鏂扮増鏈� - var deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.ZigbeeDevice, + var deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.A璁惧, ota.HwVersion.ToString(), ota.ImgTypeId.ToString(), ota.ImgVersion); @@ -1004,7 +1019,7 @@ } }); } - }); + }, ShowErrorMode.NO); } #endregion @@ -1138,6 +1153,20 @@ /// </summary> public override int FormActionAgainEvent() { + if (GatewayResourse.AppOldSelectGatewayId != this.gatewayViewRow.zbGatewayId) + { + //杩欎釜缃戝叧琚暣鎺変簡,闇�瑕侀噸鏂板垵濮嬪寲鐣岄潰 + this.nowActionDeviceMac = null; + this.oldShowRightMuneRow = null; + //閲嶆柊閫夋嫨缃戝叧 + HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId(); + + //鍒濆鍖栫晫闈� + this.InitMiddleFrame(); + + return 1; + } + if (this.nowActionDeviceMac != null) { //鍒锋柊鎸囧畾璁惧琛岀殑淇℃伅 @@ -1219,9 +1248,9 @@ /// </summary> private NormalViewControl btnName = null; /// <summary> - /// 鍦ㄧ嚎鐘舵�� + /// 鍦ㄧ嚎鐘舵��(鍒濆鐘舵�佷负鍦ㄧ嚎) /// </summary> - public bool isOnline = false; + public bool isOnline = true; /// <summary> /// 鑷畾涔夌綉鍏虫帶浠� @@ -1266,11 +1295,11 @@ { btnName.Text = HdlGatewayLogic.Current.GetGatewayName(zbway); //鍦ㄧ嚎鐘舵�� - this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway); - if (this.isOnline == false) - { - btnName.TextColor = UserCenterColor.Current.TextGrayColor1; - } + //this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway); + //if (this.isOnline == false) + //{ + // btnName.TextColor = UserCenterColor.Current.TextGrayColor1; + //} } else { @@ -1335,7 +1364,7 @@ return; } //鍦ㄧ嚎鐘舵�� - bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway); + bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway); if (this.isOnline != statu) { this.isOnline = statu; @@ -1392,7 +1421,7 @@ btnName.Height = Application.GetRealHeight(60); btnName.TextSize = 15; btnName.Y = Application.GetRealHeight(57); - btnName.Text = "灏忓害灏忓害"; + btnName.Text = "鏅鸿兘闊崇"; this.AddRightArrow(); this.AddMostRightView("", 300, false).Name = "smartSoundLayout"; -- Gitblit v1.8.0