From b02e8275a21dc06bf54b66273485d44e007a2616 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 20 七月 2020 14:50:17 +0800
Subject: [PATCH] 新代码
---
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 5c0822a..7451d5d 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -23,11 +23,11 @@
/// <summary>
/// 鍦烘櫙鍔熻兘涓儴鑳屾櫙bodyView(楂樺害涓鸿澶囪彍鍗曠殑閭d釜鐧借壊鑳屾櫙鐨勪笂閮ㄥ埌灞忓箷搴曢儴)
/// </summary>
- public FrameLayout functionSceneBodyView;
+ public NormalFrameLayout functionSceneBodyView;
/// <summary>
/// 涓儴鑳屾櫙bodyView(楂樺害涓哄満鏅姛鑳藉垏鎹㈡帶浠剁殑搴曢儴鍒板睆骞曞簳閮�)
/// </summary>
- public FrameLayout functionSceneAutoBodyView;
+ public NormalFrameLayout functionSceneAutoBodyView;
/// <summary>
/// 鍙充笂瑙掓坊鍔犳寜閽�
/// </summary>
@@ -82,7 +82,7 @@
private void InitTopControl()
{
//澶撮儴FrameLayout
- this.topFrameLayout = new FrameLayout();
+ this.topFrameLayout = new NormalFrameLayout();
topFrameLayout.Y = Application.GetRealHeight(104);
topFrameLayout.Height = Application.GetRealHeight(127);
topFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
@@ -130,7 +130,7 @@
private void InitMidControls()
{
//搴旇鏄痓ody鍚�
- this.bodyFrameLayout = new FrameLayout();
+ this.bodyFrameLayout = new NormalFrameLayout();
bodyFrameLayout.Y = topFrameLayout.Bottom;
bodyFrameLayout.Height = this.Height - topFrameLayout.Bottom;
bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
@@ -152,18 +152,21 @@
btnFloorName.Y = Application.GetRealHeight(17);
btnFloorName.TextAlignment = TextAlignment.CenterRight;
btnFloorName.IsBold = true;
- btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
+ btnFloorName.Text = Common.Config.Instance.Home.GetCurrentFloorName;
frameSwitchBack.AddChidren(btnFloorName);
btnFloorName.ButtonClickEvent += (sender, e) =>
{
var floors = new SelectFloorForm();
+ floors.CurFloorId = Config.Instance.Home.CurrentFloorId;
AddChidren(floors);
floors.Init(580, 330, Direction.Right);
- floors.changeFloor = true;
floors.FloorAction += (floorId) =>
{
btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
+ Config.Instance.Home.CurrentFloorId = floorId;
HdlRoomLogic.Current.NowCategoryRoom = HdlRoomLogic.Current.GetLoveRoom();
+ //杩欎釜鏃跺�欓渶瑕佸埛鏂颁富椤�
+ UserPage.Instance.RefreshMainPageForm = true;
//鍒锋柊bodyView
this.RefreshBodyView();
};
@@ -181,13 +184,14 @@
}
//鐩墠涓嶇煡閬撻儹闆煄鐨勮繖涓叿浣撴斁鍦ㄥ摢涓殑浣嶇疆
- this.functionSceneAutoBodyView = new FrameLayout();
+ this.functionSceneAutoBodyView = new NormalFrameLayout();
functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
//鍦烘櫙,鍔熻兘,鑷姩鍖栫殑鍒囨崲鎺т欢
var switchContr = new SceneFunctionSwitchControl();
+ switchContr.Y = Application.GetRealHeight(40);
switchContr.Width = Application.GetRealWidth(650);
switchContr.Gravity = Gravity.CenterVertical;
frameSwitchBack.AddChidren(switchContr);
@@ -276,7 +280,7 @@
private void InitRoomMenuControl()
{
//褰撳墠妤煎眰鐨勫叏閮ㄦ埧闂�
- var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
if (HdlRoomLogic.Current.NowCategoryRoom == null)
{
//璁剧疆绗竴涓负鍒濆鎴块棿
@@ -317,7 +321,7 @@
};
//鍔熻兘鍜屽満鏅痓odyView
- this.functionSceneBodyView = new FrameLayout();
+ this.functionSceneBodyView = new NormalFrameLayout();
functionSceneBodyView.Y = roomSwitchContr.Bottom;
functionSceneBodyView.Height = functionSceneAutoBodyView.Height - roomSwitchContr.Bottom;
functionSceneAutoBodyView.AddChidren(functionSceneBodyView);
@@ -632,10 +636,14 @@
HdlThreadLogic.Current.RunMain(() =>
{
listview1.EndHeaderRefreshing();
- if (result == true)
+ //listview1.Parent涓簄ull浠h〃瀹冨垏鎹㈡埧闂翠簡
+ if (result == true && listview1.Parent != null)
{
+ //鍒锋柊鍦烘櫙鐨勬椂鍊�,鍏抽棴宸﹀垝鑿滃崟鐨勬湭鍒嗛厤鐣岄潰
+ MainPage.LeftListRoomViewFrom.Instance?.CloseUnallocatedRoomForm();
//鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
this.functionSceneBodyView.RemoveAll();
+
HdlThreadLogic.Current.RunMainInThread(() =>
{
//鍒锋柊鍦烘櫙鍒嗘敮鎺т欢
@@ -816,7 +824,11 @@
//宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 2020.05.09:鍒犻櫎Ack涓婚
this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
//鍒锋柊鎺т欢
- this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+ if (locadevice.Type != DeviceType.IASZone)
+ {
+ //浼犳劅鍣ㄤ笉闇�瑕佸睘鎬т笂鎶�(浣嗘槸閭d釜鐞冨瀷浼犳劅鍣ㄥ眳鐒朵細灞炴�т笂鎶�)
+ this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+ }
}
}, ShowErrorMode.NO);
});
@@ -857,10 +869,8 @@
string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
{
- //鏈湴璁惧瀵硅薄
- var locadevice = LocalDevice.Current.GetDevice(mainKeys);
- //鍒锋柊鍗$墖淇℃伅
- this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+ //寮�鍚闂儊鐗规晥
+ this.dicDeviceRowControl[mainKeys].StartRowLightAppeal();
}
}, ShowErrorMode.NO);
--
Gitblit v1.8.0