From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs |   62 +++++++++++++++++++++++++++---
 1 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
index 6ad3522..82d9885 100644
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
@@ -17,6 +17,14 @@
         /// 涓嬪垝绾�
         /// </summary>
         public FrameLayout Line;
+        /// <summary>
+        /// 鐐瑰嚮浜嬩欢
+        /// </summary>
+        public Action<LeftIconButtonRow, MouseEventArgs> ButtonClickEvent;
+        /// <summary>
+        /// ClickBtn
+        /// </summary>
+        public Button ClickBtn;
         /// <summary>
         /// v_Selected
         /// </summary>
@@ -41,7 +49,7 @@
 
         #endregion
 
-        public LeftIconButtonRow(int width,int height, int x = 0, int y = 0)
+        public LeftIconButtonRow(int width = 449, int height = 150, int x = 0, int y = 0)
         {
             X = x;
             Y = y;
@@ -81,7 +89,8 @@
                 Text = title,
                 TextAlignment = TextAlignment.CenterLeft,
                 Gravity = Gravity.CenterVertical,
-                Tag = this.Tag
+                Tag = this.Tag,
+                TextSize=14
             };
             AddChidren(TitleButton);
 
@@ -97,6 +106,9 @@
             {
                 AddChidren(Line);
             }
+
+            IconButton.MouseUpEventHandler += Button_MouseUpEventHandler;
+            TitleButton.MouseUpEventHandler += Button_MouseUpEventHandler;
         }
         #endregion
 
@@ -106,27 +118,63 @@
         /// 璁剧疆鐘舵��
         /// </summary>
         /// <param name="statu"></param>
-        public void SetStatu(bool statu)
+        private void SetStatu(bool statu)
         {
             IconButton.IsSelected = statu;
             TitleButton.IsSelected = statu;
+            TitleButton.IsBold = statu;
         }
         /// <summary>
         /// 閫変腑
         /// </summary>
         public void SetSelectedStatu()
         {
-            IconButton.IsSelected = true;
-            TitleButton.IsSelected = true;
+            SetStatu(true);
         }
         /// <summary>
         /// 涓嶉�変腑
         /// </summary>
         public void SetUnSelectedStatu()
         {
-            IconButton.IsSelected = false;
-            TitleButton.IsSelected = false;
+            SetStatu(false);
         }
+        /// <summary>
+        /// HidenLine
+        /// </summary>
+        /// <param name="statu"></param>
+        public void HidenLine(bool statu)
+        {
+            Line.Visible = !statu;
+        }
+        /// <summary>
+        /// 璁剧疆鏍囬棰滆壊
+        /// </summary>
+        /// <param name="color"></param>
+        /// <param name="selectedColor"></param>
+        public void SetTitleColor(uint color,uint selectedColor)
+        {
+            TitleButton.TextColor = color;
+            TitleButton.SelectedTextColor = selectedColor;
+        }
+        #endregion
+
+        #region 鈼� 鐐瑰嚮浜嬩欢_________________________
+
+        /// <summary>
+        /// 鐐瑰嚮浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Button_MouseUpEventHandler(object sender, MouseEventArgs e)
+        {
+            try
+            {
+                this.ButtonClickEvent?.Invoke(this, e);
+            }
+            catch (Exception ex)
+            {
+            }
+        }
         #endregion
     }
 }

--
Gitblit v1.8.0