wxr
2022-09-27 0ee75b88cfe03e46289de0de96e8ed4580c797d3
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -9,7 +9,6 @@
        {
            Tag = "Logic";
        }
        public void Show()
        {
            LogicView.TopView topView = new LogicView.TopView();
@@ -62,28 +61,30 @@
            likiadaodaView.frameLayout.Y = shiwaiView.frameLayout.Bottom;
            likiadaodaView.btnText.TextID = StringId.likiadaoda;
            likiadaodaView.btnIcon.UnSelectedImagePath = "LogicIcon/location.png";
            int count = 0;//输入类型个数
            if (MainView.IsGatewayType)
            {
                count = 4;
                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, count);
            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) =>
@@ -116,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++)
            {
@@ -124,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();
@@ -155,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)
            {
@@ -256,15 +257,15 @@
            {
                //高德坐标转WGS84坐标(高德地图设置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();
@@ -273,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();