| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //获取成员的共享列表
|
| | | var result = await HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
|
| | | var result = HdlShardLogic.Current.GetMemberShardContentListAndSetToLocation(memberShardInfo);
|
| | | if (result == false)
|
| | | {
|
| | | //显示重新加载的界面
|
| | | this.ShowReLoadView();
|
| | | return;
|
| | | }
|
| | | //从本地获取成员的分享列表
|
| | | HdlShardLogic.Current.GetMemberShardContentListFromLocal(memberShardInfo);
|
| | | //初始化区域列表
|
| | | this.InitAreaListRow();
|
| | |
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | bodyFrameLayout.AddChidren(listView);
|
| | |
|
| | | //排序楼层
|
| | | var dicSort = Common.Room.CurrentRoom.GetFloorSortList();
|
| | | var dicSort = HdlRoomLogic.Current.GetFloorSortList();
|
| | | foreach (var floorId in dicSort.Keys)
|
| | | {
|
| | | if (dicGroup.ContainsKey(floorId) == true)
|
| | |
| | | {
|
| | | this.AddRoomListRow(floorId, dicGroup[floorId]);
|
| | | }
|
| | | //调整桌布高度
|
| | | listView.AdjustTableHeight();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | var frameBack = new FrameListControl(29);
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameBack.Height = 10;
|
| | | this.listView.AddChidrenFrame(frameBack);
|
| | | this.listView.AddChidren(frameBack);
|
| | |
|
| | | //楼层
|
| | | if (string.IsNullOrEmpty(floorId) == false)
|
| | |
| | | }
|
| | | }
|
| | | //房间排序
|
| | | var listSortRoom = Common.Room.CurrentRoom.GetFloorSortRoom(floorId, false);
|
| | | var listSortRoom = HdlRoomLogic.Current.GetFloorSortRoom(floorId, false);
|
| | | var listSort = new HashSet<string>();
|
| | | foreach (var room in listSortRoom)
|
| | | {
|
| | |
| | | }
|
| | | frameRow.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new LookSharedContentForm();
|
| | | form.AddForm(room, memberShardInfo);
|
| | | };
|
| | |
|
| | | //删除
|
| | |
| | | {
|
| | | //获取全部设备
|
| | | var listDevice = new List<CommonDevice>();
|
| | | foreach (var deviceUi in room.DeviceUIList)
|
| | | foreach (var deviceKeys in room.ListDevice)
|
| | | {
|
| | | var device = deviceUi.CommonDevice;
|
| | | if (device == null)
|
| | | string deviceFile = HdlShardLogic.Current.GetShardDeviceFileName(deviceKeys);
|
| | | if (deviceFile == string.Empty)
|
| | | {
|
| | | string deviceFile = deviceUi.FileName;
|
| | | var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
|
| | | if (byteData == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
|
| | | continue;
|
| | | }
|
| | | var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
|
| | | if (byteData == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
|
| | | device.Type = (DeviceType)device.DeviceID;
|
| | | listDevice.Add(device);
|
| | | }
|
| | | //获取全部场景
|
| | | var listScene = new List<Common.SceneUI>();
|
| | | foreach (var sceneUi in room.SceneUIList)
|
| | | foreach (var sceneId in room.ListSceneId)
|
| | | {
|
| | | var byteData = HdlShardLogic.Current.GetShardFileContent($"Scene_{sceneId}.json");
|
| | | if (byteData == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData));
|
| | | listScene.Add(sceneUi);
|
| | | }
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //执行删除
|
| | | var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
|
| | | var result = HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
|
| | | if (result == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|