wxr
2020-11-04 e6a26ee148587327478d9a82624a820c907b6e16
HDL_ON/UI/UI0-Public/TopViewDivBLL.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using HDL_ON.Entity;
namespace HDL_ON.UI
@@ -50,16 +51,22 @@
                    {
                        callBack("add", floorName);
                    };
                    string newFloorName = "1 F";
                    string newFloorName = "1F";
                    for (int i = 0; i < DB_ResidenceData.residenceData.floors.Count + 1; )
                    {
                        newFloorName = ++i + " F";
                        if (!DB_ResidenceData.residenceData.floors.Contains(newFloorName))
                        newFloorName = ++i + "F";
                        if (null == DB_ResidenceData.residenceData.floors.Find((obj)=>obj.name ==  newFloorName))
                        {
                            break;
                        }
                    }
                    new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors,newFloorName , callBackAction,StringId.FloorNameCannotBeEmpty,StringId.AddFloorFailed_FloorAlreadyExist,DB_ResidenceData.residenceData.floors);
                    var fs = new List<string>();
                    foreach(var f in DB_ResidenceData.residenceData.floors)
                    {
                        fs.Add(f.name);
                    }
                    new PublicAssmebly().LoadDialog_EditParater(StringId.AddFloors,newFloorName , callBackAction,StringId.FloorNameCannotBeEmpty,
                        StringId.AddFloorFailed_FloorAlreadyExist,fs);
                    break;
                case "rooms":
                    callBack("", "");