| | |
| | | { |
| | | functionRow.MouseUpEventHandler = (sender, e) => { |
| | | btn.IsSelected = !btn.IsSelected; |
| | | if (btn.IsSelected) |
| | | { |
| | | function.roomIds.Add(room.sid); |
| | | } |
| | | else |
| | | { |
| | | function.roomIds.Remove(room.sid); |
| | | } |
| | | if (changeList.Contains(function)) |
| | | { |
| | | changeList.Remove(function); |
| | |
| | | }; |
| | | btn.MouseUpEventHandler = (sender, e) => { |
| | | btn.IsSelected = !btn.IsSelected; |
| | | if (btn.IsSelected) |
| | | { |
| | | function.roomIds.Add(room.sid); |
| | | } |
| | | else |
| | | { |
| | | function.roomIds.Remove(room.sid); |
| | | } |
| | | |
| | | if (changeList.Contains(function)) |
| | | { |
| | | changeList.Remove(function); |
| | |
| | | void LoadEvent_SaveRoomData() |
| | | { |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => { |
| | | foreach(var f in changeList) |
| | | if (string.IsNullOrEmpty(room.roomId))//新增的房间,云端未创建roomid 无法保存数据 |
| | | { |
| | | f.SaveFunctionData(); |
| | | newRoomAddFunction(changeList); |
| | | } |
| | | room.SaveRoomData(); |
| | | room.GetRoomFunctions(true); |
| | | bodyView.RemoveFromParent(); |
| | | else |
| | | { |
| | | foreach (var f in changeList) |
| | | { |
| | | if(f.roomIds.Contains(room.roomId)) |
| | | { |
| | | f.roomIds.Remove(room.roomId); |
| | | } |
| | | else |
| | | { |
| | | f.roomIds.Add(room.roomId); |
| | | } |
| | | f.SaveFunctionData(true); |
| | | } |
| | | room.GetRoomFunctions(true); |
| | | bodyView.RemoveFromParent(); |
| | | } |
| | | }; |
| | | } |
| | | |