From 4dce704aaf8587cf3f91cf88f2208315a03c4cbb Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 08 四月 2020 13:54:58 +0800 Subject: [PATCH] 先上传一个版本 --- ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 55 +++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 41 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs index c3226dd..305b4fd 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs @@ -111,11 +111,15 @@ btnZhezhao.Gravity = Gravity.CenterHorizontal; btnZhezhao.Radius = btnPic.Radius; bodyFrameLayout.AddChidren(btnZhezhao); - btnZhezhao.MouseUpEventHandler += (sender, e) => + //鍒嗕韩鐨勬埧闂翠笉鑳界紪杈� + if (this.editorRoom.IsSharedRoom == false) { - //鎴块棿鍥剧墖閫夋嫨 - this.RoomPictrueSelect(btnPic); - }; + btnZhezhao.MouseUpEventHandler += (sender, e) => + { + //鎴块棿鍥剧墖閫夋嫨 + this.RoomPictrueSelect(btnPic); + }; + } //鍙樻洿涓�涓嬮偅涓櫧鑹茶儗鏅殑Y杞�,瀹冨埌鍥剧墖鐨勪腑闂翠綅缃� frameBack1.Y = btnPic.Y + btnPic.Height / 2; @@ -134,27 +138,41 @@ private void AddAllMenuRow(InformationEditorControl tableContr, ImageView btnPic) { //銆愭埧闂村悕绉般�� - var txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), this.cloneRoom.Name, this.listview.rowSpace / 2); - txtRoomName.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName); - listview.AddChidren(txtRoomName); - txtRoomName.InitControl(); - //搴曠嚎 - txtRoomName.AddBottomLine(); + FrameCaptionInputControl txtRoomName = null; + if (this.editorRoom.IsLove == false) + { + txtRoomName = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uRoomName), this.cloneRoom.Name, this.listview.rowSpace / 2); + txtRoomName.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName); + listview.AddChidren(txtRoomName); + txtRoomName.InitControl(); + //搴曠嚎 + txtRoomName.AddBottomLine(); + } + else + { + //鎴戠殑鍠滅埍涓嶈兘缂栬緫鍚嶅瓧 + var rowRoomName = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uRoomName), this.cloneRoom.Name, this.listview.rowSpace / 2); + listview.AddChidren(rowRoomName); + rowRoomName.UseClickStatu = false; + rowRoomName.InitControl(); + //搴曠嚎 + rowRoomName.AddBottomLine(); + } //璇PP涓烘湁妤煎眰鐨勬ā寮忔墠寮�鍚繖涓彍鍗� - if (string.IsNullOrEmpty(this.cloneRoom.FloorId) == false) + if (this.editorRoom.IsLove == false && string.IsNullOrEmpty(this.cloneRoom.FloorId) == false) { //銆愭墍灞炴ゼ灞傘�� var btnBelone = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uBelongeFloor), Common.Config.Instance.Home.FloorDics[this.cloneRoom.FloorId], this.listview.rowSpace / 2); listview.AddChidren(btnBelone); btnBelone.InitControl(); - //鍙崇澶� - btnBelone.AddRightArrow(); //搴曠嚎 btnBelone.AddBottomLine(); //鍒嗕韩鐨勬埧闂翠笉鑳戒慨鏀� if (this.editorRoom.IsSharedRoom == false) { + //鍙崇澶� + btnBelone.AddRightArrow(); btnBelone.ButtonClickEvent += (sender, e) => { //妤煎眰閫夋嫨 @@ -215,13 +233,22 @@ tableContr.FinishInitControl(bodyFrameLayout, this.listview); tableContr = null; + //鍒嗕韩鐨勬埧闂翠笉鑳戒繚瀛� + if (this.editorRoom.IsSharedRoom == true) + { + return; + } + //淇濆瓨 var btnFinish = new BottomClickButton(); btnFinish.TextID = R.MyInternationalizationString.uSave; bodyFrameLayout.AddChidren(btnFinish); btnFinish.ButtonClickEvent += (sender, e) => { - this.cloneRoom.Name = txtRoomName.Text; + if (txtRoomName != null) + { + this.cloneRoom.Name = txtRoomName.Text; + } //妫�娴嬭兘鍚︿繚瀛樻埧闂� if (this.CheckCanSaveRoom() == false) { -- Gitblit v1.8.0