| | |
| | | /// <summary> |
| | | /// 其它界面跳进来的入口 |
| | | /// </summary> |
| | | public async static void SkipAddLogic(int intvalue, DoorLock doorLock = null, MemberInfoRes accountObj = null) |
| | | public async static void SkipAddLogic(int intvalue, DoorLock doorLock = null, UserCenter.MemberInfoRes accountObj = null) |
| | | { |
| | | /// 0.正常自动化;1.门锁自动化;2.Sone门锁; |
| | | switch (intvalue) |
| | |
| | | if (accountObj == null) |
| | | { |
| | | ///防止抛异常 |
| | | Send.UserMemberInfoRes = new MemberInfoRes(); |
| | | Send.UserMemberInfoRes = new UserCenter.MemberInfoRes(); |
| | | } |
| | | if (doorLock == null) |
| | | { |
| | |
| | | Common.Logic.LogicDviceList.Clear(); |
| | | if (Common.Logic.LogicDviceList.Count == 0) |
| | | { |
| | | Common.Logic.LogicDviceList.AddRange(HdlDeviceCommonLogic.Current.listAllDevice.ToArray()); |
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); |
| | | } |
| | | var doorLockLogicList = new DoorLockLogic.LockLogicList(); |
| | | UserView.HomePage.Instance.AddChidren(doorLockLogicList); |
| | |
| | | //图标控件 |
| | | var sigBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | Width = Application.GetRealWidth(84), |
| | | Height = Application.GetRealWidth(84), |
| | | UnSelectedImagePath = "ZigeeLogic/sign.png", |
| | | X = Application.GetRealWidth(58), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | //推荐模板文本控件 |
| | | var recommendtextBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(300), |
| | | Height = Application.GetMinRealAverage(84), |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealHeight(84), |
| | | X = sigBtn.Right + Application.GetRealWidth(35), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //Text = "推荐模板", |
| | |
| | | var recommendswitchBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(104), |
| | | Height = Application.GetRealHeight(63), |
| | | Height = Application.GetRealWidth(63), |
| | | UnSelectedImagePath = "ZigeeLogic/logicclose.png", |
| | | SelectedImagePath = "ZigeeLogic/logicopen.png", |
| | | X = bjFrameLayout.Width - Application.GetRealWidth(104 + 58), |
| | |
| | | |
| | | var frameLayout = new FrameLayout |
| | | { |
| | | Width = Application.GetMinRealAverage(369 + 46), |
| | | Height = Application.GetMinRealAverage(246), |
| | | Width = Application.GetRealWidth(369 + 46), |
| | | Height = Application.GetRealHeight(246), |
| | | }; |
| | | scenehorizontalScrol.AddChidren(frameLayout); |
| | | var logiciocnBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(369), |
| | | Height = Application.GetMinRealAverage(246), |
| | | Width = Application.GetRealWidth(369), |
| | | Height = Application.GetRealWidth(246), |
| | | UnSelectedImagePath = "ZigeeLogic/" + i + ".png", |
| | | Tag = i, |
| | | }; |
| | |
| | | |
| | | var logicnameBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(250), |
| | | Height = Application.GetMinRealAverage(80), |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealHeight(80), |
| | | X = Application.GetRealWidth(23), |
| | | Y = Application.GetRealHeight(246 - 23 - 80), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | var noIconBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(294 - 55), |
| | | Width = Application.GetMinRealAverage(757), |
| | | Height = Application.GetMinRealAverage(435), |
| | | Width = Application.GetRealWidth(757), |
| | | Height = Application.GetRealWidth(435), |
| | | UnSelectedImagePath = "Item/NoFunction.png", |
| | | X = Application.GetRealWidth(104), |
| | | }; |
| | |
| | | |
| | | var logicswitchBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(104), |
| | | Height = Application.GetMinRealAverage(63), |
| | | Width = Application.GetRealWidth(104), |
| | | Height = Application.GetRealWidth(63), |
| | | UnSelectedImagePath = "ZigeeLogic/logicclose.png", |
| | | SelectedImagePath = "ZigeeLogic/logicopen.png", |
| | | X = logicRowlayout.Width - Application.GetRealWidth(104 + 58), |
| | |
| | | logicRowlayout.AddRightView(del); |
| | | del.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var alert = new ShowMsgControl(ShowMsgType.Confirm, |
| | | var alert = new UserCenter.ShowMsgControl(ShowMsgType.Confirm, |
| | | Language.StringByID(MyInternationalizationString.doyouwanttodelete), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | |
| | | |
| | | var typeIconBtn = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(58), |
| | | Height = Application.GetMinRealAverage(58), |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealWidth(58), |
| | | Gravity = Gravity.Center, |
| | | |
| | | }; |
| | |
| | | Y = typebjBtn.Y + Application.GetRealHeight(35), |
| | | X = Application.GetRealWidth(58) + Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i), |
| | | Width = Application.GetRealWidth(48), |
| | | Height = Application.GetRealHeight(15), |
| | | Height = Application.GetRealWidth(15), |
| | | UnSelectedImagePath = "ZigeeLogic/connect.png", |
| | | }; |
| | | logicRowlayout.AddChidren(connectIconBtn); |
| | |
| | | timeConditionsInfo.Add("DelayTime", "0"); |
| | | timeConditionsInfo.Add("StartHour", h); |
| | | timeConditionsInfo.Add("StartMin", m); |
| | | if (HdlUserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode == 1) |
| | | if (UserCenter.UserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode == 1) |
| | | { |
| | | //强制变更时间模式为分钟 |
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 60).ToString()); |
| | |
| | | if (logicIfon != null && logicIfon.LogicId != 0) |
| | | { |
| | | //添加门锁失效时间的历史记录 |
| | | HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog((DoorLock)common, 9003, timeVlaue.ToString()); |
| | | UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog((DoorLock)common, 9003, timeVlaue.ToString()); |
| | | return logicIfon.LogicId;//表示添加成功; |
| | | } |
| | | return 0;//表示添加失败; |