Beispiel #1
0
 static public void Init()
 {
     instance = new UADManager();
     DataManager.Instance.addData("RemoveAD");
     DataManager.Instance.getData("RemoveAD").SetIntValue("popAdStatus", EncryptionManager.GetInt("RemoveAD", 0));
     instance.Start();
 }
Beispiel #2
0
        public IHttpActionResult GetChart(string chartName)
        {
            var        list       = new List <int>();
            UADManager uADManager = new UADManager();

            list = uADManager.GetChartStats(chartName);
            var jwt = Request.Headers.GetValues("token").FirstOrDefault();

            return(Ok(list));
        }
Beispiel #3
0
        public IHttpActionResult GetTop5AveragePageSession(string month, int year)
        {
            UADManager _uadManager = new UADManager();

            try
            {
                var result = _uadManager.GetTop5AveragePageSession(month, year);
                return(Ok(result));
            }
            catch (HttpRequestException error)
            {
                _gngLoggerService.LogBadRequest("", "", url, error.ToString());
                return(BadRequest());
            }
        }
Beispiel #4
0
        public IHttpActionResult GetLoginSuccessFail(string month, int year)
        {
            UADManager _uadManager = new UADManager();

            try
            {
                var result = _uadManager.GetLoginSuccessFail(month, year);
                return(Ok(result));
            }
            catch (HttpRequestException error) // Catch Logger Errors
            {
                _gngLoggerService.LogBadRequest("", "", url, error.ToString());
                return(BadRequest());
            }
        }
Beispiel #5
0
    public bool PopAd(HandleShowResultDelegate handleFinished = null)
    {
        UADManager uad = UADManager.Instance;

        if (uad.ShowAd("video", handleFinished))
        {
            return(true);
        }
        if (uad.ShowAd("display", handleFinished))
        {
            return(true);
        }
        if (uad.ShowAd("rewardedVideo", handleFinished))
        {
            return(true);
        }
        return(false);
    }
Beispiel #6
0
    public void ShowRewardedAd(HandleShowResultDelegate handleFinished = null)
    {
        UADManager uad = UADManager.Instance;

        if (uad.ShowAd("rewardedVideo", handleFinished))
        {
            return;
        }
        if (uad.ShowAd("video", handleFinished))
        {
            return;
        }
        if (uad.ShowAd("display", handleFinished))
        {
            return;
        }
        UIController.Instance.PushHint("ShowRewardedAd", "广告还没有准备好");
    }
Beispiel #7
0
 static public void Init()
 {
     instance = new UADManager();
     instance.Start();
 }