From dfcb2a1844fd55b57bae23e290b30ec6380e8508 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期五, 26 八月 2022 15:04:22 +0800 Subject: [PATCH] 更新全视通dll --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs | 268 ++++++++++++++++++++++++++-------------------------- 1 files changed, 134 insertions(+), 134 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs old mode 100755 new mode 100644 index 4c36649..0cf1a54 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs @@ -1,134 +1,134 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using ZigBee.Device; - -namespace Shared.Phone.UserCenter -{ - /// <summary> - /// 鍋氭垚涓�涓畝鍗曡澶囬�夋嫨鐨勮鎺т欢 - /// </summary> - public class DeviceSimpleSelectControl : FrameRowControl - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 璁惧瀵硅薄 - /// </summary> - public CommonDevice device - { - get { return Common.LocalDevice.Current.GetDevice(MainKeys); } - } - /// <summary> - /// 閫夋嫨鎺т欢 - /// </summary> - private MostRightIconControl btnSelect = null; - - /// <summary> - /// 閫夋嫨鐨勭姸鎬佹槸鍚﹁兘澶熷彇娑� - /// </summary> - public bool SelectCancel = true; - /// <summary> - /// 鐘舵�� - /// </summary> - private StatuMode Statu = StatuMode.UN_SELECT; - /// <summary> - /// 鏄惁澶勪簬閫夋嫨鐘舵�� - /// </summary> - public bool IsSelected - { - get { return Statu == StatuMode.SELECT; } - set - { - if (value == false) - { - if (SelectCancel == true) - { - this.SetUnselectStatu(); - } - } - else - { - this.SetSelectStatu(); - } - } - } - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鍋氭垚涓�涓畝鍗曡澶囬�夋嫨鐨勮鎺т欢 - /// </summary> - /// <param name="i_device">璁惧瀵硅薄</param> - /// <param name="autoSelect">褰撶偣鍑绘鎺т欢鏃�,鏄惁鑷姩璁剧疆閫夋嫨鐘舵��</param> - /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param> - public DeviceSimpleSelectControl(CommonDevice i_device, bool autoSelect, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) - { - this.MainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(i_device); - if (autoSelect == true) - { - this.ButtonClickEvent += (sender, e) => - { - this.IsSelected = Statu == StatuMode.SELECT ? false : true; - }; - } - } - - /// <summary> - /// 鍒濆鍖栧唴閮ㄦ帶浠� - /// </summary> - public void InitControl() - { - //鍥炬爣 - var btnIcon = this.AddLeftIcon(); - Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); - - //璁惧 - string eName = Common.LocalDevice.Current.GetDeviceEpointName(device); - this.AddLeftCaption(eName, 850); - - btnSelect = this.AddMostRightEmptyIcon(58, 58); - btnSelect.Visible = false; - btnSelect.UnSelectedImagePath = "Item/ItemSelected.png"; - } - - #endregion - - #region 鈻� 閫夋嫨鐘舵�乢__________________________ - - /// <summary> - /// 璁惧畾閫夋嫨鐘舵�� - /// </summary> - private void SetSelectStatu() - { - if (Statu == StatuMode.SELECT) - { - return; - } - btnSelect.Visible = true; - //鐘舵�佸彉鏇� - Statu = StatuMode.SELECT; - } - - /// <summary> - /// 璁剧疆闈為�夋嫨鐘舵�� - /// </summary> - private void SetUnselectStatu() - { - if (Statu == StatuMode.UN_SELECT) - { - return; - } - btnSelect.Visible = false; - //鐘舵�佸彉鏇� - Statu = StatuMode.UN_SELECT; - } - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ - - #endregion - } -} +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using ZigBee.Device; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// 鍋氭垚涓�涓畝鍗曡澶囬�夋嫨鐨勮鎺т欢 + /// </summary> + public class DeviceSimpleSelectControl : FrameRowControl + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 璁惧瀵硅薄 + /// </summary> + public CommonDevice device + { + get { return Common.LocalDevice.Current.GetDevice(MainKeys); } + } + /// <summary> + /// 閫夋嫨鎺т欢 + /// </summary> + private MostRightIconControl btnSelect = null; + + /// <summary> + /// 閫夋嫨鐨勭姸鎬佹槸鍚﹁兘澶熷彇娑� + /// </summary> + public bool SelectCancel = true; + /// <summary> + /// 鐘舵�� + /// </summary> + private StatuMode Statu = StatuMode.UN_SELECT; + /// <summary> + /// 鏄惁澶勪簬閫夋嫨鐘舵�� + /// </summary> + public bool IsSelected + { + get { return Statu == StatuMode.SELECT; } + set + { + if (value == false) + { + if (SelectCancel == true) + { + this.SetUnselectStatu(); + } + } + else + { + this.SetSelectStatu(); + } + } + } + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鍋氭垚涓�涓畝鍗曡澶囬�夋嫨鐨勮鎺т欢 + /// </summary> + /// <param name="i_device">璁惧瀵硅薄</param> + /// <param name="autoSelect">褰撶偣鍑绘鎺т欢鏃�,鏄惁鑷姩璁剧疆閫夋嫨鐘舵��</param> + /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param> + public DeviceSimpleSelectControl(CommonDevice i_device, bool autoSelect, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) + { + this.MainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(i_device); + if (autoSelect == true) + { + this.ButtonClickEvent += (sender, e) => + { + this.IsSelected = Statu == StatuMode.SELECT ? false : true; + }; + } + } + + /// <summary> + /// 鍒濆鍖栧唴閮ㄦ帶浠� + /// </summary> + public void InitControl() + { + //鍥炬爣 + var btnIcon = this.AddLeftIcon(); + Common.LocalDevice.Current.SetDeviceIconToControl(btnIcon, device); + + //璁惧 + string eName = Common.LocalDevice.Current.GetDeviceEpointName(device); + this.AddLeftCaption(eName, 850); + + btnSelect = this.AddMostRightEmptyIcon(58, 58); + btnSelect.Visible = false; + btnSelect.UnSelectedImagePath = "Item/ItemSelected.png"; + } + + #endregion + + #region 鈻� 閫夋嫨鐘舵�乢__________________________ + + /// <summary> + /// 璁惧畾閫夋嫨鐘舵�� + /// </summary> + private void SetSelectStatu() + { + if (Statu == StatuMode.SELECT) + { + return; + } + btnSelect.Visible = true; + //鐘舵�佸彉鏇� + Statu = StatuMode.SELECT; + } + + /// <summary> + /// 璁剧疆闈為�夋嫨鐘舵�� + /// </summary> + private void SetUnselectStatu() + { + if (Statu == StatuMode.UN_SELECT) + { + return; + } + btnSelect.Visible = false; + //鐘舵�佸彉鏇� + Statu = StatuMode.UN_SELECT; + } + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + #endregion + } +} -- Gitblit v1.8.0