HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -269,11 +269,11 @@ case SPK.SensorHelp: { LogicView.FunTypeView view = new LogicView.FunTypeView(); view.btnText.TextID = StringId.qiujiuandzhengchang; view.btnText.TextID = StringId.qiujiu; fLayout.AddChidren(view.FLayoutView()); view.btnClick.MouseUpEventHandler += (sender, e) => { DeviceView(device, view.btnState, StringId.qiujiu, StringId.zhengchang ); DeviceView(device, view.btnState, StringId.qiujiu, StringId.zhengchang,1); }; if (edit) { @@ -895,7 +895,7 @@ /// <param name="button">选中状态显示文本Btn控件</param> /// <param name="btnText1">属性状态值文本1</param> /// <param name="btnText2">属性状态值文本2</param> /// <param name="viewCount">view数量</param> /// <param name="viewCount">view数量,默认2个view</param> private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2,int viewCount=2) { FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence }; @@ -1124,7 +1124,7 @@ if (device.spk == SPK.SensorLight) { //照明传感器 max =int.MaxValue; max =1200; } new LogicView.TipPopView { }.InputBox(textInt, stateValue, (value) => HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
@@ -539,10 +539,18 @@ } else { int intValue = int.Parse(editText.Text.Trim()); int intValue = -1; try { intValue = int.Parse(editText.Text.Trim()); } catch { intValue = -1; } if (intValue <minValue || intValue > maxValue) { errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("1",minValue.ToString()).Replace("000",maxValue.ToString()); errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("1", minValue.ToString()).Replace("100", maxValue.ToString()); } } if (errorId_IsNullOrEmpty!="") @@ -557,7 +565,7 @@ btnTip.X = Application.GetRealWidth(53); btnTip.Y = editBjView.Bottom + Application.GetRealHeight(12); btnTip.Width = Application.GetRealWidth(157);//200 btnTip.Height = Application.GetRealHeight(24);//17 btnTip.Height = Application.GetRealHeight(17);//17 btnTip.Text = errorId_IsNullOrEmpty; btnTip.TextColor = CSS_Color.textRedColor; btnTip.TextSize = TextSize.text12; HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -128,8 +128,10 @@ { Y = topView.fLayout.Bottom, Height = Application.GetRealHeight(H_W.H - H_W.T_Height), }; this.AddChidren(vv); //进来默认播放器界面 //this.SwitchUI(IntType.Player); } @@ -192,7 +194,7 @@ { this.remoteControlList = SendMethod.Current.GetRemoteControlLits(this.device.deviceId); this.sequencerList = SendMethod.Current.GetSequencerLits(this.device.deviceId); //TestData(this.remoteControlList); TestData(this.remoteControlList); } catch { } finally HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs
@@ -16,10 +16,24 @@ /// 设置控制点击事件 /// </summary> /// <param name="isClick">false点击无效</param> public void setClick(bool isClick) public void SetClick(bool isClick) { this.mIsClick = isClick; } /// <summary> /// 设置控制点击事件 /// </summary> /// <param name="isClick">false点击无效</param> public bool GetClick() { return this.mIsClick; } /// <summary> /// 延时时间ms /// </summary> private const int millisecondsTimeout = 100; /// <summary> /// 调整真实高度 /// </summary> @@ -60,6 +74,59 @@ } return bottomHeight; } /// <summary> /// 设置高亮颜色 /// </summary> /// <param name="view">组件</param> public void SetHighlightBackground(View view) { if (view == null) { return; } //按下去改变背景颜色 view.BackgroundColor = AksCommonMethod.seleBackgroundColor; new System.Threading.Thread(() => { System.Threading.Thread.Sleep(millisecondsTimeout); Application.RunOnMainThread(() => { //弹起来还原背景颜色 view.BackgroundColor = 0x00000000; }); }) { IsBackground = true }.Start(); } /// <summary> /// 设置Button专用 /// </summary> /// <param name="button">组件</param> public void SetButtonIsSelected(Button button) { if (button == null) { return; } //按下去改变背景颜色 button.IsSelected =true; new System.Threading.Thread(() => { System.Threading.Thread.Sleep(millisecondsTimeout); Application.RunOnMainThread(() => { //弹起来还原背景颜色 button.IsSelected=false; }); }) { IsBackground = true }.Start(); } HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs
@@ -152,35 +152,39 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { if (!this.GetClick()) { return; } action?.Invoke(this, btnImage, btnName); this.BackgroundColor = 0x00000000; SetHighlightBackground(this); //按下去改变背景颜色 //this.BackgroundColor = AksCommonMethod.seleBackgroundColor; //弹起来还原背景颜色 }; this.MouseUpEventHandler += UpClick; btnImage.MouseUpEventHandler += UpClick; btnName.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> CancelClick = (sender, e) => { this.BackgroundColor = 0x00000000; //弹起来还原背景颜色 }; this.MouseUpOutsideEventHandler += CancelClick; btnImage.MouseUpOutsideEventHandler += CancelClick; btnName.MouseUpOutsideEventHandler += CancelClick; //EventHandler<MouseEventArgs> CancelClick = (sender, e) => //{ // this.BackgroundColor = 0x00000000; // //弹起来还原背景颜色 //}; //this.MouseUpOutsideEventHandler += CancelClick; //btnImage.MouseUpOutsideEventHandler += CancelClick; //btnName.MouseUpOutsideEventHandler += CancelClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { //EventHandler<MouseEventArgs> DownClick = (sender, e) => //{ //按下去改变背景颜色 this.BackgroundColor = AksCommonMethod.seleBackgroundColor; // //按下去改变背景颜色 // this.BackgroundColor = AksCommonMethod.seleBackgroundColor; }; //}; this.MouseDownEventHandler += DownClick; btnImage.MouseDownEventHandler += DownClick; btnName.MouseDownEventHandler += DownClick; //this.MouseDownEventHandler += DownClick; //btnImage.MouseDownEventHandler += DownClick; //btnName.MouseDownEventHandler += DownClick; } /// <summary> /// 设置图标 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic; using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView { /// <summary> @@ -128,20 +129,18 @@ //不支持按键点击背景颜色 if (!keypad.isClicked) { buttonFram.Enable = false; buttonFram.GetImageButton().Alpha =0.5f; buttonFram.GetImageButton().Enable = false; buttonFram.GetNameButton().Enable = false; buttonFram.GetNameButton().TextColor = AksCommonMethod.unBackgroundColor; //buttonFram.BackgroundColor =AksCommonMethod.unParentBackgroundColor; buttonFram.SetClick(false); } buttonFram.SetClickListener((fl, btnIcon, btnName) => { if (buttonFram.Tag != null && buttonFram.Tag is KeypadEntity) if (buttonFram.Tag == null) { selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); return; } selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); }); //if (defaultIndex != -1 && defaultIndex == i) @@ -219,18 +218,18 @@ //不支持按键点击背景颜色 if (!keypad.isClicked) { buttonFram.Enable = false; buttonFram.GetImageButton().Alpha = 0.5f; buttonFram.GetImageButton().Enable = false; buttonFram.GetNameButton().Enable = false; buttonFram.GetNameButton().TextColor = AksCommonMethod.unBackgroundColor; buttonFram.SetClick(false); } buttonFram.SetClickListener((fl, btnIcon, btnName) => { if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) if (buttonFram.Tag == null) { selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); return; } selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); }); //if (defaultIndex != -1 && defaultIndex == i) @@ -292,29 +291,19 @@ //不支持按键点击背景颜色 if (!keypad.isClicked) { button.Enable = false; button.TextColor = AksCommonMethod.unBackgroundColor; } button.MouseDownEventHandler += (sen, e) => { button.IsSelected = true; }; button.MouseUpOutsideEventHandler += (sen, e) => { button.IsSelected = false; }; button.MouseUpEventHandler += (sen, e) => { if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none") if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none"|| !((KeypadEntity)button.Tag).isClicked) { return; } selectKeyAction?.Invoke((KeypadEntity)button.Tag); button.IsSelected = false; SetButtonIsSelected(button); }; //if (defaultIndex != -1 && defaultIndex == i) HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs
@@ -144,28 +144,11 @@ keypadEntity.name = btnTop.Name; keypadEntity.keypad = "key_up"; action?.Invoke(keypadEntity); btnTop.IsSelected = false; //弹起来还原背景颜色 SetButtonIsSelected(btnTop); }; btnTop.MouseUpEventHandler += UpClick; btnTopClick.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { //按下去改变背景颜色 btnTop.IsSelected = true; }; btnTop.MouseDownEventHandler += DownClick; btnTopClick.MouseDownEventHandler += DownClick; EventHandler<MouseEventArgs> OutsideClick = (sender, e) => { //弹起来还原背景颜色 btnTop.IsSelected = false; }; btnTop.MouseUpOutsideEventHandler += OutsideClick; btnTopClick.MouseUpOutsideEventHandler += OutsideClick; } /// <summary> @@ -180,31 +163,10 @@ keypadEntity.name = btnBottom.Name; keypadEntity.keypad = "key_down"; action?.Invoke(keypadEntity); btnBottom.IsSelected = false; //弹起来还原背景颜色 SetButtonIsSelected(btnBottom); }; btnBottom.MouseUpEventHandler += UpClick; btnBottomClick.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { btnBottom.IsSelected = true; //按下去改变背景颜色 }; btnBottom.MouseDownEventHandler += DownClick; btnBottomClick.MouseDownEventHandler += DownClick; EventHandler<MouseEventArgs> OutsideClick = (sender, e) => { //弹起来还原背景颜色 btnBottom.IsSelected = false; }; btnBottom.MouseUpOutsideEventHandler += OutsideClick; btnBottomClick.MouseUpOutsideEventHandler += OutsideClick; } /// <summary> @@ -219,28 +181,10 @@ keypadEntity.name = btnLeft.Name; keypadEntity.keypad = "key_left"; action?.Invoke(keypadEntity); btnLeft.IsSelected = false; //弹起来还原背景颜色 SetButtonIsSelected(btnLeft); }; btnLeft.MouseUpEventHandler += UpClick; btnLeftClick.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { btnLeft.IsSelected = true; //按下去改变背景颜色 }; btnLeft.MouseDownEventHandler += DownClick; btnLeftClick.MouseDownEventHandler += DownClick; EventHandler<MouseEventArgs> OutsideClick = (sender, e) => { //弹起来还原背景颜色 btnLeft.IsSelected = false; }; btnLeft.MouseUpOutsideEventHandler += OutsideClick; btnLeftClick.MouseUpOutsideEventHandler += OutsideClick; } /// <summary> @@ -255,32 +199,12 @@ keypadEntity.name = btnRight.Name; keypadEntity.keypad = "key_right"; action?.Invoke(keypadEntity); btnRight.IsSelected = false; //弹起来还原背景颜色 SetButtonIsSelected(btnRight); }; btnRight.MouseUpEventHandler += UpClick; btnRightClick.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { //按下去改变背景颜色 btnRight.IsSelected = true; }; btnRight.MouseDownEventHandler += DownClick; btnRightClick.MouseDownEventHandler += DownClick; EventHandler<MouseEventArgs> OutsideClick = (sender, e) => { //弹起来还原背景颜色 btnRight.IsSelected = false; }; btnRight.MouseUpOutsideEventHandler += OutsideClick; btnRightClick.MouseUpOutsideEventHandler += OutsideClick; } /// <summary> /// ok @@ -294,25 +218,10 @@ keypadEntity.name = btnOk.Name; keypadEntity.keypad = "key_ok"; action?.Invoke(keypadEntity); btnOk.IsSelected = false; //弹起来还原背景颜色 SetButtonIsSelected(btnOk); }; btnOk.MouseUpEventHandler += UpClick; EventHandler<MouseEventArgs> DownClick = (sender, e) => { btnOk.IsSelected = true; //按下去改变背景颜色 }; btnOk.MouseDownEventHandler += DownClick; EventHandler<MouseEventArgs> OutsideClick = (sender, e) => { //弹起来还原背景颜色 btnOk.IsSelected = false; }; btnOk.MouseUpOutsideEventHandler += OutsideClick; } } HDL_ON/UI/UI2/FuntionControlView/Aks/SendMethod.cs
@@ -135,10 +135,10 @@ public bool KeypadExecute(string deviceId, string rcId, string keypad, string keyName, bool isSupport, TipType tipType = TipType.flicker) { if (!isSupport) { CommonMethod.Current.ShowTip("按键不支持.", 3); return false; } //if (!isSupport) { // CommonMethod.Current.ShowTip("按键不支持.", 3); // return false; //} Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("deviceId", deviceId);//设备id HDL_ON/UI/UI2/FuntionControlView/Aks/YkqPage.cs
@@ -308,7 +308,7 @@ //返回 fanhuiFL.SetClickListener(() => { KeyControl("return", "返回"); KeyControl("cancel", "返回"); }); //上一部