File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs |
| | |
| | | using Shared.Common; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// App体验账号的逻辑 |
| | |
| | | /// 用来递增生成Mac用的 |
| | | /// </summary> |
| | | private int DeviceNumber = 0; |
| | | /// <summary> |
| | | /// 是否是游客体验 |
| | | /// </summary> |
| | | public bool IsExperience |
| | | { |
| | | get { return Config.Instance.Guid == "chushiGuid"; } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// </summary> |
| | | private void InitUserInfoData() |
| | | { |
| | | UserCenterResourse.UserInfo = new UserInformation(); |
| | | UserCenterResourse.UserInfo.AuthorityNo = 1;//给他管理员称号 |
| | | UserCenterResourse.UserInfo.AuthorityText = Language.StringByID(R.MyInternationalizationString.Administrator); |
| | | HdlUserCenterResourse.UserInfo = new UserInformation(); |
| | | HdlUserCenterResourse.ResidenceOption.AuthorityNo = 1;//给他管理员称号 |
| | | HdlUserCenterResourse.ResidenceOption.AuthorityText = Language.StringByID(R.MyInternationalizationString.Administrator); |
| | | //虚拟账号 |
| | | UserCenterResourse.UserInfo.UserName = Language.StringByID(R.MyInternationalizationString.uVirtualAccount); |
| | | HdlUserCenterResourse.UserInfo.NickName = Language.StringByID(R.MyInternationalizationString.uVirtualAccount); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | private void InitDeviceData() |
| | | { |
| | | //先刷新容器 |
| | | LocalDevice.Current.ReFreshByLocal(); |
| | | HdlDeviceCommonLogic.Current.ReFreshByLocal(); |
| | | //顺便也整一下网关(有可能它是从实体账号转为虚拟时,没有清空) |
| | | HdlGatewayLogic.Current.ReFreshByLocal(); |
| | | HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId(); |
| | |
| | | var listBind = new List<Scene.DeviceListData>(); |
| | | foreach (var mainKey in i_room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(mainKey); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(mainKey); |
| | | if (device == null) { continue; } |
| | | //只要继电器和灯 |
| | | if (device.Type == DeviceType.OnOffOutput |
| | |
| | | device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 258 }); |
| | | } |
| | | //添加虚拟设备 |
| | | LocalDevice.Current.AddVirtualDeviceToMemory(device); |
| | | HdlDeviceCommonLogic.Current.AddVirtualDeviceToMemory(device); |
| | | |
| | | var room = HdlRoomLogic.Current.GetRoomById(roomId); |
| | | if (room != null) |