| | |
| | | |
| | | namespace Shared.Phone.Device.Logic |
| | | { |
| | | public class SkipView |
| | | public class SkipView:FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// 其它界面跳进来的入口 |
| | |
| | | { |
| | | case 0:
|
| | | { |
| | | //new一个新逻辑对象; |
| | | //新增正常自动化入口 |
| | | Common.Logic.CurrentLogic = new Common.Logic(); |
| | | Common.Logic.CurrentLogic.IsEnable = 1;//默认为开 |
| | | Common.Logic.CurrentLogic.LogicType = 0;//标记逻辑类型 |
| | | Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); |
| | | var addLogicPage = new AddLogicPage(); |
| | | ///Sone门锁主入口 |
| | | if (doorLock == null) |
| | | { |
| | | ///防止抛异常 |
| | | doorLock = new DoorLock(); |
| | | } |
| | | Send.CurrentDoorLock = doorLock; |
| | | ///进来刷新一次设备列表; |
| | | Common.Logic.LogicDviceList.Clear(); |
| | | if (Common.Logic.LogicDviceList.Count == 0) |
| | | { |
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); |
| | | } |
| | | var addLogicPage = new SoneLogicList(); |
| | | UserView.HomePage.Instance.AddChidren(addLogicPage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | addLogicPage.Show(); |
| | | |
| | | ////new一个新逻辑对象; |
| | | ////新增正常自动化入口 |
| | | //Common.Logic.CurrentLogic = new Common.Logic(); |
| | | //Common.Logic.CurrentLogic.IsEnable = 1;//默认为开 |
| | | //Common.Logic.CurrentLogic.LogicType = 0;//标记逻辑类型 |
| | | //Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1); |
| | | //var addLogicPage = new AddLogicPage(); |
| | | //UserView.HomePage.Instance.AddChidren(addLogicPage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //addLogicPage.Show(); |
| | | |
| | | }
|
| | | break; |
| | |
| | | |
| | | ///<summary>
|
| | | /// s-one门锁是否存在自动化的方法;
|
| | | /// 注意(参数:2-自动化;3-失效时间自动化);
|
| | | /// 注意(参数:2-常开自动化;3-失效时间自动化); |
| | | /// 返回值:0不存在;其它值都存在; |
| | | /// </summary>
|
| | | public static async System.Threading.Tasks.Task<int> Exist(int valueInt=2)
|
| | | public static async System.Threading.Tasks.Task<int> Exist(int valueInt) |
| | | {
|
| | | int exist = 0; |
| | | var Idlist = await Send.GetLogicId(valueInt);
|
| | |
| | | } |
| | | return logic; |
| | | } |
| | | |
| | | ///<summary> |
| | | ///删除所有时效性自动化 |
| | | /// 返回值:true成功;false失败; |
| | | /// </summary> |
| | | public static async System.Threading.Tasks.Task<bool> GetLogicAll() |
| | | { |
| | | bool _if = false; |
| | | var Idlist = await Send.GetLogicId(3); |
| | | if (Idlist.Count != 0) |
| | | { |
| | | _if = true; |
| | | |
| | | for (int i = 0; i < Idlist.Count; i++) |
| | | { |
| | | int id = Idlist[i]; |
| | | //本来只有一条时效性自动化, |
| | | //防止特殊情况,找到就删除掉; |
| | | Send.DelLogic(id); |
| | | } |
| | | } |
| | | return _if; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |