From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordMenuForm.cs | 130 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 130 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordMenuForm.cs new file mode 100755 index 0000000..cbe0f24 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/PasswordMenuForm.cs @@ -0,0 +1,130 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.Safety +{ + /// <summary> + /// 瀹夐槻瀵嗙爜鐨勮彍鍗曠晫闈� + /// </summary> + public class PasswordMenuForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPasswordSettion)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var listView = new VerticalListControl(23); + listView.Height = bodyFrameLayout.Height; + listView.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(listView); + + //娣诲姞銆愬畨闃插瘑鐮併�戣 + var rowUserPsw = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(rowUserPsw); + //鍥炬爣 + var btnUserPswIcon = rowUserPsw.AddLeftIcon(81); + btnUserPswIcon.UnSelectedImagePath = "Item/PswSettionSelected.png"; + //瀹夐槻瀵嗙爜 + var btnUserPswText = rowUserPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSafetyPassword), 700, 60); + btnUserPswText.TextSize = 15; + btnUserPswText.Y = Application.GetRealHeight(12) + rowUserPsw.chidrenYaxis; + rowUserPsw.AddChidren(btnUserPswText, ChidrenBindMode.BindEvent); + //鐢ㄤ簬鍦ㄥ甯冮槻銆佺瀹跺竷闃层�佹挙闃叉搷浣� + var btnTip1 = rowUserPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uUserInGarrisonAndWithdrawGarrison), 700, 50, true); + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnTip1.Y = Application.GetRealHeight(72) + rowUserPsw.chidrenYaxis; + btnTip1.TextSize = 12; + btnTip1.TextColor = UserCenterColor.Current.TextGrayColor1; + rowUserPsw.AddChidren(btnTip1, ChidrenBindMode.BindEvent); + //鍚戝彸鐨勫浘鏍� + rowUserPsw.AddRightArrow(); + //搴曠嚎 + rowUserPsw.AddBottomLine(); + rowUserPsw.ButtonClickEvent += async (sender, e) => + { + //鎵撳紑鐢婚潰涔嬪墠锛屽厛鏍¢獙绠$悊鍛樺瘑鐮� + bool result = await HdlSafeguardLogic.Current.ShowSafetyAdminValidatedDialog(); + if (result == false) + { + return; + } + var form = new PasswordListUserForm(); + form.AddForm(); + }; + + //娣诲姞銆愯儊杩瘑鐮併�戣 + var rowCoercePsw = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(rowCoercePsw); + //鍥炬爣 + var btnCoercePswIcon = rowCoercePsw.AddLeftIcon(81); + btnCoercePswIcon.UnSelectedImagePath = "Item/PswSettionSelected.png"; + //鑳佽揩瀵嗙爜 + var btnCoercePswText = rowCoercePsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoercePassword), 700, 60); + btnCoercePswText.TextSize = 15; + btnCoercePswText.Y = Application.GetRealHeight(12) + rowCoercePsw.chidrenYaxis; + rowCoercePsw.AddChidren(btnCoercePswText, ChidrenBindMode.BindEvent); + //杈撳叆璇ュ瘑鐮侊紝绔嬪嵆閫氱煡浠栦汉 + var btnTip2 = rowCoercePsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uEnterPasswordToNotifyOthersImmediately), 700, 50, true); + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnTip2.Y = Application.GetRealHeight(72) + rowCoercePsw.chidrenYaxis; + btnTip2.TextSize = 12; + btnTip2.TextColor = UserCenterColor.Current.TextGrayColor1; + rowCoercePsw.AddChidren(btnTip2, ChidrenBindMode.BindEvent); + //鍚戝彸鐨勫浘鏍� + rowCoercePsw.AddRightArrow(); + rowCoercePsw.ButtonClickEvent += async (sender, e) => + { + //鎵撳紑鐢婚潰涔嬪墠锛屽厛鏍¢獙绠$悊鍛樺瘑鐮� + bool result = await HdlSafeguardLogic.Current.ShowSafetyAdminValidatedDialog(); + if (result == false) + { + return; + } + //鍒ゆ柇鏄惁璁剧疆鏈夎儊杩瘑鐮� + var listData = await HdlSafeguardLogic.Current.GetAllUserPassword(); + if (listData == null) + { + return; + } + foreach (var data in listData) + { + if (data.UserId == 5) + { + //淇敼瀵嗙爜 + var form1 = new CoercePswEditorForm(); + form1.AddForm(data.Password, data.PassWordTips); + return; + } + } + //鏂板缓瀵嗙爜 + var form = new CoercePswAddNewForm(); + form.AddForm(string.Empty); + }; + listView.AdjustRealHeight(Application.GetRealHeight(23)); + } + + #endregion + } +} -- Gitblit v1.8.0