From baca65d449433d73516660d849c112ed8f5d3dd3 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 19 十月 2023 10:35:32 +0800 Subject: [PATCH] 2023年10月19日10:34:19 --- HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 48 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs index c5eb0cc..704b7d7 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs @@ -26,13 +26,26 @@ /// <param name="isClick">false鐐瑰嚮鏃犳晥</param> public bool GetClick() { - return this.mIsClick; + return this.mIsClick; } /// <summary> /// 寤舵椂鏃堕棿ms /// </summary> - private const int millisecondsTimeout = 100; + public const int millisecondsTimeout = 100; + + /// <summary> + /// 閫変腑棰滆壊 + /// </summary> + public const uint seleBackgroundColor = 0xFFF2F3F7; + /// <summary> + /// 涓嶆敮鎸佹寜閿枃鏈鑹� + /// </summary> + public const uint unBackgroundColor = 0xFFA3AAB7; + /// <summary> + /// 涓嶆敮鎸佹暣涓鑹� + /// </summary> + public const uint unParentBackgroundColor = 0xFFF2F3F7; /// <summary> /// 璋冩暣鐪熷疄楂樺害 @@ -75,24 +88,26 @@ return bottomHeight; } /// <summary> - /// 璁剧疆楂樹寒棰滆壊 + /// 璁剧疆楂樹寒棰滆壊(grb) /// </summary> + /// <param name="seleColor">閫変腑棰滆壊鍊�</param> + /// <param name="unColor">鏈�変腑棰滆壊鍊�</param> /// <param name="view">缁勪欢</param> - public void SetHighlightBackground(View view) + public void SetHighlightColor(View view, uint seleColor =seleBackgroundColor, uint unColor = 0x00000000) { if (view == null) { return; } //鎸変笅鍘绘敼鍙樿儗鏅鑹� - view.BackgroundColor = AksCommonMethod.seleBackgroundColor; + view.BackgroundColor = seleColor; new System.Threading.Thread(() => { System.Threading.Thread.Sleep(millisecondsTimeout); Application.RunOnMainThread(() => { //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - view.BackgroundColor = 0x00000000; + view.BackgroundColor = unColor; }); }) { IsBackground = true }.Start(); @@ -110,23 +125,46 @@ return; } //鎸変笅鍘绘敼鍙樿儗鏅鑹� - button.IsSelected =true; + button.IsSelected = true; new System.Threading.Thread(() => { System.Threading.Thread.Sleep(millisecondsTimeout); Application.RunOnMainThread(() => { //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - button.IsSelected=false; + button.IsSelected = false; }); }) { IsBackground = true }.Start(); } - + /// <summary> + /// 璁剧疆楂樹寒鑳屾櫙鍥炬爣 + /// </summary> + /// <param name="sele">閫変腑鍥剧墖璺緞</param> + /// <param name="unColor">鏈�変腑鍥剧墖璺緞<</param> + /// <param name="view">缁勪欢</param> + public void SetHighlightImagePath(FrameLayout frame, string seleImagePath, string unImagePath) + { + if (frame == null) + { + return; + } + //鎸変笅鍘绘敼鍙樿儗鏅鑹� + frame.BackgroundImagePath = seleImagePath; + new System.Threading.Thread(() => + { + System.Threading.Thread.Sleep(millisecondsTimeout); + Application.RunOnMainThread(() => + { + //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� + frame.BackgroundImagePath = unImagePath; + }); + }) + { IsBackground = true }.Start(); - + } -- Gitblit v1.8.0