| | |
| | | /// <summary> |
| | | /// 楼层按钮修改名称点击事件 |
| | | /// </summary> |
| | | void LoadEvent_FloorNamgeChange(Button btn) |
| | | void LoadEvent_FloorNamgeChange(Button btn,Button btnDel,RowLayout row) |
| | | { |
| | | btn.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | DB_ResidenceData.residenceData.floors[DB_ResidenceData.residenceData.floors.IndexOf(btn.Text)] = newName; |
| | | //DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | btn.Text = newName; |
| | | btnDel.Tag = newName; |
| | | row.Tag = newName; |
| | | } |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.EditFloorName, btn.Text, editCallBack); |
| | |
| | | { |
| | | Action action = () => |
| | | { |
| | | string delFloor = DB_ResidenceData.residenceData.floors[(int)(sender as Button).Tag]; |
| | | refreshFloorList("del", delFloor); |
| | | //string delFloor = DB_ResidenceData.residenceData.floors[(int)(sender as Button).Tag]; |
| | | refreshFloorList("del", btn.Tag.ToString()); |
| | | }; |
| | | new PublicAssmebly().TipMsg(StringId.Tip, StringId.DelFloorTip, action); |
| | | }; |
| | |
| | | { |
| | | btnConfrim.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (lastButton != null) |
| | | if (lastButton == null) |
| | | { |
| | | room.floorIndex = DB_ResidenceData.residenceData.floors.IndexOf(lastButton.Text.Trim()); |
| | | return; |
| | | } |
| | | room.floorIndex = DB_ResidenceData.residenceData.floors.IndexOf(lastButton.Text.Trim()); |
| | | room.floorIndex = DB_ResidenceData.residenceData.floors.IndexOf(lastButton.Text.Trim()); |
| | | backAction?.Invoke(); |
| | | bodyView.RemoveFromParent(); |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |