| | |
| | | { |
| | | public class SkipView:FrameLayout |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 其它界面跳进来的入口 |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | #region ◆ 自动化__________________________ |
| | | public static bool If_once = true;//进来只读一次标识; |
| | | /// <summary> |
| | | /// 自动化功能代码入口 |
| | | /// </summary> |
| | |
| | | //functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | | #region ---推荐模板的组件 |
| | | //推荐模板背景控件 |
| | | |
| | | |
| | | var bjFrameLayout1 = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080 - 58), |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | X = Application.GetRealWidth(58), |
| | | //Radius = (uint)Application.GetRealHeight(50), |
| | | Y = Application.GetRealHeight(30), |
| | | |
| | | }; |
| | | functionSceneAutoBodyView.AddChidren(bjFrameLayout1); |
| | | var bjFrameLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080 - 58), |
| | |
| | | X = Application.GetRealWidth(58), |
| | | //Radius = (uint)Application.GetRealHeight(50), |
| | | Y = Application.GetRealHeight(30), |
| | | |
| | | }; |
| | | functionSceneAutoBodyView.AddChidren(bjFrameLayout); |
| | | bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft); |
| | | bjFrameLayout1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft); |
| | | bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft|HDLUtils.RectCornerBottomLeft); |
| | | //图标控件 |
| | | var sigBtn = new Button |
| | | { |
| | |
| | | {
|
| | | if (!Config.Instance.Home.IsVirtually) |
| | | {//虚拟的不获取网关逻辑列表 |
| | | //重新刷新logic列表 |
| | | //重新刷新logic列表 |
| | | If_once = true; |
| | | Common.Logic.LogicList.Clear(); |
| | | Read(logicScrolView, no); |
| | | } |
| | |
| | | { |
| | | if (!Config.Instance.Home.IsVirtually)//虚拟的不获取网关逻辑列表 |
| | | { |
| | | if (Common.Logic.LogicList.Count == 0) |
| | | { |
| | | var Idlist1 = await Send.GetLogicId(0);// |
| | | var Idlist2 = await Send.GetLogicId(2);//门锁常开模式 |
| | | if (Idlist1.Count != 0) |
| | | { |
| | | var listlogic1 = await Send.ReadList(Idlist1.Count, 0); |
| | | for (int j = 0; j < listlogic1.Count; j++) |
| | | { |
| | | var logic = listlogic1[j]; |
| | | if (logic.LogicType != 0) |
| | | { |
| | | continue; |
| | | } |
| | | Common.Logic.LogicList.Add(logic); |
| | | } |
| | | } |
| | | if (Idlist2.Count != 0) |
| | | { |
| | | var listlogic2 = await Send.ReadList(Idlist2.Count, 2); |
| | | for (int j = 0; j < listlogic2.Count; j++) |
| | | { |
| | | var logic = listlogic2[j]; |
| | | if (logic.LogicType != 2) |
| | | { |
| | | continue; |
| | | } |
| | | Common.Logic.LogicList.Add(logic); |
| | | } |
| | | if (If_once)
|
| | | {
|
| | | if (Common.Logic.LogicList.Count == 0)
|
| | | {
|
| | | If_once = false; |
| | | var Idlist1 = await Send.GetLogicId(0);//
|
| | | var Idlist2 = await Send.GetLogicId(2);//门锁常开模式
|
| | | if (Idlist1.Count != 0)
|
| | | {
|
| | | var listlogic1 = await Send.ReadList(Idlist1.Count, 0);
|
| | | for (int j = 0; j < listlogic1.Count; j++)
|
| | | {
|
| | | var logic = listlogic1[j];
|
| | | if (logic.LogicType != 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | Common.Logic.LogicList.Add(logic);
|
| | | }
|
| | | }
|
| | | if (Idlist2.Count != 0)
|
| | | {
|
| | | var listlogic2 = await Send.ReadList(Idlist2.Count, 2);
|
| | | for (int j = 0; j < listlogic2.Count; j++)
|
| | | {
|
| | | var logic = listlogic2[j];
|
| | | if (logic.LogicType != 2)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | Common.Logic.LogicList.Add(logic);
|
| | | }
|
| | | }
|
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | static RowLayout selectedRow = new RowLayout() { Tag = "0" };//记录左滑状态 |
| | | |
| | | /// <summary> |
| | | /// 加载自动化列表界面 |
| | | /// </summary> |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |