From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 44 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs b/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs index 0360031..f7f37e9 100755 --- a/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs +++ b/ZigbeeApp/Shared/Phone/Login/Controls/PhoneEmailSelectControl.cs @@ -17,6 +17,20 @@ /// </summary> public Action<int> SelectMenuEvent = null; /// <summary> + /// 鎵嬫満鍒嗘敮鏄惁鑳界敤 + /// </summary> + public bool PhoneEnable + { + set { if (btnPhone != null) { btnPhone.CanClick = false; } } + } + /// <summary> + /// 閭鍒嗘敮鏄惁鑳界敤 + /// </summary> + public bool EmailEnable + { + set { if (btnEmail != null) { btnEmail.CanClick = false; } } + } + /// <summary> /// 鎵嬫満鍙锋帶浠� /// </summary> private NormalViewControl btnPhone = null; @@ -48,12 +62,13 @@ public void InitControl(uint selectBackColor,int selectIndex) { //鎵嬫満鍙� - this.btnPhone = new NormalViewControl(this.Width / 2 + HdlControlLogic.Current.GetPictrueRealSize(20), HdlControlLogic.Current.GetPictrueRealSize(127), false); + this.btnPhone = new NormalViewControl(HdlControlLogic.Current.GetPictrueRealSize(467), HdlControlLogic.Current.GetPictrueRealSize(127), false); btnPhone.X = HdlControlLogic.Current.GetPictrueRealSize(10); btnPhone.SelectedBackgroundColor = selectBackColor; btnPhone.TextID = R.MyInternationalizationString.PhoneNum; btnPhone.TextColor = UserCenterColor.Current.TextGrayColor3; btnPhone.SelectedTextColor = UserCenterColor.Current.White; + btnPhone.TextAlignment = TextAlignment.Center; btnPhone.Radius = (uint)HdlControlLogic.Current.GetPictrueRealSize(127) / 2; this.AddChidren(btnPhone); btnPhone.ButtonClickEvent += (sender, e) => @@ -72,11 +87,12 @@ //閭 this.btnEmail = new NormalViewControl(this.btnPhone.Width, this.btnPhone.Height, false); - btnEmail.X = this.btnPhone.Right - HdlControlLogic.Current.GetPictrueRealSize(40); + btnEmail.X = this.Width - this.btnPhone.Width - HdlControlLogic.Current.GetPictrueRealSize(10); btnEmail.SelectedBackgroundColor = selectBackColor; btnEmail.TextID = R.MyInternationalizationString.Email; btnEmail.TextColor = UserCenterColor.Current.TextGrayColor3; btnEmail.SelectedTextColor = UserCenterColor.Current.White; + btnEmail.TextAlignment = TextAlignment.Center; btnEmail.Radius = (uint)HdlControlLogic.Current.GetPictrueRealSize(127) / 2; this.AddChidren(btnEmail); btnEmail.ButtonClickEvent += (sender, e) => @@ -93,18 +109,42 @@ } }; + //璁剧疆閫夋嫨鐘舵�� + this.SetSelectIndex(selectIndex); + } + + #endregion + + #region 鈻� 璁剧疆閫夋嫨鐘舵�乢______________________ + + /// <summary> + /// 璁剧疆閫夋嫨鐘舵��(1:鎵嬫満鍙� 2:閭) + /// </summary> + /// <param name="i_index">1:鎵嬫満鍙� 2:閭</param> + public void SetSelectIndex(int i_index) + { //璁剧疆鍒濆鍊� - if (selectIndex == 1) + if (i_index == 1) { btnPhone.IsBold = true; btnPhone.IsSelected = true; + if (btnEmail.IsSelected == true) + { + btnEmail.IsBold = false; + btnEmail.IsSelected = false; + } //璋冪敤鍥炶皟鍑芥暟 this.SelectMenuEvent?.Invoke(1); } - else if (selectIndex == 2) + else if (i_index == 2) { btnEmail.IsBold = true; btnEmail.IsSelected = true; + if (btnPhone.IsSelected == true) + { + btnPhone.IsBold = false; + btnPhone.IsSelected = false; + } //璋冪敤鍥炶皟鍑芥暟 this.SelectMenuEvent?.Invoke(2); } -- Gitblit v1.8.0