diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Team/XTeamInputPasswordView.cs | 80 |
1 files changed, 80 insertions, 0 deletions
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<XTeamInputPasswordView, XTeamInputPasswordBehaviour>
+ {
+ 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>(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;
+ }
+ }
+}
|