| | |
| | | |
| | | FrameLayout viewLayout = new FrameLayout |
| | | { |
| | | Y = Application.GetRealHeight(74), |
| | | Y = Application.GetRealHeight(64), |
| | | Width = Application.GetRealWidth(LogicView.TextSize.view375), |
| | | Height = Application.GetRealHeight(LogicView.TextSize.view667 - 64), |
| | | BackgroundColor = CSS.CSS_Color.viewMiddle, |
| | |
| | | sceneView.btnIcon.UnSelectedImagePath = "LogicIcon/scene.png"; |
| | | viewLayout.AddChidren(sceneView.FLayoutView()); |
| | | |
| | | //安防 |
| | | LogicView.SelectTypeView securityView = new LogicView.SelectTypeView(); |
| | | securityView.frameLayout.Y = sceneView.frameLayout.Bottom; |
| | | securityView.btnText.TextID = StringId.anfang; |
| | | securityView.btnIcon.UnSelectedImagePath = "LogicIcon/security.png"; |
| | | viewLayout.AddChidren(securityView.FLayoutView()); |
| | | |
| | | //延时 |
| | | LogicView.SelectTypeView delayView = new LogicView.SelectTypeView(); |
| | | delayView.frameLayout.Y = sceneView.frameLayout.Bottom; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | var colorfulRgbList = FunctionList.List.GetLightList().FindAll((obj) => obj.spk == SPK.LightRGB |
| | | && obj.GetAttributes().Contains(FunctionAttributeKey.Colorful)); |
| | | //var seriesList = FunctionList.List.GetSeries(); |
| | | //if (colorfulRgbList.Count > 0 || FunctionList.List.GetSeries().Count>0) |
| | | //{ |
| | | // LogicView.SelectTypeView seriesView = new LogicView.SelectTypeView(); |
| | | // seriesView.frameLayout.Y = securityView.frameLayout.Bottom; |
| | | // seriesView.btnText.TextID = StringId.HorseRaceLamp; |
| | | // seriesView.btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/HorseRaceLampIcon.png"; |
| | | // viewLayout.AddChidren(seriesView.FLayoutView()); |
| | | // seriesView.btnClick.MouseUpEventHandler = (sender, e) => |
| | | // { |
| | | // var settingPage = new LogicSeriesSettingPage(); |
| | | // MainPage.BasePageView.AddChidren(settingPage); |
| | | // settingPage.LoadPage(colorfulRgbList); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | // }; |
| | | // new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, seriesView.frameLayout.Bottom, 3); |
| | | //} |
| | | //else |
| | | { |
| | | ////功能 |
| | | ///产品经理君焕要求,设备功能移到这里。<2022-3-7> |
| | | new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, sceneView.frameLayout.Bottom, 2); |
| | | new FunTpye(LogicMethod.target_if).FunTypeView(viewLayout, securityView.frameLayout.Bottom, 2); |
| | | } |
| | | #endregion |
| | | |
| | | #region 所有点击事件 |
| | |
| | | sceneView.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | SceneMethod(); |
| | | }; |
| | | //安防点击事件 |
| | | securityView.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | Security security = new Security(); |
| | | MainPage.BasePageView.AddChidren(security); |
| | | security.Show(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | //SecurityMethod(this); |
| | | }; |
| | | //延时点击事件 |
| | | delayView.btnClick.MouseUpEventHandler += (sen, e) => |
| | |
| | | }); |
| | | } |
| | | /// <summary> |
| | | /// 添加安防 |
| | | /// </summary> |
| | | public void SecurityMethod(FrameLayout frameLayout, bool edit=false, int index1=-1) |
| | | { |
| | | //List<string> stateList = new List<string>(); |
| | | //if (edit&& index1 != -1) { |
| | | // Output output = Logic.currlogic.output[index1]; |
| | | // var security = LogicMethod.Current.GetSecurity(output.sid); |
| | | // stateList.Add(security.name); |
| | | //} |
| | | //var securityList = LogicMethod.Current.GetSecurityList(); |
| | | //List<string> nameList = new List<string>(); |
| | | //for (int i = 0; i < securityList.Count; i++) |
| | | //{ |
| | | // var security = securityList[i]; |
| | | // nameList.Add(security.name); |
| | | //} |
| | | //PublicInterface publicInterface = new PublicInterface(); |
| | | //publicInterface.FrameOrVv(frameLayout, nameList, stateList,Language.StringByID(StringId.addSecurityLogic),(index) => |
| | | //{ |
| | | // var securitySelecetd = securityList[index]; |
| | | // Output outputDevice = new Output(); |
| | | // outputDevice.target_type = "3"; |
| | | // outputDevice.sid = securitySelecetd.sid; |
| | | // //没啥作用,为了发送数据格式统一; |
| | | // outputDevice.status = new List<Dictionary<string, string>> { new Dictionary<string, string> { { "key", "security" }, { "value", "0" } } }; |
| | | // AddOutput(outputDevice,true); |
| | | // LogicMethod.Current.RemoveAllView(); |
| | | // AddLogic addLogic = new AddLogic(); |
| | | // MainPage.BasePageView.AddChidren(addLogic); |
| | | // addLogic.Show(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //}); |
| | | } |
| | | /// <summary> |
| | | /// 延时时间方法 |
| | | /// </summary> |
| | | /// <param name="fLayout">在哪个界面显示</param> |