|   | 
| using System;  | 
| using System.Collections;  | 
| using System.Collections.Generic;  | 
| using UnityEngine;  | 
| using UnityEngine.UI;  | 
|   | 
|   | 
| public class ServerForceExitHintWin : UIBase  | 
| {  | 
|     public static int reason = 0;  | 
|   | 
|     [SerializeField] Text m_Reason;  | 
|     [SerializeField] Button m_Confirm;  | 
|   | 
|     #region Built-in  | 
|   | 
|     protected override void InitComponent()  | 
|     {  | 
|         m_Confirm.AddListener(ReturnToLogin);  | 
|     }  | 
|   | 
|     protected override void OnPreOpen()  | 
|     {  | 
|         var kickConfig = KickOutReasonConfig.Get(reason);  | 
|         m_Reason.text = kickConfig == null ? "" : kickConfig.kickout;  | 
|     }  | 
|   | 
|   | 
|   | 
|     protected override void OnPreClose()  | 
|     {  | 
|     }  | 
|   | 
|   | 
|     #endregion  | 
|   | 
|     private void ReturnToLogin()  | 
|     {  | 
|         reason = 0;  | 
|         CloseWindow();  | 
|         switch (VersionConfig.Get().versionAuthority)  | 
|         {  | 
|             case VersionAuthority.InterTest:  | 
|                 GameNotice.OpenGameNotice();  | 
|                 break;  | 
|             case VersionAuthority.Release:  | 
|                 if (!VersionConfig.Get().isBanShu)  | 
|                 {  | 
|                     if (!LoginManager.Instance.sdkLogined)  | 
|                     {  | 
|                         SDKUtils.Instance.FreePlatformLogin();  | 
|                     }  | 
|                 }  | 
|                 break;  | 
|         }  | 
|     }  | 
|   | 
| }  | 
|   | 
|   |