From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 31 十二月 2020 17:01:18 +0800
Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs |  699 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 601 insertions(+), 98 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
old mode 100755
new mode 100644
index d0b4550..3f07e33
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -1,113 +1,616 @@
 锘縰sing System;
+using System.Collections.Generic;
 using Shared.Common;
 using ZigBee.Device;
 
 namespace Shared.Phone.UserCenter.DeviceBind
 {
-    public class BindCommonLayout : FrameLayout
+  public class BindCommonLayout : FrameLayout
+  {
+    #region 鈼� 鍙橀噺鐢虫槑__________________________
+    /// <summary>
+    /// 妤煎眰鍥炶皟
+    /// </summary>
+    public Action FloorAction = null;
+    /// <summary>
+    /// 閫変腑鐨勬ゼ灞傚洖璋�
+    /// </summary>
+    public Action<string, Button> ChooseFloorAction = null;
+    /// <summary>
+    ///  閲嶆柊鍔犺浇
+    /// </summary>
+    public Action ReLoadAction = null;
+
+    public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
+    public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
+
+    public FrameLayout titleFrameLayout = new FrameLayout
     {
-        public BindCommonLayout()
-        {
+      Y = Application.GetRealHeight(92),
+      X = Application.GetRealWidth(161),
+      Width = Application.GetRealWidth(1080 - 161),//919
+      Height = Application.GetRealHeight(69),
+    };
+    public Button btnTitle = new Button
+    {
+      TextAlignment = TextAlignment.CenterLeft,
+      TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
+      Width = Application.GetRealWidth(1080 - 161),//919
+      Height = Application.GetRealWidth(69),
+      TextSize = 17,
+      IsBold = true,
+      //X = Application.GetRealWidth(161 - 116),
+    };
+    /// <summary>
+    /// 鏍囬杩斿洖甯冨眬
+    /// </summary>
+    public FrameLayout btnBackFrameLayout = new FrameLayout
+    {
+      Width = Application.GetRealWidth(58 * 2),//116
+    };
 
-        }
-        #region 鈼� 鍙橀噺鐢虫槑__________________________
-        public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
-        public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
+    /// <summary>
+    /// 鏍囬杩斿洖鎸夐敭
+    /// </summary>
+    public Button btnBack = new Button
+    {
+      Height = Application.GetRealHeight(51),
+      Width = Application.GetRealWidth(30),
+      X = Application.GetRealWidth(58),
+      Y = Application.GetRealHeight(98),
+      UnSelectedImagePath = "DoorLock/Left.png",
+    };
 
-        public FrameLayout bottomRadiusFrameLayout = new FrameLayout()
+    /// <summary>
+    /// 鏍囬涓嬬嚎
+    /// </summary>
+    public Button btnTitleLine = new Button
+    {
+      Y = Application.GetRealHeight(181),
+      Height = 1,
+      BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine,
+    };
+
+    #region 搴曢儴鏈夊渾瑙掑竷灞�
+    /// 鑳屾櫙闃村奖鐣岄潰
+    /// </summary>
+    public FrameLayout shadowRadiusFrameLayout = new FrameLayout { BackgroundColor = 0x0f000000 };
+    /// <summary>
+    /// 璁剧疆鍦嗚鐨勭晫闈�
+    /// </summary>
+    public FrameLayout bottomRadiusFrameLayout = new FrameLayout()
+    {
+      Height = Application.GetRealHeight(806),
+      Y = Application.GetRealHeight(930),
+      BackgroundColor = ZigbeeColor.Current.XMWhite,
+    };
+    /// <summary>
+    /// 搴曢儴鍦嗚涓殑鍙栨秷鎸夐挳
+    /// </summary>
+    public Button btnCancel = new Button
+    {
+      X = Application.GetRealWidth(81),
+      Y = Application.GetRealHeight(40),
+      Height = Application.GetRealHeight(58),
+      Width = Application.GetRealWidth(101),
+      Text = Language.StringByID(R.MyInternationalizationString.Cancel),
+      TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+      TextSize = 14,
+    };
+    /// <summary>
+    /// 搴曢儴鍦嗚涓殑鏍囬鏍�
+    /// </summary>
+    public Button btnBottomTitle = new Button
+    {
+      X = Application.GetRealWidth(446 - 50),
+      Y = Application.GetRealHeight(35),
+      Height = Application.GetRealHeight(63),
+      Width = Application.GetRealWidth(284),
+      Text = Language.StringByID(R.MyInternationalizationString.MatchPerson),
+      TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
+      TextSize = 16,
+    };
+    /// <summary>
+    /// 搴曢儴鍦嗚涓殑纭鎸夐挳
+    /// </summary>
+    public Button btnFinish = new Button
+    {
+      X = Application.GetRealWidth(919),
+      Y = Application.GetRealHeight(40),
+      Height = Application.GetRealHeight(58),
+      Width = Application.GetRealWidth(101),
+      Text = Language.StringByID(R.MyInternationalizationString.Complete),
+      TextColor = Shared.Common.ZigbeeColor.Current.XMOrange,
+      TextSize = 14,
+    };
+    /// <summary>
+    /// 搴曢儴鍦嗚涓殑鏍囬鏍忎笅鐨勭嚎鏉�
+    /// </summary>
+    public Button line = new Button()
+    {
+      Y = Application.GetRealHeight(138),
+      Height = 1,
+      BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
+    };
+
+    #endregion
+
+    #endregion
+
+    /// <summary>
+    /// 椤堕儴甯冨眬
+    /// </summary>
+    /// <param name="frameLayout"></param>
+    public void TopFrameLayout(FrameLayout frameLayout, string titleText)
+    {
+      this.AddChidren(topFrameLayout);
+      topFrameLayout.AddChidren(btnBackFrameLayout);
+      topFrameLayout.AddChidren(titleFrameLayout);
+      topFrameLayout.AddChidren(btnTitleLine);
+      btnBackFrameLayout.AddChidren(btnBack);
+      titleFrameLayout.AddChidren(btnTitle);
+      btnTitle.Text = titleText;
+
+      btnTitle.MouseLongEventHandler = (sender, e) =>
+      {
+        var f1 = new FrameLayout()
         {
-            Height = Application.GetRealHeight(100),
-            Y = Application.GetRealHeight(930),
-            Radius = 17,
-            BackgroundColor = ZigbeeColor.Current.XMWhite,
+          Width = Application.GetRealWidth(400),
+          Gravity = Gravity.CenterHorizontal,
         };
-
-        public FrameLayout titleFrameLayout = new FrameLayout
+        this.titleFrameLayout.AddChidren(f1);
+        var btn1 = new Button()
         {
-            Y = Application.GetRealHeight(92),
-            X = Application.GetRealWidth(161),
-            Width = Application.GetRealWidth(1080 - 161),//919
-            Height = Application.GetRealHeight(69),
+          Width = Application.GetRealWidth(6),
+          Height = Application.GetRealHeight(6),
+          Radius = (uint)Application.GetRealWidth(3),
+          BackgroundColor = 0xff000000,
         };
-        public Button btnTitle = new Button
-        {
-            TextAlignment = TextAlignment.CenterLeft,
-            TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
-            Width = Application.GetRealWidth(1080 - 161),//919
-            Height = Application.GetRealWidth(69),
-            TextSize = 17,
-            IsBold = true,
-            //X = Application.GetRealWidth(161 - 116),
-        };
-        /// <summary>
-        /// 鏍囬杩斿洖甯冨眬
-        /// </summary>
-        public FrameLayout btnBackFrameLayout = new FrameLayout
-        {
-            Width = Application.GetRealWidth(58 * 2),//116
-        };
+        f1.AddChidren(btn1);
 
-        /// <summary>
-        /// 鏍囬杩斿洖鎸夐敭
-        /// </summary>
-        public Button btnBack = new Button
-        {
-            Height = Application.GetRealHeight(51),
-            Width = Application.GetRealWidth(30),
-            X = Application.GetRealWidth(58),
-            Y = Application.GetRealHeight(98),
-            UnSelectedImagePath = "DoorLock/Left.png",
-        };
-
-        /// <summary>
-        /// 鏍囬涓嬬嚎
-        /// </summary>
-        public Button btnTitleLine = new Button
-        {
-            Y = Application.GetRealHeight(181),
-            Height = 1,
-            BackgroundColor = Shared.Common.ZigbeeColor.Current.XMTitleLine,
-        };
-        #endregion
-
-        /// <summary>
-        /// 椤堕儴甯冨眬
-        /// </summary>
-        /// <param name="frameLayout"></param>
-        public void TopFrameLayout(FrameLayout frameLayout, string titleText)
-        {
-            this.AddChidren(topFrameLayout);
-            topFrameLayout.AddChidren(btnBackFrameLayout);
-            topFrameLayout.AddChidren(titleFrameLayout);
-            topFrameLayout.AddChidren(btnTitleLine);
-            btnBackFrameLayout.AddChidren(btnBack);
-            titleFrameLayout.AddChidren(btnTitle);
-            btnTitle.Text = titleText;
-        }
-        /// <summary>
-        /// 闂ㄩ攣涓儴甯冨眬
-        /// </summary>
-        /// <param name="frameLayout"></param>
-        public void MidFrameLayout(FrameLayout frameLayout)
-        {
-            //midFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBackgroundColor;
-            midFrameLayout.Y = topFrameLayout.Bottom;
-            this.AddChidren(midFrameLayout);
-        }
-
-        /// <summary>
-        /// 闂ㄩ攣搴曢儴甯冨眬
-        /// </summary>
-        /// <param name="frameLayout"></param>
-        public void BottomFrameLayout(FrameLayout frameLayout)
-        {
-            var bottomFrameLayout1 = new FrameLayout()
-            {
-                Height = Application.GetRealHeight(806 - 50),
-                Y = Application.GetRealHeight(930 + 48),
-                BackgroundColor = ZigbeeColor.Current.XMWhite,
-            };
-            this.midFrameLayout.AddChidren(bottomFrameLayout1);
-        }
+        f1.MouseLongEventHandler += (sender1, e1) =>
+              {
+                ErrroInfoLayout(this);
+                f1.RemoveFromParent();
+              };
+      };
     }
-}
\ No newline at end of file
+    /// <summary>
+    /// 涓儴甯冨眬
+    /// </summary>
+    /// <param name="frameLayout"></param>
+    public void MidFrameLayout(FrameLayout frameLayout)
+    {
+      //midFrameLayout.BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBackgroundColor;
+      midFrameLayout.Y = topFrameLayout.Bottom;
+      this.AddChidren(midFrameLayout);
+    }
+
+    /// <summary>
+    /// 搴曢儴甯冨眬
+    /// </summary>
+    /// <param name="frameLayout"></param>
+    public void BottomFrameLayout(FrameLayout frameLayout)
+    {
+      var bottomFrameLayout1 = new FrameLayout()
+      {
+        Height = Application.GetRealHeight(806 - 50),
+        Y = Application.GetRealHeight(930 + 48),
+        BackgroundColor = ZigbeeColor.Current.XMWhite,
+      };
+      this.midFrameLayout.AddChidren(bottomFrameLayout1);
+    }
+
+    /// <summary>
+    /// 闂ㄩ攣搴曢儴甯﹀渾瑙掑竷灞�
+    /// </summary>
+    /// <param name="frameLayout"></param>
+    public void BottomRadiusFrameLayout(FrameLayout frameLayout)
+    {
+      this.shadowRadiusFrameLayout.AddChidren(this.bottomRadiusFrameLayout);
+      this.bottomRadiusFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+      this.bottomRadiusFrameLayout.AddChidren(btnCancel);
+      this.bottomRadiusFrameLayout.AddChidren(btnBottomTitle);
+      this.bottomRadiusFrameLayout.AddChidren(btnFinish);
+      this.bottomRadiusFrameLayout.AddChidren(line);
+    }
+
+    /// <summary>
+    /// 鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈�(涓昏鏄敤鍦ㄧ晫闈㈠姞杞介敊璇椂锛屽啀娆″姞杞�)
+    /// </summary>
+    public void ShowReLoadView()
+    {
+      var frame = new FrameLayout();
+      frame.BackgroundColor = UserCenterColor.Current.White;
+      frame.Tag = "ReLoadView";
+      this.midFrameLayout.AddChidren(frame);
+
+      //閲嶆柊鍔犺浇
+      var btnReLoad = new BottomClickButton();
+      btnReLoad.Gravity = Gravity.Center;
+      btnReLoad.TextID = R.MyInternationalizationString.uDoReload;
+      frame.AddChidren(btnReLoad);
+      btnReLoad.ButtonClickEvent += (sender, e) =>
+      {
+        ReLoadAction?.Invoke();
+        ReLoadAction = null;
+      };
+    }
+
+    /// <summary>
+    /// 娣诲姞妤煎眰UI
+    /// </summary> 
+    public void BindDownFrameLayout(FrameLayout frameLayout, Panel curControlDev, Dictionary<string, string> dicFloorList, ref Button btnFloorText)
+    {
+      var btnAddFrameLayout = new FrameLayout
+      {
+        X = Application.GetRealWidth(619),
+      };
+      this.titleFrameLayout.AddChidren(btnAddFrameLayout);
+
+      btnFloorText = new Button
+      {
+        Width = Application.GetRealWidth(300 - 69 - 58),
+        TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
+        TextSize = 14,
+        IsBold = true,
+        TextAlignment = TextAlignment.CenterRight,
+      };
+      btnAddFrameLayout.AddChidren(btnFloorText);
+
+      var btnBindDownFrameLayout = new FrameLayout
+      {
+        Width = Application.GetMinReal(69 + 58),
+        X = Application.GetRealWidth(300 - 69 - 58),
+      };
+      btnAddFrameLayout.AddChidren(btnBindDownFrameLayout);
+
+      var btnBindDown = new Button
+      {
+        Height = Application.GetMinReal(69),
+        Width = Application.GetMinReal(69),
+        UnSelectedImagePath = "BindPic/BindDown.png",
+        Gravity = Gravity.CenterVertical,
+      };
+      btnBindDownFrameLayout.AddChidren(btnBindDown);
+
+      EventHandler<MouseEventArgs> eHandlerBindDown = (sender, e) =>
+      {
+        if (dicFloorList == null)
+        {
+          dicFloorList = new Dictionary<string, string>();
+        }
+        SideslipFramelayout(curControlDev, dicFloorList);
+      };
+      btnBindDown.MouseDownEventHandler += eHandlerBindDown;
+      btnBindDownFrameLayout.MouseDownEventHandler += eHandlerBindDown;
+      if (Common.Config.Instance.Home.FloorDics.Count == 0)
+      {
+        btnAddFrameLayout.Width = 0;
+      }
+      else
+      {
+        btnAddFrameLayout.Width = Application.GetRealWidth(300);
+      }
+    }
+
+    /// <summary>
+    /// 妤煎眰閫夋嫨鐨勪晶杈规爮
+    /// </summary>
+    void SideslipFramelayout(Panel curControlDev, Dictionary<string, string> dicFloorList)
+    {
+      var dialog = new Dialog
+      {
+      };
+      dialog.Show();
+
+      var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
+      dialog.AddChidren(flMain);
+      flMain.MouseUpEventHandler += (sender11, e11) =>
+      {
+        dialog.Close();
+      };
+
+      var sidelipFrameLayout = new FrameLayout()
+      {
+        Width = Application.GetMinReal(449),
+        Y = Application.GetRealHeight(161),
+        X = Application.GetRealWidth(596),
+        BackgroundImagePath = "DoorLock/SideslipPic.png",
+      };
+      flMain.AddChidren(sidelipFrameLayout);
+
+      var btnSelectFloor = new Button()
+      {
+        Width = Application.GetRealWidth(200),
+        Height = Application.GetRealHeight(58),
+        X = Application.GetRealWidth(81),
+        Y = Application.GetRealHeight(81),
+        TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
+        TextSize = 14,
+        IsBold = true,
+        TextAlignment = TextAlignment.CenterLeft,
+        TextID = R.MyInternationalizationString.SelectFloor,
+      };
+      sidelipFrameLayout.AddChidren(btnSelectFloor);
+
+      var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
+      {
+        Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
+        Height = Application.GetRealHeight(600),
+      };
+      sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
+
+      Button oldbutton = null;
+      Button oldbuttonText = null;
+      int count = 0;
+      foreach (var floorId in dicFloorList.Keys)
+      {
+        var rowFrameLayout = new RowLayout()
+        {
+          Height = Application.GetRealHeight(152),
+          LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
+          X = Application.GetRealWidth(81),
+        };
+        sidelipVerticalScrolViewLayout.AddChidren(rowFrameLayout);
+
+        var btnAllMethod = new Button()
+        {
+          Width = Application.GetMinReal(81),
+          Height = Application.GetMinReal(81),
+          UnSelectedImagePath = "Floor/Floor.png",
+          SelectedImagePath = "Floor/FloorSelected.png",
+          Gravity = Gravity.CenterVertical,
+        };
+        rowFrameLayout.AddChidren(btnAllMethod);
+
+        var btnMethodText = new Button()
+        {
+          Width = Application.GetRealWidth(311),
+          Height = Application.GetRealHeight(58),
+          X = Application.GetRealWidth(92),
+          Gravity = Gravity.CenterVertical,
+          TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
+          TextSize = 14,
+          TextAlignment = TextAlignment.CenterLeft,
+          Text = dicFloorList[floorId],
+        };
+        rowFrameLayout.AddChidren(btnMethodText);
+
+        if (curControlDev.currentSelectFloorId == floorId)
+        {
+          btnAllMethod.IsSelected = true;
+          btnAllMethod.IsBold = true;
+          btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+        }
+
+        EventHandler<MouseEventArgs> hander = (sender, e) =>
+        {
+          if (curControlDev.currentSelectFloorId == floorId)
+          {
+            return;
+          }
+          curControlDev.currentSelectFloorId = floorId;
+
+          if (!btnMethodText.IsSelected)
+          {
+            if (oldbutton != null)
+            {
+              oldbutton.IsSelected = false;
+            }
+            if (oldbuttonText != null)
+            {
+              oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
+            }
+            oldbutton = btnMethodText;
+            oldbuttonText = btnMethodText;
+            btnMethodText.IsSelected = true;
+            oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+            oldbuttonText.IsBold = true;
+          }
+
+          int index = 0;
+          dialog.Close();
+          ChooseFloorAction?.Invoke(floorId, btnMethodText);
+        };
+        btnAllMethod.MouseUpEventHandler += hander;
+        rowFrameLayout.MouseUpEventHandler += hander;
+        btnMethodText.MouseUpEventHandler += hander;
+        count++;
+      }
+
+      if (count == 0)
+      {
+        sidelipFrameLayout.Height = 0;
+      }
+      else if (count <= 4 && count > 0)
+      {
+        sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
+      }
+      else
+      {
+        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;
+    }
+  }
+}

--
Gitblit v1.8.0