From c1de48884fa145a16a0f8bcee93274dcfaa0ff82 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 07 五月 2020 10:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-2020xm
---
ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
index 58cc755..44418be 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/LeftIconButtonRow.cs
@@ -2,7 +2,7 @@
using Shared.Common;
namespace Shared.Phone.Device.CommonForm
{
- public class LeftIconButtonRow:FrameLayout
+ public class LeftIconButtonRow: UserCenter.FrameLayoutBase
{
#region 鈼� 鍙橀噺__________________________
/// <summary>
@@ -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;
@@ -62,8 +70,8 @@
IconButton = new Button()
{
X = Application.GetRealWidth(80),
- Height = Application.GetMinRealAverage(80),
- Width = Application.GetMinRealAverage(80),
+ Height = this.GetPictrueRealSize(80),
+ Width = this.GetPictrueRealSize(80),
UnSelectedImagePath = iconPath,
SelectedImagePath = iconSelectedPath,
Gravity = Gravity.CenterVertical,
@@ -98,6 +106,9 @@
{
AddChidren(Line);
}
+
+ IconButton.MouseUpEventHandler += Button_MouseUpEventHandler;
+ TitleButton.MouseUpEventHandler += Button_MouseUpEventHandler;
}
#endregion
@@ -107,7 +118,7 @@
/// 璁剧疆鐘舵��
/// </summary>
/// <param name="statu"></param>
- public void SetStatu(bool statu)
+ private void SetStatu(bool statu)
{
IconButton.IsSelected = statu;
TitleButton.IsSelected = statu;
@@ -127,6 +138,43 @@
{
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