| | |
| | | }; |
| | | //下拉刷新自动化列表的事件 |
| | | logicScrolView.BeginHeaderRefreshingAction += () => |
| | | {
|
| | | { |
| | | if (!Config.Instance.Home.IsVirtually) |
| | | {//虚拟的不获取网关逻辑列表 |
| | | //重新刷新logic列表 |
| | |
| | | { |
| | | if (!Config.Instance.Home.IsVirtually)//虚拟的不获取网关逻辑列表 |
| | | { |
| | | if (If_once)
|
| | | {
|
| | | if (Common.Logic.LogicList.Count == 0)
|
| | | {
|
| | | 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);
|
| | | }
|
| | | }
|
| | | 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); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | timeConditionsInfo.Add("EnDelay", "0"); |
| | | timeConditionsInfo.Add("DelayTime", "0"); |
| | | timeConditionsInfo.Add("StartHour", h); |
| | | timeConditionsInfo.Add("StartMin", m);
|
| | | if (UserCenter.UserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode == 1)
|
| | | {
|
| | | //强制变更时间模式为分钟
|
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 60).ToString());
|
| | | timeConditionsInfo.Add("StartMin", m); |
| | | if (UserCenter.UserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode == 1) |
| | | { |
| | | //强制变更时间模式为分钟 |
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 60).ToString()); |
| | | } |
| | | else
|
| | | {
|
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 3600).ToString());
|
| | | else |
| | | { |
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 3600).ToString()); |
| | | } |
| | | Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); |
| | | actionsInfo.Add("LinkType", 8); |