Exemplo n.º 1
0
    /// <summary>
    /// 切换状态
    /// </summary>
    private void switchStatus()
    {
        Status = updateStatus.NO;
        switch (Status)
        {
        case updateStatus.NO:
            login.ShowLoginButton();
            break;

        case updateStatus.needUpdated:
            GetComponent <DOTweenAnimation>().DOPlay();
            closeBtn.onClick.AddListener(delegate
            {
                transform.DOScale(0, 0.2f);
                login.ShowLoginButton();
            });
            break;

        case updateStatus.forcedUpdated:
            GetComponent <DOTweenAnimation>().DOPlay();
            closeBtn.onClick.AddListener(delegate
            {
                Application.Quit();
            });
            break;

        case updateStatus.NotNetWork:
            FICWaringPanel._instance.Show("网络异常!");
            FICWaringPanel._instance.WarnningMethods = delegate { Invoke("switchStatus", 2); };
            //Status = DetectionUpdate();
            break;
        }
    }
Exemplo n.º 2
0
 void Awake()
 {
     progressBar  = transform.parent.Find("progressBar").GetComponent <Slider>();
     updateInfo   = transform.Find("updateInfo").GetComponent <Text>();
     downloadBtn  = transform.Find("downloadBtn").GetComponent <Button>();
     closeBtn     = transform.Find("closeBtn").GetComponent <Button>();
     localVersion = GameObject.Find("versionNum").GetComponent <Text>();
     login        = GameObject.Find("Main Camera").GetComponent <Manager_Login>();
     Status       = updateStatus.NO;
 }
Exemplo n.º 3
0
 void Start()
 {
     downloadBtn.onClick.AddListener(delegate {
         StartCoroutine(DownUpdate(downloadPath));
         transform.DOScale(0, 0.2f);
         login.progressCircle.SetActive(false);
     });
     localVersion.text = "V" + Application.version;
     fileName          = "/" + DateTime.Now.ToFileTimeUtc().ToString() + "GY_Mahjong.apk";
     Status            = DetectionUpdate();
     Invoke("switchStatus", 1);
 }
Exemplo n.º 4
0
 public bool UpdateTheStatus([FromBody] updateStatus updateStatus)
 {
     return(ChildBL.UpdateTheStatus(updateStatus.id));
 }