| | |
| | | //没有设置过模式
|
| | | 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", () =>
|
| | | {
|
| | |
| | | listDeleteFile.Add(Common.Room.Lists[i].FileName);
|
| | | }
|
| | | }
|
| | | //删除房间
|
| | | foreach (string fileName in listDeleteFile)
|
| | | {
|
| | | Common.Room.CurrentRoom.Remove(fileName);
|
| | | }
|
| | | //如果当前选择的房间是删除对象的话
|
| | | if (Common.Room.CurrentRoom.FloorId == keys)
|
| | | {
|
| | | Common.Room.CurrentRoom = Common.Room.Lists[0];
|
| | | }
|
| | | //删除房间
|
| | | foreach (string fileName in listDeleteFile)
|
| | | {
|
| | | Common.Room.CurrentRoom.Remove(fileName);
|
| | | }
|
| | | Common.Config.Instance.Home.Save();
|
| | | //保存顺序
|
| | |
| | | }
|
| | | //请输入楼层名称
|
| | | dialogForm.SetTipText(Language.StringByID(R.MyInternationalizationString.uPleaseInputFloorName));
|
| | | if (Common.Config.Instance.Home.FloorDics.ContainsKey(keys) == true)
|
| | | {
|
| | | dialogForm.Text = Common.Config.Instance.Home.FloorDics[keys];
|
| | | floorName = Common.Config.Instance.Home.FloorDics[keys];
|
| | | }
|
| | | else
|
| | | {
|
| | | dialogForm.Text = floorName;
|
| | |
|
| | | }
|
| | | //按下确认按钮
|
| | | dialogForm.ComfirmClickEvent += ((textValue) =>
|
| | | {
|
| | |
| | | Pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
|
| | |
|
| | | bool result = await UserCenterLogic.GetResultStatuByRequestHttps("App/DelHome", true, Pra);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | Common.Config.Instance.HomeId = myHouse.Id;
|
| | | Common.Global.CreateHomeDirectory(myHouse.Id);
|
| | | Common.Config.Instance.Save();
|
| | |
|
| | | //刷新个人中心的内存及线程
|
| | | await UserCenterLogic.InitUserCenterMenmoryAndThread();
|
| | | await UserCenterLogic.InitUserCenterMenmoryAndThread(false);
|
| | | Common.Room.InitAllRoom();
|
| | |
|
| | | //删除住宅
|
| | |
| | | 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)
|
| | | {
|