wxr
2024-10-12 50ad482974a7e838d11360a84e9e8ff3f7974ab2
HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs
@@ -92,11 +92,12 @@
            //日出/日落/正午点击事件
            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;
                }
                //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();
@@ -134,13 +135,13 @@
            timePointView.FLayoutView(fLayout);
            timePointView.TimePoint(fLayout, editTime, (timeValue)=>{
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.sid = LogicMethod.Current.NewSid();
                inputTime.condition_type = "1";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                LogicMethod.CurrLogicMethod.dictionary(dic, "key", "timepoint");
                LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "=");
                LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string");
                LogicMethod.CurrLogicMethod.dictionary(dic, "value", timeValue);
                LogicMethod.Current.dictionary(dic, "key", "timepoint");
                LogicMethod.Current.dictionary(dic, "comparator", "=");
                LogicMethod.Current.dictionary(dic, "data_type", "string");
                LogicMethod.Current.dictionary(dic, "value", timeValue);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
            });
@@ -249,21 +250,21 @@
                    new LogicView.TipPopView().TipBox(StringId.tip, StringId.unlikeTime);
                    return;
                }
                if (int.Parse(btnStartTimeText.Tag.ToString()) > int.Parse(btnEndTimeText.Tag.ToString()))
                {
                    //提示:开始时间不能大于结束时间。
                    new LogicView.TipPopView().TipBox(StringId.tip, StringId.startTimeLessThanEndTime);
                    return;
                }
                //if (int.Parse(btnStartTimeText.Tag.ToString()) > int.Parse(btnEndTimeText.Tag.ToString()))
                //{
                //    //提示:开始时间不能大于结束时间。
                //    new LogicView.TipPopView().TipBox(StringId.tip, StringId.startTimeLessThanEndTime);
                //    return;
                //}
                Input inputTime = new Input();
                inputTime.sid = LogicMethod.CurrLogicMethod.NewSid();
                inputTime.sid = LogicMethod.Current.NewSid();
                inputTime.condition_type = "2";
                Dictionary<string, string> dic = new Dictionary<string, string>();
                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);
                LogicMethod.Current.dictionary(dic, "key", "timesection");
                LogicMethod.Current.dictionary(dic, "comparator", "=");
                LogicMethod.Current.dictionary(dic, "data_type", "string");
                LogicMethod.Current.dictionary(dic, "value", btnStartTimeText.Text + "-" + btnEndTimeText.Text);
                inputTime.condition.Add(dic);
                AddCondition(inputTime, edit, index);
@@ -354,7 +355,7 @@
                //添加一个新的时间条件
                Logic.currlogic.input.Add(input);
            }
            LogicMethod.CurrLogicMethod.RemoveAllView();
            LogicMethod.Current.RemoveAllView();
            AddLogic addLogic = new AddLogic();
            MainPage.BasePageView.AddChidren(addLogic);
            addLogic.Show();