| | |
| | | void LoadEvent_BackEvent() |
| | | { |
| | | btnBack.MouseUpEventHandler = (sender, e) => { |
| | | if (backAction != null) |
| | | { |
| | | backAction(); |
| | | } |
| | | backAction?.Invoke(); |
| | | if (baseView != null) |
| | | { |
| | | baseView.RemoveFromParent(); |
| | |
| | | case "floors": |
| | | Action<string> callBackAction = (floorName) => |
| | | { |
| | | if (DB_ResidenceData.residenceData.floors.Contains(floorName)) |
| | | { |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | DB_ResidenceData.residenceData.floors.Add(floorName); |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | callBack("add", floorName); |
| | | } |
| | | callBack("add", floorName); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors, DB_ResidenceData.residenceData.floors.Count + 1 + " F", callBackAction); |
| | | string newFloorName = "1 F"; |
| | | for (int i = 0; i < DB_ResidenceData.residenceData.floors.Count ; i++) |
| | | { |
| | | newFloorName = ++i + " F"; |
| | | if (!DB_ResidenceData.residenceData.floors.Contains(newFloorName)) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors,newFloorName , callBackAction); |
| | | break; |
| | | case "rooms": |
| | | callBack("", ""); |