From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs | 63 ++++++++++++++++++++++--------- 1 files changed, 45 insertions(+), 18 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs index 2bc736f..665f4c4 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Curtain/AutoOpenDirectionAndLimitSettionForm.cs @@ -102,7 +102,7 @@ //瀵艰建闀垮害涓�0鏃� if (curtainData.CurtainLength <= 0) { - //鐢垫満鏁版嵁寮傚父,璇烽噸缃數鏈� + //鐢垫満鏁版嵁寮傚父,纭宸茬粡瀹夎瀵艰建鍚�,璇烽噸缃數鏈� this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain)); try { @@ -132,9 +132,9 @@ catch (Exception ex) { //Log鍑哄姏 - string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + UserCenterResourse.NowActionFormID + "]"; + string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + HdlFormLogic.Current.NowActionFormID + "]"; HdlLogLogic.Current.WriteLog(ex, msg); - //鐢垫満鏁版嵁寮傚父,璇烽噸缃數鏈� + //鐢垫満鏁版嵁寮傚父,纭宸茬粡瀹夎瀵艰建鍚�,璇烽噸缃數鏈� this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uCurtainDataIsErrorPleaseResetCurtain)); try { @@ -176,7 +176,7 @@ listText.Add(Language.StringByID(R.MyInternationalizationString.uReverseDirection));//鍙嶅悜 var form = new BottomItemSelectForm(); - form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, nowSelectNo); + form.AddForm(Language.StringByID(R.MyInternationalizationString.uDirectionSelect), listText, null, nowSelectNo); form.FinishSelectEvent += (index) => { //鍙樻洿鏂瑰悜 @@ -190,6 +190,11 @@ curtainData.Direction = index == 0 ? false : true; }; }; + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + rowDirection.CanClick = false; + } } #endregion @@ -244,7 +249,7 @@ { //寮�闄愪綅 var btnProgressView = new NormalViewControl(200, 50, true); - btnProgressView.X = ControlCommonResourse.XXLeft; + btnProgressView.X = HdlControlResourse.XXLeft; btnProgressView.Y = Application.GetRealHeight(78); btnProgressView.TextSize = 12; btnProgressView.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -269,7 +274,7 @@ frameBack.AddChidren(openSeekBar); var btnTemp1 = new NormalViewControl(200, 50, true); - btnTemp1.X = ControlCommonResourse.XXLeft; + btnTemp1.X = HdlControlResourse.XXLeft; btnTemp1.Y = btnProgressView.Bottom + Application.GetRealHeight(115); btnTemp1.TextSize = 12; btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -284,8 +289,8 @@ btnTemp2.Text = "100%"; frameBack.AddChidren(btnTemp2); //绾� - var btnLine = new NormalViewControl(frameBack.Width - ControlCommonResourse.XXLeft * 2, ControlCommonResourse.BottomLineHeight, false); - btnLine.X = ControlCommonResourse.XXLeft; + var btnLine = new NormalViewControl(frameBack.Width - HdlControlResourse.XXLeft * 2, HdlControlResourse.BottomLineHeight, false); + btnLine.X = HdlControlResourse.XXLeft; btnLine.Y = btnTemp2.Bottom + Application.GetRealHeight(156); btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; frameBack.AddChidren(btnLine); @@ -357,6 +362,15 @@ //鏁版嵁鍙樻洿,鐧惧垎姣� curtainData.OpenLimitPersent = value; }; + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + openSeekBar.Enable = false; + btnMinus.CanClick = false; + btnPlus.CanClick = false; + btnSave.CanClick = false; + } + //铏氭嫙浣忓畢涓嶉渶瑕佺洃鍚� if (Common.Config.Instance.Home.IsVirtually == true) { @@ -417,7 +431,7 @@ { //鍚堥檺浣� var btnProgressView = new NormalViewControl(200, 50, true); - btnProgressView.X = ControlCommonResourse.XXLeft; + btnProgressView.X = HdlControlResourse.XXLeft; btnProgressView.Y = Application.GetRealHeight(536); btnProgressView.TextSize = 12; btnProgressView.TextColor = UserCenterColor.Current.TextGrayColor1; @@ -442,7 +456,7 @@ frameBack.AddChidren(closeSeekBar); var btnTemp1 = new NormalViewControl(200, 50, true); - btnTemp1.X = ControlCommonResourse.XXLeft; + btnTemp1.X = HdlControlResourse.XXLeft; btnTemp1.Y = btnProgressView.Bottom + Application.GetRealHeight(115); btnTemp1.TextSize = 12; btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; @@ -457,8 +471,8 @@ btnTemp2.Text = "100%"; frameBack.AddChidren(btnTemp2); //绾� - var btnLine = new NormalViewControl(frameBack.Width - ControlCommonResourse.XXLeft * 2, ControlCommonResourse.BottomLineHeight, false); - btnLine.X = ControlCommonResourse.XXLeft; + var btnLine = new NormalViewControl(frameBack.Width - HdlControlResourse.XXLeft * 2, HdlControlResourse.BottomLineHeight, false); + btnLine.X = HdlControlResourse.XXLeft; btnLine.Y = btnTemp2.Bottom + Application.GetRealHeight(156); btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; frameBack.AddChidren(btnLine); @@ -530,6 +544,14 @@ //鏁版嵁鍙樻洿,鐧惧垎姣� curtainData.CloseLimitPersent = value; }; + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欎笉鑳界紪杈� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + closeSeekBar.Enable = false; + btnMinus.CanClick = false; + btnPlus.CanClick = false; + btnSave.CanClick = false; + } //铏氭嫙浣忓畢涓嶉渶瑕佺洃鍚� if (Common.Config.Instance.Home.IsVirtually == true) { @@ -666,7 +688,7 @@ //濡傛灉褰撳墠鏄櫄鎷熶綇瀹� if (Common.Config.Instance.Home.IsVirtually == true) { - var data = ModelData.DeviceModelDataLogic.Current.GetCurtainLimitPoint(curtainDevice); + var data = HdlTemplateDeviceDataLogic.Current.GetCurtainLimitPoint(curtainDevice); curtainData.Direction = data.Direction; curtainData.CurtainLength = data.curtainLength; curtainData.OpenLimitValue = data.upLimit; @@ -678,10 +700,10 @@ this.ShowProgressBar(); int receiptDataCount = 0; - string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice); + string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(curtainDevice); HdlGatewayReceiveLogic.Current.AddAttributeEvent("CurtainDeviceAttribute", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (device) => { - string checkKey = LocalDevice.Current.GetDeviceMainKeys(device); + string checkKey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device); if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258) { return; @@ -740,7 +762,7 @@ //鑾峰彇绐楀笜鏂瑰悜涓庨檺浣嶈缃け璐� string msg = Language.StringByID(R.MyInternationalizationString.uGetCurtainDirectionAndLimitSettionFail); //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg - msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂"); + msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, null, "鍥炲瓒呮椂"); this.ShowMassage(ShowMsgType.Tip, msg); return false; } @@ -759,14 +781,19 @@ /// </summary> private void ReceiveLimitData() { + //濡傛灉褰撳墠鏄睍绀烘ā鏉�,鍒欓渶瑕佸鐞� + if (Common.Config.Instance.Home.IsShowTemplate == true) + { + return; + } if (HdlGatewayReceiveLogic.Current.IsEsixt("ReceiveLimitData") == true) { HdlGatewayReceiveLogic.Current.RemoveEvent("ReceiveLimitData"); } - string mainkeys = LocalDevice.Current.GetDeviceMainKeys(curtainDevice); + string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(curtainDevice); HdlGatewayReceiveLogic.Current.AddAttributeEvent("ReceiveLimitData", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (device) => { - string checkKey = LocalDevice.Current.GetDeviceMainKeys(device); + string checkKey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device); if (mainkeys != checkKey || device.DeviceStatusReport.CluterID != 258) { return; -- Gitblit v1.8.0