From 53cb8c211ecec2388a6583d32c5d2fe709285344 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 11 五月 2020 14:54:52 +0800
Subject: [PATCH] 上传
---
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 99 +++++++------------------------------------------
1 files changed, 14 insertions(+), 85 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index cb99f85..e1a5808 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -250,13 +250,10 @@
}
//鍔熻兘鍜屽満鏅痓odyView
- this.bodyFrameLayout = new FrameLayout()
- {
- Y = functionSceneView.Bottom,
- Height = Application.GetRealHeight(750),
- Gravity = Gravity.CenterHorizontal,
- BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
- };
+ this.bodyFrameLayout = new FrameLayout();
+ bodyFrameLayout.Y = functionSceneView.Bottom;
+ bodyFrameLayout.Height = this.listBodyContr.frameTable.Height - functionSceneView.Bottom;
+ bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
this.listBodyContr.frameTable.AddChidren(bodyFrameLayout);
//閫夋嫨鍔熻兘鍒嗘爮
@@ -549,7 +546,8 @@
//褰撳墠鎴块棿鐨勮澶囨暟
if (listDevice.Count == 0)
{
- ShowNoFunctionTip();
+ //杩樻病鏈夊姛鑳藉摝
+ this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.NoFunction_Tip));
return;
}
//璁惧鍒楄〃瀹瑰櫒鎺т欢
@@ -696,33 +694,6 @@
}
}
- /// <summary>
- /// 鏄剧ず娌℃湁鍔熻兘
- /// </summary>
- private void ShowNoFunctionTip()
- {
- var noFunction = new Button
- {
- Y = Application.GetRealHeight(69),
- Width = this.GetPictrueRealSize(683),
- Height = this.GetPictrueRealSize(392),
- Gravity = Gravity.CenterHorizontal,
- UnSelectedImagePath = "Item/NoFunction.png"
- };
- bodyFrameLayout.AddChidren(noFunction);
-
- var noFunctionTip = new Button()
- {
- Y = noFunction.Bottom,
- Height = Application.GetRealHeight(200),
- Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"),
- TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
- TextAlignment = TextAlignment.Center,
- IsMoreLines = true
- };
- bodyFrameLayout.AddChidren(noFunctionTip);
- }
-
#endregion
#region 鈻� 閲嶇疆璁惧鍗$墖鎺т欢鍧愭爣_______________
@@ -829,8 +800,8 @@
if (listScene.Count == 0)
{
- //鏄剧ず娌″満鏅�
- this.ShowNoSceneTip();
+ //杩樻病鏈夊満鏅摝
+ this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.NoScene_Tip));
return;
}
//鍒楄〃鎺т欢
@@ -912,26 +883,6 @@
System.Threading.Thread.Sleep(50);
}
}
- }
-
- /// <summary>
- /// 鏄剧ず娌″満鏅�
- /// </summary>
- private void ShowNoSceneTip()
- {
- var picNoFunc = new PicViewControl(683, 392);
- picNoFunc.Y = Application.GetRealHeight(69);
- picNoFunc.Gravity = Gravity.CenterHorizontal;
- picNoFunc.UnSelectedImagePath = "Item/NoFunction.png";
- bodyFrameLayout.AddChidren(picNoFunc);
-
- var btnTip = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(200), false);
- btnTip.Y = picNoFunc.Bottom;
- btnTip.Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n");
- btnTip.TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor;
- btnTip.TextAlignment = TextAlignment.Center;
- btnTip.IsMoreLines = true;
- bodyFrameLayout.AddChidren(btnTip);
}
/// <summary>
@@ -1103,7 +1054,9 @@
Application.RunOnMainThread(() =>
{
- ShowForm();
+ //鍒锋柊鐣岄潰
+ this.ShowForm();
+
CommonPage.Loading.Hide();
});
})
@@ -1139,16 +1092,9 @@
{
//鍒锋柊鍗$墖淇℃伅
var locadevice = LocalDevice.Current.GetDevice(mainKeys);
- if (report.DeviceStatusReport.CluterID == 513 && report.DeviceStatusReport.AttriBute[0].AttributeId == 28)
- {
- //绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
- this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
- }
- if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
- {
- //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
- this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
- }
+ //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 2020.05.09:鍒犻櫎Ack涓婚
+ this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
+ //鍒锋柊鎺т欢
this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
}
}, ShowErrorMode.NO);
@@ -1166,23 +1112,6 @@
bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(report);
this.dicDeviceCardControl[mainKeys].SetCardOnlineStatu(bolOnline);
return;
- }
-
- }, ShowErrorMode.NO);
- });
-
- //璁惧鎺у埗鍙嶉涓婃姤
- HdlGatewayReceiveLogic.Current.AddAttributeEvent("UserHomeViewDeviceRespone", ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉, (report) =>
- {
- HdlThreadLogic.Current.RunMain(() =>
- {
- string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
- if (this.dicDeviceCardControl.ContainsKey(mainKeys) == true)
- {
- //璁惧鍗$墖
- var deviceCardContr = this.dicDeviceCardControl[mainKeys];
- //宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
- deviceCardContr.SetHadGetResponeResultStatu();
}
}, ShowErrorMode.NO);
--
Gitblit v1.8.0