From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/XQQWXGameCenterPrivilegeView.cs | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XQQWXGameCenterPrivilegeView.cs (limited to 'Client/Assets/Scripts/XMainClient/XQQWXGameCenterPrivilegeView.cs') diff --git a/Client/Assets/Scripts/XMainClient/XQQWXGameCenterPrivilegeView.cs b/Client/Assets/Scripts/XMainClient/XQQWXGameCenterPrivilegeView.cs new file mode 100644 index 00000000..d5671f10 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XQQWXGameCenterPrivilegeView.cs @@ -0,0 +1,68 @@ +using System; +using UILib; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XQQWXGameCenterPrivilegeView : DlgBase + { + public override string fileName + { + get + { + return "GameSystem/PlatformAbility/QQWXGameCenterLaunchDlg"; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + public override void RegisterEvent() + { + base.RegisterEvent(); + base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked)); + } + + protected override void OnShow() + { + base.OnShow(); + string[] array = null; + bool flag = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ; + if (flag) + { + base.uiBehaviour.m_Title.SetText(XSingleton.singleton.GetString("GAMECENTER_QQ_TITLE")); + array = XSingleton.singleton.GetAndSeparateValue("QQGameCenterLevelReward", XGlobalConfig.SequenceSeparator); + } + else + { + bool flag2 = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat; + if (flag2) + { + base.uiBehaviour.m_Title.SetText(XSingleton.singleton.GetString("GAMECENTER_WX_TITLE")); + array = XSingleton.singleton.GetAndSeparateValue("WXGameCenterLevelReward", XGlobalConfig.SequenceSeparator); + } + } + int num = (array != null && array.Length == 2) ? int.Parse(array[1]) : 0; + base.uiBehaviour.m_Privilege1.SetText(XSingleton.singleton.GetString("GAMECENTER_P1")); + base.uiBehaviour.m_Privilege2.SetText(XSingleton.singleton.GetString("GAMECENTER_P2")); + base.uiBehaviour.m_Privilege3.SetText(XStringDefineProxy.GetString("GAMECENTER_P3", new object[] + { + num + })); + base.uiBehaviour.m_QQIcon.SetActive(XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ); + base.uiBehaviour.m_WXIcon.SetActive(XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat); + } + + private bool OnCloseBtnClicked(IXUIButton btn) + { + this.SetVisibleWithAnimation(false, null); + return true; + } + } +} -- cgit v1.1-26-g67d0