WJC
2020-03-23 bba578c2f0acf2eca747edcb69426771e0cadd32
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -194,7 +194,7 @@
                    frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uCreatFloor), "Item/CreatFloor.png", "Item/CreatFloorSelected.png", () =>
                    {
                        //创建楼层
                        this.CreatOrEditorFloor(null, string.Empty, string.Empty);
                        this.CreatOrEditorFloor(null, null, string.Empty, string.Empty);
                    });
                    //创建房间
                    frame.AddRowMenu(Language.StringByID(R.MyInternationalizationString.uCreatRoom), "Item/RoomIcon.png", "Item/RoomIconSelected.png", () =>
@@ -212,7 +212,7 @@
                else if (AppResidenceMode == 1)
                {
                    //创建楼层
                    this.CreatOrEditorFloor(null, string.Empty, string.Empty);
                    this.CreatOrEditorFloor(null, null, string.Empty, string.Empty);
                }
                //无楼层模式
                else if (AppResidenceMode == 2)
@@ -335,7 +335,7 @@
                btnChanged.ButtonClickEvent += (sender, e) =>
                {
                    //创建或者编辑楼层
                    this.CreatOrEditorFloor(btnFloor, keys, floorName);
                    this.CreatOrEditorFloor(frameRow, btnFloor, keys, floorName);
                };
                //删除
@@ -409,7 +409,7 @@
        /// <param name="btnFloor"></param>
        /// <param name="keys"></param>
        /// <param name="floorName"></param>
        private void CreatOrEditorFloor(NormalViewControl btnFloor, string keys, string floorName)
        private void CreatOrEditorFloor(RowLayoutControl frameRow, NormalViewControl btnFloor, string keys, string floorName)
        {
            //生成一个弹窗画面
            var dialogForm = new DialogInputControl();
@@ -441,6 +441,8 @@
                }
                //画面关闭
                dialogForm.CloseDialog();
                //还原左右菜单
                frameRow?.HideMenu();
                if (floorName != textValue)
                {
                    //编辑或者创建楼层名称
@@ -450,6 +452,10 @@
                    }
                    Common.Config.Instance.Home.FloorDics[keys] = textValue;
                    Common.Config.Instance.Home.Save();
                    if (Common.Config.Instance.Home.CurrentFloorId == string.Empty)
                    {
                        Common.Config.Instance.Home.CurrentFloorId = keys;
                    }
                    if (btnFloor != null)
                    {
                        btnFloor.Text = textValue;
@@ -560,6 +566,8 @@
            var btnEditor = frameRow.AddEditorControl();
            btnEditor.ButtonClickEvent += (sender, e) =>
            {
                //关闭左右菜单
                frameRow.HideMenu();
                var form = new EditorRoomInforForm();
                form.AddForm(room);
                form.FinishEditorEvent += (roomName) =>
@@ -707,7 +715,7 @@
                    //错误:网关对象丢失
                    continue;
                }
                var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude);
                var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude, ShowErrorMode.YES);
                if (result == false)
                {
                    //关闭进度条