From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs | 98 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 98 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs new file mode 100755 index 0000000..ede1a4a --- /dev/null +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceFunctionUnallocatedControl.cs @@ -0,0 +1,98 @@ +锘縰sing Shared.Phone.UserCenter; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.MainPage.Controls +{ + /// <summary> + /// 鏈垎閰嶇晫闈㈢殑璁惧鍔熻兘鍥炬爣鎺т欢 + /// </summary> + public class DeviceFunctionUnallocatedControl : FrameLayoutStatuControl + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鑳屾櫙鎺т欢 + /// </summary> + private PicViewControl btnBackGroud = null; + /// <summary> + /// 璁惧鍥炬爣鎺т欢 + /// </summary> + private IconViewControl btnDeviceIcon = null; + /// <summary> + /// 鏂囨湰鎺т欢 + /// </summary> + private NormalViewControl btnDeviceName = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鏈垎閰嶇晫闈㈢殑璁惧鍔熻兘鍥炬爣鎺т欢 + /// </summary> + public DeviceFunctionUnallocatedControl() + { + this.Width = Application.GetRealWidth(220); + this.Height = Application.GetRealHeight(279); + this.UseClickStatu = false; + } + + /// <summary> + /// 鍒濆鍖� + /// </summary> + /// <param name="text">鏄剧ず鐨勬枃鏈�</param> + /// <param name="unSelectPath">鍥剧墖1</param> + /// <param name="selectPath">鍥剧墖2</param> + /// <param name="listDevice">璁惧鍒楄〃</param> + public void InitControl(string text, string unSelectPath, string selectPath, List<string> listDevice) + { + //鑳屾櫙鎺т欢 + this.btnBackGroud = new PicViewControl(150, 173); + btnBackGroud.Y = Application.GetRealHeight(35); + btnBackGroud.Gravity = Gravity.CenterHorizontal; + btnBackGroud.UnSelectedImagePath = "Item/Category_FunctionBG.png"; + btnBackGroud.SelectedImagePath = "Item/Category_FunctionBGSelected.png"; + this.AddChidren(btnBackGroud, ChidrenBindMode.BindEvent); + + //璁惧鍥炬爣 + this.btnDeviceIcon = new IconViewControl(84); + btnDeviceIcon.Y = Application.GetRealHeight(63); + btnDeviceIcon.UnSelectedImagePath = unSelectPath; + btnDeviceIcon.SelectedImagePath = selectPath; + btnDeviceIcon.Gravity = Gravity.CenterHorizontal; + this.AddChidren(btnDeviceIcon, ChidrenBindMode.BindEvent); + + //鏂囨湰 + this.btnDeviceName = new NormalViewControl(170, 60, true); + btnDeviceName.Y = Application.GetRealHeight(200); + btnDeviceName.Gravity = Gravity.CenterHorizontal; + btnDeviceName.TextColor = Common.ZigbeeColor.Current.GXCTextBlackColor; + btnDeviceName.SelectedTextColor = Common.ZigbeeColor.Current.GXCTextSelectedColor; + btnDeviceName.TextSize = 11; + btnDeviceName.Text = text; + btnDeviceName.TextAlignment = TextAlignment.Center; + this.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent); + } + + #endregion + + #region 鈻� 璁剧疆鐘舵�乢__________________________ + + /// <summary> + /// 璁剧疆閫夋嫨鐘舵�� + /// </summary> + /// <param name="isSelect"></param> + public void SetSelectStatu(bool isSelect) + { + this.btnBackGroud.IsSelected = isSelect; + this.btnDeviceIcon.IsSelected = isSelect; + this.btnDeviceName.IsSelected = isSelect; + this.btnDeviceName.IsBold = isSelect; + } + + #endregion + + } +} -- Gitblit v1.8.0