| | |
| | | //没有设置过模式
|
| | | if (AppResidenceMode == 0)
|
| | | {
|
| | | var frame = new TopRightMenuControl(2);
|
| | | var frame = new TopRightMenuControl(2, 2);
|
| | | //创建楼层
|
| | | frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uCreatFloor), "Item/CreatFloor.png", "Item/CreatFloorSelected.png", () =>
|
| | | {
|
| | |
| | | {
|
| | | //移除楼层
|
| | | Common.Config.Instance.Home.FloorDics.Remove(keys);
|
| | | if (Common.Config.Instance.Home.CurrentFloorId == keys)
|
| | | {
|
| | | //如果删除的是当前楼层的话
|
| | | Common.Config.Instance.Home.CurrentFloorId = string.Empty;
|
| | | foreach (string floorId in Common.Config.Instance.Home.FloorDics.Keys)
|
| | | {
|
| | | //把第一个楼层ID给它
|
| | | Common.Config.Instance.Home.CurrentFloorId = floorId;
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | if (Common.Room.CurrentRoom == null)
|
| | | {
|
| | | Common.Room.CurrentRoom = Common.Room.Lists[0];
|
| | |
| | | var listGateway = HdlGatewayLogic.Current.GetAllLocalGateway();
|
| | | foreach (var gateway in listGateway)
|
| | | {
|
| | | ZigBee.Device.ZbGateway realWay = null;
|
| | | if (HdlGatewayLogic.Current.GetRealGateway(ref realWay, gateway) == false)
|
| | | {
|
| | | //错误:网关对象丢失
|
| | | continue;
|
| | | }
|
| | | var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude);
|
| | | if (result == false)
|
| | | {
|