From 9d65c293924e4edbbc8c6c6091f55d7fc49c23eb Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 06 七月 2021 13:15:46 +0800
Subject: [PATCH] 乐橙子账号token
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs | 78 ++++++++++++++++++++++++++------------
1 files changed, 53 insertions(+), 25 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
index 6675717..42678d6 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPageBLL.cs
@@ -53,24 +53,24 @@
{
functionRow.MouseUpEventHandler = (sender, e) => {
btn.IsSelected = !btn.IsSelected;
- if (btn.IsSelected)
+ if (changeList.Contains(function))
{
- function.roomIdList.Add(room.sid);
- }
- else
+ changeList.Remove(function);
+ }else
{
- function.roomIdList.Remove(room.sid);
+ changeList.Add(function);
}
};
btn.MouseUpEventHandler = (sender, e) => {
btn.IsSelected = !btn.IsSelected;
- if (btn.IsSelected)
+
+ if (changeList.Contains(function))
{
- function.roomIdList.Add(room.sid);
+ changeList.Remove(function);
}
else
{
- function.roomIdList.Remove(room.sid);
+ changeList.Add(function);
}
};
}
@@ -80,6 +80,7 @@
/// </summary>
void LoadEvent_ShowChangeRoomDialog()
{
+
btnChoosedRoom.MouseUpEventHandler = (sender, e) =>
{
LoadPage_LoadChooseRoomDialog();
@@ -95,20 +96,28 @@
/// 鏍规嵁閫変腑鐨勬埧闂存敼鍙樻樉绀虹殑鍔熻兘鍒楄〃
/// </summary>
/// <param name="btn"></param>
- void LoadEvent_ChangeShowedFunctionList(Button btn,Dialog dialog,string chooseRoomName)
- {
- btn.MouseUpEventHandler = (sender, e) => {
- if (lastButton != null)
- {
- lastButton.IsSelected = false;
- }
- btn.IsSelected = true;
- showedFunctionRoomId = btn.Tag.ToString() == "0" ? null : btn.Tag.ToString();
- LoadFunctionListRow(allocatedList.FindAll((obj) => obj.roomIdList.Contains(showedFunctionRoomId)));
- btnChoosedRoom.Text = chooseRoomName;
- dialog.Close();
- };
- }
+ //void LoadEvent_ChangeShowedFunctionList(Button btn,Dialog dialog,string chooseRoomName)
+ //{
+ // btn.MouseUpEventHandler = (sender, e) => {
+ // if (lastButton != null)
+ // {
+ // lastButton.IsSelected = false;
+ // }
+ // btn.IsSelected = true;
+ // //showedFunctionRoomId = btn.Tag.ToString() == "0" ? null : btn.Tag.ToString();
+ // showedFunctionRoomId = btn.Tag.ToString();
+ // if (showedFunctionRoomId == "0")
+ // {
+ // LoadFunctionListRow(allocatedList);
+ // }
+ // else
+ // {
+ // LoadFunctionListRow(allocatedList.FindAll((obj) => obj.roomIds.Contains(showedFunctionRoomId)));
+ // }
+ // btnChoosedRoom.Text = chooseRoomName;
+ // dialog.Close();
+ // };
+ //}
/// <summary>
/// 淇濆瓨鎴块棿淇敼鐨勬暟鎹�
@@ -116,9 +125,28 @@
void LoadEvent_SaveRoomData()
{
btnConfrim.MouseUpEventHandler = (sender, e) => {
- room.SaveRoomData();
- room.GetRoomFunctions(true);
- bodyView.RemoveFromParent();
+ if (string.IsNullOrEmpty(room.roomId))//鏂板鐨勬埧闂达紝浜戠鏈垱寤簉oomid 鏃犳硶淇濆瓨鏁版嵁
+ {
+ newRoomAddFunction(changeList);
+ 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.UpdataRoomIds();
+ }
+ room.GetRoomFunctions(true);
+ bodyView.RemoveFromParent();
+ }
};
}
--
Gitblit v1.8.0