From c0021397eeb8335d6d1f20990c71533c3d94e7af Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 10 一月 2020 17:02:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC
---
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
index 1d85f6a..f969dd1 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
@@ -91,10 +91,10 @@
/// </summary>
public void Show()
{
+ RemoveAll();
InitData();
AddTop();
AddBodyView();
-
}
/// <summary>
@@ -114,8 +114,7 @@
private void RefreshData()
{
devList = Shared.Common.Room.CurrentRoom.GetUnalloctedDeviceUIs();
- //sceneList = Shared.Common.Room.CurrentRoom.GetUnalloctedScenes();
- sceneList = Shared.Common.Room.CurrentRoom.GetLoveRoom().SceneUIList;
+ sceneList = Shared.Common.Room.CurrentRoom.GetUnalloctedScenes();
typeDeviceDic.Clear();
typeIdDic.Clear();
if (devList == null)
@@ -163,8 +162,6 @@
{
RemoveFromParent();
};
-
-
}
/// <summary>
@@ -253,7 +250,7 @@
public void RefreshBodyView()
{
functionSceneBodyView.RemoveAll();
-
+
if (functionBtn.IsSelected)
{
ShowFunction();
@@ -308,7 +305,7 @@
Width = Application.GetRealWidth(1028)
};
functionSceneBodyView.AddChidren(functionTypeScrowView);
-
+
deviceListScrolView = new VerticalScrolViewLayout
{
X = Application.GetRealWidth(CommonFormResouce.X_Left),
@@ -337,7 +334,7 @@
};
string imgPath=string.Empty;
string imgSeletedPath=string.Empty;
- Common.LocalDevice.Current.GetDeviceBeloneIcon(deviceType.Value, ref imgPath ,ref imgSeletedPath);
+ Common.LocalDevice.Current.GetDeviceObjectIcon(deviceType.Value, ref imgPath ,ref imgSeletedPath);
functionTypeIMG.Init(imgPath,imgSeletedPath);
functionTypeIMG.SetTitle(deviceType.Key);
typeRowLayout.AddChidren(functionTypeIMG);
@@ -360,7 +357,6 @@
/// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs)
{
- //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
tempFunctionTypeBtn.IsSelected = false;
tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton;
((typeSender as Button).Parent as FunctionButton).IsSelected = true;
@@ -433,6 +429,7 @@
if ((sender as Button).IsSelected)
{
(sender as Button).TextID = R.MyInternationalizationString.Cancel;
+ selectedList.Clear();
selectedList.AddRange(sameTypeList);
}
else
@@ -471,16 +468,26 @@
add.MouseUpEventHandler += (sender, e) =>
{
var selectZone = new SelectZone();
- AddChidren(selectZone);
+ selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo);
selectZone.Init();
- selectZone.ZoneAction = (r) =>
+ selectZone.ZoneAction += (r) =>
{
foreach (var d in selectedList)
{
r.AddDevice(d.CommonDevice, true);
deviceListScrolView.RemoveViewByTag(d);
}
- RefreshData();
+
+ if (sameTypeList.Count == selectedList.Count)
+ {
+ RefreshData();
+ RefreshBodyView();
+ }
+ else
+ {
+ RefreshData();
+ sameTypeList = typeDeviceDic[int.Parse((typeSender as Button).Tag.ToString())];
+ }
};
};
}
@@ -529,7 +536,7 @@
ShowNoSceneTip();
}
else
- {
+ {
var sceneScrolView = new VerticalScrolViewLayout
{
Y = Application.GetRealHeight(22),
@@ -649,7 +656,7 @@
var frame = sceneScrolView.GetChildren(i) as FrameLayout;
(frame.GetChildren(1) as Button).IsSelected = (sender as Button).IsSelected;
}
-
+
if ((sender as Button).IsSelected)
{
(sender as Button).TextID = R.MyInternationalizationString.Cancel;
@@ -692,9 +699,9 @@
add.MouseUpEventHandler += (sender, e) =>
{
var selectZone = new SelectZone();
- CommonPage.Instance.AddChidren(selectZone);
+ selectZone.title = Language.StringByID(R.MyInternationalizationString.AddTo);
selectZone.Init();
- selectZone.ZoneAction = (r) =>
+ selectZone.ZoneAction += (r) =>
{
foreach (var s in selectedList)
{
--
Gitblit v1.8.0