From ccd5b1c8dc2d0399745779fb4f9a261d24d75a6d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 23 十一月 2021 14:43:13 +0800 Subject: [PATCH] 备份 --- HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs | 46 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 11 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs index 047b701..2181e67 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs @@ -49,6 +49,17 @@ timeHorizonView.btnText.TextID = StringId.timeHorizon; viewLayout.AddChidren(timeHorizonView.FLayoutView()); + + //鏃ュ嚭/鏃ヨ惤/姝e崍 + LogicView.SelectTypeView timeSpecialView = new LogicView.SelectTypeView(); + timeSpecialView.frameLayout.Y = timeHorizonView.frameLayout.Bottom; + timeSpecialView.btnIcon.Visible = false; + timeSpecialView.btnText.X = Application.GetRealWidth(16); + timeSpecialView.btnLine.X = Application.GetRealWidth(16); + timeSpecialView.btnLine.Width = Application.GetRealWidth(375 - 16 - 16); + timeSpecialView.btnText.TextID = StringId.timespecia; + viewLayout.AddChidren(timeSpecialView.FLayoutView()); + #endregion #region 鏃堕棿鐐� 鏃堕棿鑼冨洿鐐瑰嚮浜嬩欢 @@ -78,7 +89,20 @@ TimeHorizon(fLayout, false, 0); }; + //鏃ュ嚭/鏃ヨ惤/姝e崍鐐瑰嚮浜嬩欢 + timeSpecialView.btnClick.MouseUpEventHandler += (sen, e) => + { + if (string.IsNullOrEmpty( Entity.DB_ResidenceData.Instance.CurrentRegion.homeAddress))//.longitude == 0 && Entity.DB_ResidenceData.Instance.CurrentRegion.latitude == 0) + { + new PublicAssmebly().TipMsg(StringId.tip, StringId.GatewayLocationInformationIsNotConfigured); + return; + } + SpeciaTime speciaTime = new SpeciaTime(); + MainPage.BasePageView.AddChidren(speciaTime); + speciaTime.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; #endregion } @@ -110,13 +134,13 @@ timePointView.FLayoutView(fLayout); timePointView.TimePoint(fLayout, editTime, (timeValue)=>{ Input inputTime = new Input(); - inputTime.sid = LogicMethod.NewSid(); + inputTime.sid = LogicMethod.CurrLogicMethod.NewSid(); inputTime.condition_type = "1"; Dictionary<string, string> dic = new Dictionary<string, string>(); - LogicMethod.dictionary(dic, "key", "timepoint"); - LogicMethod.dictionary(dic, "comparator", "="); - LogicMethod.dictionary(dic, "data_type", "string"); - LogicMethod.dictionary(dic, "value", timeValue); + LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timepoint"); + LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "="); + LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string"); + LogicMethod.CurrLogicMethod.dictionary(dic, "value", timeValue); inputTime.condition.Add(dic); AddCondition(inputTime, edit, index); }); @@ -233,13 +257,13 @@ } Input inputTime = new Input(); - inputTime.sid = LogicMethod.NewSid(); + inputTime.sid = LogicMethod.CurrLogicMethod.NewSid(); inputTime.condition_type = "2"; Dictionary<string, string> dic = new Dictionary<string, string>(); - LogicMethod.dictionary(dic, "key", "timesection"); - LogicMethod.dictionary(dic, "comparator", "="); - LogicMethod.dictionary(dic, "data_type", "string"); - LogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text); + LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timesection"); + LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "="); + LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string"); + LogicMethod.CurrLogicMethod.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text); inputTime.condition.Add(dic); AddCondition(inputTime, edit, index); @@ -330,7 +354,7 @@ //娣诲姞涓�涓柊鐨勬椂闂存潯浠� Logic.currlogic.input.Add(input); } - LogicMethod.RemoveAllView(); + LogicMethod.CurrLogicMethod.RemoveAllView(); AddLogic addLogic = new AddLogic(); MainPage.BasePageView.AddChidren(addLogic); addLogic.Show(); -- Gitblit v1.8.0