From 0ee75b88cfe03e46289de0de96e8ed4580c797d3 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 27 九月 2022 14:04:21 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into dev--wxr --- HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 56 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 30 insertions(+), 26 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs index deee2f7..ab6ff1e 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs @@ -9,7 +9,6 @@ { Tag = "Logic"; } - public void Show() { LogicView.TopView topView = new LogicView.TopView(); @@ -42,8 +41,10 @@ sceneView.frameLayout.Y = timeView.frameLayout.Bottom; sceneView.btnText.TextID = StringId.Scenes; sceneView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png"; - viewLayout.AddChidren(sceneView.FLayoutView()); - + if (MainView.IsGatewayType) + { + viewLayout.AddChidren(sceneView.FLayoutView()); + } //瀹ゅ鍙樺寲 LogicView.SelectTypeView shiwaiView = new LogicView.SelectTypeView(); shiwaiView.frameLayout.Y = sceneView.frameLayout.Bottom; @@ -60,27 +61,30 @@ likiadaodaView.frameLayout.Y = shiwaiView.frameLayout.Bottom; likiadaodaView.btnText.TextID = StringId.likiadaoda; likiadaodaView.btnIcon.UnSelectedImagePath = "LogicIcon/location.png"; - - if (MainView.IsGatewayType) - { - viewLayout.AddChidren(likiadaodaView.FLayoutView()); - } + int count = 3;//杈撳叆绫诲瀷涓暟 + //2022骞�05鏈�24鏃�15:08:22 闅愯棌鎺夊湴鐞嗗洿鏍� + //if (MainView.IsGatewayType) + //{ + // count = 4; + // viewLayout.AddChidren(likiadaodaView.FLayoutView()); + //} ////鍔熻兘 ///浜у搧缁忕悊鍚涚剷瑕佹眰锛岃澶囧姛鑳界Щ鍒拌繖閲屻��<2022-3-7> - new FunTpye(LogicMethod.condition_if).FunTypeView(viewLayout, likiadaodaView.frameLayout.Bottom,4); + new FunTpye(LogicMethod.condition_if).FunTypeView(viewLayout, shiwaiView.frameLayout.Bottom, count); #endregion #region 鎵�鏈夌偣鍑讳簨浠� //鏃堕棿 timeView.btnClick.MouseUpEventHandler += (sen, e) => - { + { + TimeTpye timeTpye = new TimeTpye(); MainPage.BasePageView.AddChidren(timeTpye); timeTpye.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; + }; //鍦烘櫙鐐瑰嚮浜嬩欢 sceneView.btnClick.MouseUpEventHandler += (sen, e) => @@ -113,7 +117,7 @@ /// </summary> public void SceneMethod() { - var sceneList = LogicMethod.CurrLogicMethod.GetSceneList(); + var sceneList = LogicMethod.Current.GetSceneList(); List<string> nameList = new List<string>(); for (int i = 0; i < sceneList.Count; i++) { @@ -121,20 +125,20 @@ nameList.Add(scene.name); } PublicInterface publicInterface = new PublicInterface(); - publicInterface.FrameOrVv(this, nameList, new List<string> { }, StringId.addSceneLogic, (index) => + publicInterface.FrameOrVv(this, nameList, new List<string> { }, Language.StringByID(StringId.addSceneLogic), (index) => { var sceneSelecetd = sceneList[index]; Input input = new Input(); input.sid = sceneSelecetd.sid; input.condition_type = "10"; Dictionary<string, string> dic = new Dictionary<string, string>(); - LogicMethod.CurrLogicMethod.dictionary(dic, "key", "scene"); - LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "="); - LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string"); - LogicMethod.CurrLogicMethod.dictionary(dic, "value", "on"); + LogicMethod.Current.dictionary(dic, "key", "scene"); + LogicMethod.Current.dictionary(dic, "comparator", "="); + LogicMethod.Current.dictionary(dic, "data_type", "string"); + LogicMethod.Current.dictionary(dic, "value", "on"); input.condition.Add(dic); AddCondition(input); - LogicMethod.CurrLogicMethod.RemoveAllView(); + LogicMethod.Current.RemoveAllView(); AddLogic addLogic = new AddLogic(); MainPage.BasePageView.AddChidren(addLogic); addLogic.Show(); @@ -152,7 +156,7 @@ ///閫氳繃璋冭瘯瀹濈粰鐨勭粡绾害<鏍囧噯GPS> double latitude = Entity.DB_ResidenceData.Instance.CurrentRegion.latitude;//绾害 double longitude = Entity.DB_ResidenceData.Instance.CurrentRegion.longitude;//缁忓害 - LogicMethod.CurrLogicMethod.WGS84_to_GCJ02(Entity.DB_ResidenceData.Instance.CurrentRegion.longitude, Entity.DB_ResidenceData.Instance.CurrentRegion.latitude, out longitude, out latitude); + LogicMethod.Current.WGS84_to_GCJ02(Entity.DB_ResidenceData.Instance.CurrentRegion.longitude, Entity.DB_ResidenceData.Instance.CurrentRegion.latitude, out longitude, out latitude); int r = 500;//榛樿鍗婂緞 if (edit) { @@ -253,15 +257,15 @@ { //楂樺痉鍧愭爣杞琖GS84鍧愭爣(楂樺痉鍦板浘璁剧疆GPS) double out_lng, out_lat; - LogicMethod.CurrLogicMethod.GCJ02_to_WGS84(mLongitude, mLatitude, out out_lng, out out_lat); + LogicMethod.Current.GCJ02_to_WGS84(mLongitude, mLatitude, out out_lng, out out_lat); Input input = new Input(); - input.sid = LogicMethod.CurrLogicMethod.NewSid(); + input.sid = LogicMethod.Current.NewSid(); input.condition_type = "8"; Dictionary<string, string> dic = new Dictionary<string, string>(); - LogicMethod.CurrLogicMethod.dictionary(dic, "key", "direction"); - LogicMethod.CurrLogicMethod.dictionary(dic, "comparator", "="); - LogicMethod.CurrLogicMethod.dictionary(dic, "data_type", "string"); - LogicMethod.CurrLogicMethod.dictionary(dic, "value", valueStr); + LogicMethod.Current.dictionary(dic, "key", "direction"); + LogicMethod.Current.dictionary(dic, "comparator", "="); + LogicMethod.Current.dictionary(dic, "data_type", "string"); + LogicMethod.Current.dictionary(dic, "value", valueStr); input.condition.Add(dic); //绾害 input.geo_fence.latitude = out_lat.ToString(); @@ -270,7 +274,7 @@ //鍗婂緞<鍗曚綅绫�> input.geo_fence.radius = mRadius.ToString(); AddCondition(input); - LogicMethod.CurrLogicMethod.RemoveAllView(); + LogicMethod.Current.RemoveAllView(); AddLogic addLogic = new AddLogic(); MainPage.BasePageView.AddChidren(addLogic); addLogic.Show(); -- Gitblit v1.8.0