From 7f2d401e502bf89eea7404745c9ff7d103b37a63 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 07 五月 2020 16:06:43 +0800
Subject: [PATCH] 整一个

---
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs |   69 +++-------------------------------
 1 files changed, 7 insertions(+), 62 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index d5dbff1..a6dd9e0 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -182,7 +182,7 @@
             //鐩墠涓嶇煡閬撻儹闆煄鐨勮繖涓叿浣撴斁鍦ㄥ摢涓殑浣嶇疆
             this.functionSceneAutoBodyView = new FrameLayout();
             functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
-            functionSceneAutoBodyView.Height = Application.GetRealHeight(1423);
+            functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
             bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
 
             //鍦烘櫙,鍔熻兘,鑷姩鍖栫殑鍒囨崲鎺т欢
@@ -334,7 +334,9 @@
             var dicGroupDevice = this.GetAllGroupDevice(room);
             if (dicGroupDevice.Count == 0)
             {
-                this.ShowNoFunctionTip();
+                //娌℃湁鍔熻兘{0}璇峰湪涓汉涓績--璁惧绠$悊澶勬坊鍔�
+                string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoFunction).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+                this.ShowNotDataImage(functionSceneBodyView, arryMsg);
                 return;
             }
 
@@ -429,35 +431,6 @@
                 //鍒濆鍖栭粯璁ょ殑璁惧鍒楄〃鎺т欢
                 this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo, room);
             }
-        }
-
-        /// <summary>
-        /// 鎻愮ず娌℃湁鍔熻兘
-        /// </summary>
-        private void ShowNoFunctionTip()
-        {
-            var noFunction = new Button()
-            {
-                Y = Application.GetRealHeight(320),
-                Width = this.GetPictrueRealSize(757),
-                Height = this.GetPictrueRealSize(435),
-                UnSelectedImagePath = "Item/NoFunction.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            functionSceneBodyView.AddChidren(noFunction);
-
-            var noFunctionTip = new Button()
-            {
-                Y = noFunction.Bottom + Application.GetRealHeight(32),
-                Height = Application.GetRealHeight(200),
-                Width = Application.GetRealWidth(700),
-                Gravity = Gravity.CenterHorizontal,
-                Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                IsMoreLines = true
-            };
-            functionSceneBodyView.AddChidren(noFunctionTip);
         }
 
         #endregion
@@ -621,7 +594,9 @@
             }
             if (listScene.Count == 0)
             {
-                this.ShowNoSceneTip();
+                //娌℃湁鍦烘櫙{0}璇风偣鍑诲彸涓婅娣诲姞
+                string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoScene).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+                this.ShowNotDataImage(functionSceneBodyView, arryMsg);
                 return;
             }
 
@@ -758,36 +733,6 @@
                 });
             });
         }
-
-        /// <summary>
-        /// 鏄剧ず娌℃湁鍦烘櫙
-        /// </summary>
-        private void ShowNoSceneTip()
-        {
-            var noFunction = new Button()
-            {
-                Y = Application.GetRealHeight(320),
-                Width = this.GetPictrueRealSize(757),
-                Height = this.GetPictrueRealSize(435),
-                UnSelectedImagePath = "Item/NoFunction.png",
-                Gravity = Gravity.CenterHorizontal
-            };
-            functionSceneBodyView.AddChidren(noFunction);
-
-            var noScenceTip = new Button()
-            {
-                Y = noFunction.Bottom + Application.GetRealHeight(32),
-                Height = Application.GetRealHeight(200),
-                Width = Application.GetRealWidth(700),
-                Gravity = Gravity.CenterHorizontal,
-                Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
-                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
-                TextAlignment = TextAlignment.Center,
-                IsMoreLines = true
-            };
-            functionSceneBodyView.AddChidren(noScenceTip);
-        }
-
 
         #endregion
 

--
Gitblit v1.8.0