From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Team/XTeamInputPasswordView.cs | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs (limited to 'Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs') diff --git a/Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs b/Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs new file mode 100644 index 00000000..2312c60d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs @@ -0,0 +1,80 @@ +using System; +using KKSG; +using UILib; +using XMainClient.UI; +using XMainClient.UI.UICommon; + +namespace XMainClient +{ + internal class XTeamInputPasswordView : DlgBase + { + public override string fileName + { + get + { + return "Team/TeamInputPasswordDlg"; + } + } + + public override int layer + { + get + { + return 1; + } + } + + public override int group + { + get + { + return 1; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + private XTeamDocument _doc; + + public int TeamID; + + protected override void Init() + { + base.Init(); + this._doc = XDocuments.GetSpecificDocument(XTeamDocument.uuID); + } + + public override void RegisterEvent() + { + base.uiBehaviour.m_BtnOK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClicked)); + base.uiBehaviour.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClicked)); + } + + protected override void OnShow() + { + base.OnShow(); + base.uiBehaviour.m_Input.SetText(string.Empty); + } + + private bool _OnOKBtnClicked(IXUIButton btn) + { + string text = base.uiBehaviour.m_Input.GetText(); + this._doc.password = text; + this._doc.ReqTeamOp(TeamOperate.TEAM_JOIN, (ulong)((long)this.TeamID), null, TeamMemberType.TMT_NORMAL, null); + this.SetVisibleWithAnimation(false, null); + return true; + } + + private bool _OnCloseBtnClicked(IXUIButton btn) + { + this.SetVisibleWithAnimation(false, null); + return true; + } + } +} -- cgit v1.1-26-g67d0