From dc6493db59dcb0893eac50b72122f94c24056b3f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 12 十月 2020 14:35:39 +0800
Subject: [PATCH] 新版本
---
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs | 210 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 205 insertions(+), 5 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
index 5cdd8b4..881efa8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -7,10 +7,6 @@
{
public class BindCommonLayout : FrameLayout
{
- public BindCommonLayout()
- {
-
- }
#region 鈼� 鍙橀噺鐢虫槑__________________________
/// <summary>
/// 妤煎眰鍥炶皟
@@ -97,6 +93,30 @@
btnBackFrameLayout.AddChidren(btnBack);
titleFrameLayout.AddChidren(btnTitle);
btnTitle.Text = titleText;
+
+ btnTitle.MouseLongEventHandler = (sender, e) =>
+ {
+ var f1 = new FrameLayout()
+ {
+ Width = Application.GetRealWidth(400),
+ Gravity = Gravity.CenterHorizontal,
+ };
+ this.titleFrameLayout.AddChidren(f1);
+ var btn1 = new Button()
+ {
+ Width = Application.GetRealWidth(6),
+ Height = Application.GetRealHeight(6),
+ Radius = (uint)Application.GetRealWidth(3),
+ BackgroundColor = 0xff000000,
+ };
+ f1.AddChidren(btn1);
+
+ f1.MouseLongEventHandler += (sender1, e1) =>
+ {
+ ErrroInfoLayout(this);
+ f1.RemoveFromParent();
+ };
+ };
}
/// <summary>
/// 涓儴甯冨眬
@@ -341,5 +361,185 @@
sidelipFrameLayout.Height = Application.GetMinReal(780);
}
}
+
+ /// <summary>
+ /// Layout
+ /// </summary>
+ public void ErrroInfoLayout(FrameLayout frameLayout)
+ {
+ // 鍑嗗鍔犱竴闇�瑕佽緭鍏ュ瘑鐮佹墠 dialog.Show();
+ var editText = new EditText
+ {
+ Width = Application.GetRealWidth(800),
+ Height = Application.GetMinReal(100),
+ Text = "Bind",
+ TextAlignment = TextAlignment.Center,
+ TextSize = 12,
+ Gravity = Gravity.Center,
+ Radius = 10,
+ BorderColor = 0xffff00,
+ BorderWidth = 5,
+ BackgroundColor = 0xff000000,
+ };
+ frameLayout.AddChidren(editText);
+
+
+ Action<Shared.View> action = (obj) =>
+ {
+ if (editText.Text == "Bind")
+ {
+ editText.RemoveFromParent();
+
+ var dialog = new Dialog
+ {
+ };
+ dialog.Show();
+
+ var flMain = new FrameLayout { BackgroundColor = 0xff000000 };
+ dialog.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender11, e11) =>
+ {
+ dialog.Close();
+ };
+
+ var titleFrameLayout = new FrameLayout
+ {
+ BackgroundColor = 0xff2f2f2f,
+ Height = Application.GetMinReal(80),
+ Y = Application.GetMinReal(80),
+ };
+ dialog.AddChidren(titleFrameLayout);
+
+ var title = new Button
+ {
+ Width = Application.GetRealWidth(1080 - 200),
+ Text = "Search Error Infomation",
+ TextAlignment = TextAlignment.Center,
+ TextSize = 12,
+ IsBold = true,
+ };
+ titleFrameLayout.AddChidren(title);
+ title.MouseUpEventHandler += (sender11, e11) =>
+ {
+ dialog.Close();
+ };
+
+ var close = new Button
+ {
+ Height = Application.GetMinReal(80),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(1080 - 200),
+ Text = "鍏抽棴",
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 12,
+ Radius = 5,
+ };
+ titleFrameLayout.AddChidren(close);
+ close.MouseUpEventHandler += (sender11, e11) =>
+ {
+ dialog.Close();
+ };
+
+ var contentLayout = new VerticalScrolViewLayout()
+ {
+ BackgroundColor = 0xff2f2f2f,
+ Y = titleFrameLayout.Bottom,
+ Height = Application.GetRealHeight(1710),
+ };
+ flMain.AddChidren(contentLayout);
+
+ var Info = GetErrorList();
+ for (int i = 0; i < Info.Count; i++)
+ {
+ var mess = Info[i];
+ var msgArry = mess.Split(new string[] { "[0]" }, StringSplitOptions.RemoveEmptyEntries);
+
+ var row = new RowLayout()
+ {
+ Height = Application.GetRealHeight(90),
+ };
+ contentLayout.AddChidren(row);
+
+ var btnText1 = new Button
+ {
+ Height = Application.GetMinReal(80),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(5),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 10,
+ Text = msgArry[0],
+ IsBold = true,
+ };
+ row.AddChidren(btnText1);
+
+ var btnText2 = new Button
+ {
+ Height = Application.GetMinReal(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 8,
+ X = btnText1.Right,
+ Text = msgArry[1],
+ };
+ row.AddChidren(btnText2);
+
+ if (msgArry.Length > 2)
+ {
+ btnText2.Height = Application.GetRealHeight(90 / 2);
+
+ var btnText3 = new Button
+ {
+ X = btnText1.Right,
+ Y = Application.GetRealHeight(90 / 2),
+ Height = Application.GetRealHeight(90 / 2),
+ Text = msgArry[2],
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 8,
+ };
+ row.AddChidren(btnText3);
+ }
+ }
+ }
+
+ };
+ editText.EditorEnterAction += action;
+ }
+
+ /// <summary>
+ ///缁戝畾閿欒琛�
+ /// </summary>
+ /// <returns></returns>
+ private List<string> GetErrorList()
+ {
+ var sList = new List<string> { };
+ sList.Add("0003:[0]鑾峰彇鎸夐敭鏀寔鐨勫姛鑳芥椂,缃戝叧娌″洖銆� 閫忎紶鍛戒护锛�0003 銆�");
+ sList.Add("0003_switch:[0]鑾峰彇寮�鍏冲叿浣撶被鍨嬫椂(绉佹湁鍔熻兘绗笁绾у埆),缃戝叧娌″洖銆愰�忎紶鍛戒护锛�0003銆�");
+ sList.Add("0003_dimmer:[0]鑾峰彇璋冨厜鍏蜂綋绫诲瀷鏃�(绉佹湁鍔熻兘绗笁绾у埆),缃戝叧娌″洖銆愰�忎紶鍛戒护锛�0003銆�");
+ sList.Add("0003_curtain:[0]鑾峰彇璋冨厜鍏蜂綋绫诲瀷鏃�(绉佹湁鍔熻兘绗笁绾у埆),缃戝叧娌″洖銆愰�忎紶鍛戒护锛�0003銆�");
+ sList.Add("108_ 6533:[0]璇诲彇闈㈡澘鐨勯厤缃俊鎭椂,缃戝叧娌″洖銆愬懡浠�108锛屽睘鎬�6533銆�");
+ sList.Add("120_ 6533:[0]閰嶇疆闈㈡澘鍔熻兘鏃�,缃戝叧娌″洖銆愬懡浠�120锛屽睘鎬�6533銆�");
+ sList.Add("5001:[0]璁惧缁戝畾鏃�,缃戝叧娌″洖銆愬懡浠�5001銆�");
+ sList.Add("5001_1:[0]璁惧娣诲姞缁戝畾鐩爣鏃�,缃戝叧缁戝畾鐩爣澶辫触锛岀粦瀹氳澶囩洰鏍囨湁婕忔帀銆愬懡浠�5001銆�");
+ sList.Add("5001_2:[0]璁惧娣诲姞缁戝畾鐩爣鏃�,缃戝叧鍥炲鏈煡閿欒銆愬懡浠�5001銆�");
+ sList.Add("5003:[0]鍒犻櫎璁惧鏃�,缃戝叧娌″洖銆愬懡浠�5003銆�");
+ sList.Add("5003_1:[0]褰撶粦瀹氱┖鐩爣锛屽彂鍒犻櫎宸茬粡瀛樺湪鎸夐敭鐨勭洰鏍囨椂锛孾0]缃戝叧娌″洖銆愬懡浠�5003銆�");
+ sList.Add("5003_2:[0]褰撶粦瀹氱┖鐩爣锛屽彂鍒犻櫎宸茬粡瀛樺湪鎸夐敭鐨勭洰鏍囨椂锛孾0]鎸夐敭鍥炲閿欒缁撴灉銆愬懡浠�5003銆�");
+ sList.Add("5003_3:[0]褰撶粦瀹氱┖鐩爣锛屽彂鍒犻櫎宸茬粡瀛樺湪鎸夐敭鐨勭洰鏍囨椂锛孾0]鎸夐敭缁撴灉鏄┖锛岀綉鍏冲洖澶嶉敊璇粨鏋溿�愬懡浠�5003銆�");
+ sList.Add("5003_4:[0]鏇存崲鐩爣鏃讹紝鍙戝垹闄ゆ寜閿棫鐨勭洰鏍囨椂锛屾寜閿粨鏋滄槸绌猴紝[0]缃戝叧鍥炲閿欒缁撴灉銆愬懡浠�5003銆�");
+ sList.Add("5003_5:[0]鏇存崲鐩爣鏃讹紝鍙戝垹闄ゆ寜閿棫鐨勭洰鏍囨椂锛孾0]鎸夐敭鍥炲閿欒缁撴灉銆愬懡浠�5003銆�");
+ sList.Add("5003_6:[0]鏇存崲鐩爣鏃讹紝鍙戝垹闄ゆ寜閿棫鐨勭洰鏍囨椂锛屾寜閿粨鏋滄槸绌猴紝[0]缃戝叧鍥炲閿欒缁撴灉銆愬懡浠�5003銆�");
+ sList.Add("5003_7:[0]鏇存崲鐩爣鏃讹紝鍙戝垹闄ゆ寜閿棫鐨勭洰鏍囨椂锛屾棫鐨勫悓绉嶇被鍨嬬殑鐩爣娌℃湁鍒犻櫎瀹岋紝[0]涓嶈兘缁戝畾鏂扮殑鐩爣銆愬懡浠�5003銆�");
+ sList.Add("5003_8:[0]鍒犻櫎鍗曚釜璁惧锛岀綉鍏冲洖澶嶇殑缁撴灉鏄け璐ョ殑銆愬懡浠�5003銆�");
+ sList.Add("5003_9:[0]鍒犻櫎鍗曚釜璁惧锛岀綉鍏冲洖澶嶉敊璇崟缁撴灉銆愬懡浠�5003銆�");
+ sList.Add("5006:[0]鍒犻櫎鎸夐敭鎵�鏈夌粦瀹氳〃鏃�,缃戝叧娌″洖銆愬懡浠�5006銆�");
+ sList.Add("5007:[0]鑾峰彇鎸夐敭缁戝畾琛ㄦ椂, 缃戝叧娌″洖銆愬懡浠�5007銆�");
+ sList.Add("5007_1:[0]鑾峰彇鎸夐敭缁戝畾琛ㄦ椂,缃戝叧娌″洖,缁撴灉鏄痆0]鑾峰彇澶氬姛鑳介潰鏉跨殑鐩爣涓暟涓嶅叏銆愬懡浠�5007銆�");
+ sList.Add("5007_2:[0]鑾峰彇鎸夐敭缁戝畾鐨勬俯搴︿紶鎰熷櫒澶辫触銆愬懡浠�5007銆�");
+ sList.Add("5007_3:[0]鑾峰彇鎸夐敭缁戝畾鐨勬箍搴﹀害浼犳劅鍣ㄥけ璐ャ�愬懡浠�5007銆�");
+ sList.Add("5020:[0]涓�瀵逛竴缁戝畾璁惧鏃�,缃戝叧娌″洖銆愬懡浠�5020銆�");
+ sList.Add("5020_1:[0]涓�瀵逛竴缁戝畾锛岃澶囨坊鍔犵粦瀹氱洰鏍囨椂,[0]缃戝叧缁戝畾鐩爣澶辫触锛岀粦瀹氳澶囦笉瀛樺湪銆愬懡浠�5020銆�");
+ sList.Add("5020_2:[0]涓�瀵逛竴缁戝畾锛岃澶囨坊鍔犵粦瀹氱洰鏍囨椂,缃戝叧缁戝畾鐩爣澶辫触锛孾0]缁戝畾鏈煡锛屽彲鑳芥槸绛夊緟鑺傜偣璁惧鍥炲銆愬懡浠�5020銆�");
+
+ return sList;
+ }
}
-}
\ No newline at end of file
+}
--
Gitblit v1.8.0