From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 13:16:21 +0800
Subject: [PATCH] 2019.11.15
---
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs | 69 +++++++---------------------------
1 files changed, 15 insertions(+), 54 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
index ef235e2..c4a6ace 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
@@ -77,8 +77,6 @@
this.ShowReLoadView();
return;
}
- //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
- HdlShardLogic.Current.GetMemberShardContentListFromLocal(memberShardInfo);
//鍒濆鍖栧尯鍩熷垪琛�
this.InitAreaListRow();
@@ -98,8 +96,11 @@
{
HdlThreadLogic.Current.RunMain(() =>
{
- //鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡
- this.ShowNotShardMode();
+ bodyFrameLayout.RemoveAll();
+ //杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔�
+ string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg);
+ string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+ this.ShowNotDataImage(bodyFrameLayout, Arry, "Item/NotShardPic.png", 383, 279);
});
}
else
@@ -139,6 +140,8 @@
{
this.AddRoomListRow(floorId, dicGroup[floorId]);
}
+ //璋冩暣妗屽竷楂樺害
+ listView.AdjustTableHeight();
});
}
}
@@ -210,7 +213,7 @@
frameBack.AddChidren(frameRow);
//鍥炬爣
var btnIcon = frameRow.frameTable.AddLeftIcon(81);
- btnIcon.UnSelectedImagePath = "Item/RoomIcon.png";
+ btnIcon.UnSelectedImagePath = "Item/RoomIconSelected.png";
//鍚嶇О
var btnName = frameRow.frameTable.AddLeftCaption(room.Name, 600);
btnName.TextSize = 15;
@@ -223,6 +226,8 @@
}
frameRow.frameTable.ButtonClickEvent += (sender, e) =>
{
+ var form = new LookSharedContentForm();
+ form.AddForm(room, memberShardInfo);
};
//鍒犻櫎
@@ -259,19 +264,14 @@
{
//鑾峰彇鍏ㄩ儴璁惧
var listDevice = new List<CommonDevice>();
- foreach (var deviceUi in room.DeviceUIList)
+ foreach (var deviceFile in room.DeviceUIFilePathList)
{
- var device = deviceUi.CommonDevice;
- if (device == null)
+ var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
+ if (byteData == null)
{
- string deviceFile = deviceUi.FileName.Replace("DeviceUI_", string.Empty);
- var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
- if (byteData == null)
- {
- continue;
- }
- device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
+ continue;
}
+ var device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
listDevice.Add(device);
}
//鑾峰彇鍏ㄩ儴鍦烘櫙
@@ -308,45 +308,6 @@
//閲嶆柊鍒锋柊鐣岄潰
this.InitMiddleFrame();
return 1;
- }
-
- #endregion
-
- #region 鈻� 涓�鑸柟娉昣__________________________
-
- /// <summary>
- /// 鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡
- /// </summary>
- private void ShowNotShardMode()
- {
- bodyFrameLayout.RemoveAll();
- //鍥剧墖
- var btnPic = new PicViewControl(383, 279);
- btnPic.Gravity = Gravity.CenterHorizontal;
- btnPic.Y = Application.GetRealHeight(498);
- btnPic.UnSelectedImagePath = "Item/NotShardPic.png";
- bodyFrameLayout.AddChidren(btnPic);
-
- //杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔�
- string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg);
- string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
- var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
- btnMsg1.Y = Application.GetRealHeight(962);
- btnMsg1.TextAlignment = TextAlignment.Center;
- btnMsg1.TextSize = 12;
- btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnMsg1.Text = Arry[0];
- bodyFrameLayout.AddChidren(btnMsg1);
- if (Arry.Length > 1)
- {
- var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
- btnMsg2.Y = btnMsg1.Bottom;
- btnMsg2.TextAlignment = TextAlignment.Center;
- btnMsg2.TextSize = 12;
- btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
- btnMsg2.Text = Arry[1];
- bodyFrameLayout.AddChidren(btnMsg2);
- }
}
#endregion
--
Gitblit v1.8.0