1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
using System;
using UILib;
using UnityEngine;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient.UI
{
internal class XGuildApplyView : DlgBase<XGuildApplyView, XGuildApplyBehaviour>
{
public override string fileName
{
get
{
return "Guild/GuildApplyDlg";
}
}
public override int layer
{
get
{
return 1;
}
}
public override int group
{
get
{
return 1;
}
}
public override bool autoload
{
get
{
return true;
}
}
private ulong m_UID;
private string m_Name;
private XGuildListDocument _doc;
private XFx m_xfx;
protected override void Init()
{
this._doc = XDocuments.GetSpecificDocument<XGuildListDocument>(XGuildListDocument.uuID);
}
public override void RegisterEvent()
{
base.RegisterEvent();
base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
base.uiBehaviour.m_BtnApply.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnApplyBtnClicked));
base.uiBehaviour.m_BtnEnterGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEnterSceneBtnClicked));
}
public void ShowApply(ulong uid, string name, uint ppt, bool bNeedApprove, string annoucement)
{
bool flag = !base.IsVisible();
if (flag)
{
this.SetVisible(true, true);
}
this.m_UID = uid;
this.m_Name = name;
base.uiBehaviour.m_PPT.SetText(ppt.ToString());
base.uiBehaviour.m_NeedApprove.SetText(bNeedApprove ? XStringDefineProxy.GetString("YES") : XStringDefineProxy.GetString("NO"));
base.uiBehaviour.m_Annoucement.SetText(annoucement);
base.uiBehaviour.m_ApplyMenu.SetActive(true);
base.uiBehaviour.m_ResultMenu.SetActive(false);
base.uiBehaviour.m_Close.SetVisible(true);
}
public void Hide()
{
this.SetVisible(false, true);
this.DestroyFx(this.m_xfx);
}
public void ShowResult(bool bCreate, string name)
{
bool flag = !base.IsVisible();
if (flag)
{
this.SetVisible(true, true);
}
string text = bCreate ? XStringDefineProxy.GetString("CREATE") : XStringDefineProxy.GetString("JOIN");
base.uiBehaviour.m_ResultNote.SetText(XStringDefineProxy.GetString("GUILD_APPLY_SUCCESS", new object[]
{
text,
name
}));
base.uiBehaviour.m_ApplyMenu.SetActive(false);
base.uiBehaviour.m_ResultMenu.SetActive(true);
base.uiBehaviour.m_Close.SetVisible(false);
this.DestroyFx(this.m_xfx);
this.m_xfx = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_yh", null, true);
this.m_xfx.Play(DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.uiBehaviour.m_FxFirework.transform, Vector3.zero, Vector3.one, 1f, true, false);
}
public void DestroyFx(XFx fx)
{
bool flag = fx == null;
if (!flag)
{
XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
}
}
private bool _OnApplyBtnClicked(IXUIButton btn)
{
this._doc.ReqApplyGuild(this.m_UID, this.m_Name);
return true;
}
private bool _OnEnterSceneBtnClicked(IXUIButton btn)
{
this.Hide();
bool flag = DlgBase<XGuildViewView, XGuildViewBehaviour>.singleton.IsVisible();
if (flag)
{
DlgBase<XGuildViewView, XGuildViewBehaviour>.singleton.SetVisibleWithAnimation(false, null);
}
DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(false, null);
XSingleton<XGameSysMgr>.singleton.OpenGuildSystem(XSysDefine.XSys_GuildHall);
return true;
}
private bool _OnCloseBtnClick(IXUIButton go)
{
this.Hide();
return true;
}
}
}
|