| | |
| | | view.toptitleNameBtn.TextID = MyInternationalizationString.openmode; |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true;
|
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | //把静态变量的这个东西置空 |
| | | soneLogicList = null; |
| | | this.RemoveFromParent(); |
| | |
| | | try |
| | | { |
| | | //进来更新一次值 |
| | | logicId = logic.LogicId;
|
| | | logicId = logic.LogicId; |
| | | timeValue = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]) / 3600; |
| | | timeLong = int.Parse(logic.Conditions[0]["TriggerTime"]); |
| | | } |
| | |
| | | actionsInfo.Add("LinkType", 8); |
| | | actionsInfo.Add("DeviceAddr", Send.CurrentDoorLock.DeviceAddr); |
| | | actionsInfo.Add("Epoint", "200"); |
| | | actionsInfo.Add("PassData", "055704010113");//默认门锁常关
|
| | | Dictionary<string, string> accounts = new Dictionary<string, string>();
|
| | | actionsInfo.Add("PassData", "055704010113");//默认门锁常关 |
| | | Dictionary<string, string> accounts = new Dictionary<string, string>(); |
| | | accounts.Add("Type", "8"); |
| | | accounts.Add("Option4", Send.CurrentDoorLock.DeviceAddr.ToString());//用于判断识别是哪个门锁;
|
| | | accounts.Add("Option4", Send.CurrentDoorLock.DeviceAddr.ToString());//用于判断识别是哪个门锁; |
| | | accounts.Add("Option2", Send.CurrentDoorLock.DeviceEpoint.ToString()); |
| | | //new一个新逻辑对象; |
| | | //新增门锁常开模式自动化入口; |
| | |
| | | Common.Logic.CurrentLogic.LogicType = 2;//标记逻辑类型 |
| | | Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.openmode); |
| | | Common.Logic.CurrentLogic.Conditions.Add(timeConditionsInfo);//添加条件 |
| | | Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//添加目标
|
| | | Common.Logic.CurrentLogic.Actions.Add(actionsInfo);//添加目标 |
| | | Common.Logic.CurrentLogic.Accounts.Add(accounts); |
| | | var oneLogic = new OneLogic(); |
| | | UserView.HomePage.Instance.AddChidren(oneLogic); |
| | |
| | | var datetime = GetLocalTime(timeLong); |
| | | ///有时效性常开才显示时间条件文本 |
| | | year = datetime.Year.ToString();//那一年 |
| | | month = datetime.Month.ToString();//那一月
|
| | | days = int.Parse(datetime.ToString("dd"));//那一天
|
| | | month = datetime.Month.ToString();//那一月 |
| | | days = int.Parse(datetime.ToString("dd"));//那一天 |
| | | hour = int.Parse(datetime.ToString("HH"));//小时 |
| | | minute = datetime.Minute;//分钟 |
| | | timeLong = 0; |
| | |
| | | logicId = addResult; |
| | | timeValue = int.Parse(str); |
| | | Send.CurrentDoorLock.IsDoorLockNormallyMode = true; |
| | | ModeView();
|
| | | ///添加APP开启常开模式的历史记录
|
| | | UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty); |
| | | ModeView(); |
| | | ///添加APP开启常开模式的历史记录 |
| | | HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty); |
| | | } |
| | | |
| | | |
| | |
| | | if (logic.LogicType != 2) |
| | | { |
| | | continue; |
| | | }
|
| | | if (SkipView.ExistLogic(logic, Send.CurrentDoorLock))
|
| | | {
|
| | | Common.Logic.SoneLogicList.Add(logic);
|
| | | } |
| | | if (SkipView.ExistLogic(logic, Send.CurrentDoorLock)) |
| | | { |
| | | Common.Logic.SoneLogicList.Add(logic); |
| | | } |
| | | } |
| | | } |
| | |
| | | selectedRow = logicRow; |
| | | }; |
| | | a++; |
| | | ///显示逻辑名称的控件
|
| | | ///显示逻辑名称的控件 |
| | | var nameBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(58), |
| | |
| | | ///删除点击事件 |
| | | del.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm, |
| | | var alert = new ShowMsgControl(ShowMsgType.Confirm, |
| | | Language.StringByID(MyInternationalizationString.doyouwanttodelete), |
| | | Language.StringByID(MyInternationalizationString.confrim));
|
| | | alert.Show();
|
| | | alert.ConfirmClickEvent += () =>
|
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | Common.Logic.SoneLogicList.Remove(logic); |
| | | //logicRow.Parent.RemoveFromParent(); |
| | | fLayoutLogic.RemoveFromParent(); |
| | | Send.DelLogic(logic.LogicId);
|
| | | Send.DelLogic(logic.LogicId); |
| | | }; |
| | | |
| | | };
|
| | | }; |
| | | } |
| | | } |
| | | /// <summary> |