| | |
| | | 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", () =>
|
| | |
| | | else if (AppResidenceMode == 1)
|
| | | {
|
| | | //创建楼层
|
| | | this.CreatOrEditorFloor(null, string.Empty, string.Empty);
|
| | | this.CreatOrEditorFloor(null, null, string.Empty, string.Empty);
|
| | | }
|
| | | //无楼层模式
|
| | | else if (AppResidenceMode == 2)
|
| | |
| | | btnChanged.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //创建或者编辑楼层
|
| | | this.CreatOrEditorFloor(btnFloor, keys, floorName);
|
| | | this.CreatOrEditorFloor(frameRow, btnFloor, keys, floorName);
|
| | | };
|
| | |
|
| | | //删除
|
| | |
| | | /// <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();
|
| | |
| | | }
|
| | | //画面关闭
|
| | | dialogForm.CloseDialog();
|
| | | //还原左右菜单
|
| | | frameRow?.HideMenu();
|
| | | if (floorName != textValue)
|
| | | {
|
| | | //编辑或者创建楼层名称
|
| | |
| | | }
|
| | | 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;
|
| | |
| | | var btnEditor = frameRow.AddEditorControl();
|
| | | btnEditor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //关闭左右菜单
|
| | | frameRow.HideMenu();
|
| | | var form = new EditorRoomInforForm();
|
| | | form.AddForm(room);
|
| | | form.FinishEditorEvent += (roomName) =>
|
| | |
| | | //错误:网关对象丢失
|
| | | continue;
|
| | | }
|
| | | var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude);
|
| | | var result = HdlGatewayLogic.Current.SetGatewaySite(gateway, longitude, latitude, ShowErrorMode.YES);
|
| | | if (result == false)
|
| | | {
|
| | | //关闭进度条
|