Esempio n. 1
0
        protected override string CreateRealUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Real, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string lang = GetGameLanguage(element);

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            string realUrl = "";

            if (element.Element("Real") != null)
            {
                realUrl = element.Element("Real").Value;

                lang = SetSpecialUrlLanguageCode();
            }
            else
            {
                realUrl = GameLink.Real;
            }

            return(realUrl.Replace("{GAME}", gameName).Replace("{LANG}", lang).Replace("{TOKEN}", GameLink.MemberSessionId).Replace("{CASHIER}", GameLink.CashierPage).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 2
0
        public GPIHandler(string token) : base(GameProvider.GPI)
        {
            GameProvider = GameProvider.GPI;
            GameLink     = new GameLinkInfo
            {
                Fun             = GameSettings.GetGameUrl(GameProvider, GameLinkSetting.Fun),
                Real            = GameSettings.GetGameUrl(GameProvider, GameLinkSetting.Real),
                MemberSessionId = token
            };

            _gpi = new Gpi(GameLink);
        }
Esempio n. 3
0
        protected override string CreateRealUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Real, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = GetGameId(element);

            return(GameLink.Real.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{TOKEN}", GameLink.MemberSessionId).Replace("{CASHIER}", GameLink.CashierPage).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 4
0
        protected override string CreateFunUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Fun, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = GetGameId(element);

            return(GameLink.Fun.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 5
0
        protected override string CreateRealUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Real, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            return(GameLink.Real.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{TOKEN}", GameLink.MemberSessionId).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 6
0
        protected override string CreateFunUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Fun, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            return(GameLink.Fun.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode));
        }
Esempio n. 7
0
        protected override string CreateFunUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Fun, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string lang     = GetGameLanguage(element);
            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            return(GameLink.Fun.Replace("{GAME}", gameName).Replace("{LANG}", lang).Replace("{CURRENCY}", GetCurrencyByLanguage()).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 8
0
        protected override string CreateFunUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Fun, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            string currency = string.IsNullOrWhiteSpace(this.currencyCode) || this.currencyCode.Equals("rmb", StringComparison.OrdinalIgnoreCase) ? "CNY" : this.currencyCode;

            return(GameLink.Fun.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{CURRENCY}", currency).Replace("{LOBBY}", GameLink.LobbyPage));
        }
Esempio n. 9
0
        protected override string CreateFunUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Fun, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            string url    = "";
            string funUrl = IsElementExists("Fun", element, out url) ? url : GameLink.Fun;

            return(funUrl.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{LOBBY}", GameLink.LobbyPage).Replace("{CASHIER}", GameLink.CashierPage));
        }
Esempio n. 10
0
        protected override string CreateRealUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Real, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            bool isNGM = element.Attribute("Type") != null && element.Attribute("Type").Value.Equals("ngm", StringComparison.OrdinalIgnoreCase) ? true : false;

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            return(isNGM ? GameLink.Real.Replace("{GAME}", gameName).Replace("{LANG}", base.langCode).Replace("{USER}", user)
                   .Replace("{LOBBY}", GameLink.LobbyPage).Replace("{SUPPORT}", supportPage).Replace("{LOGOUT}", logoutPage) : "");
        }
Esempio n. 11
0
    private string BuildUrl(XElement element, string provider)
    {
        if (provider.ToLower() == GameProvider.GPI.ToString().ToLower())
        {
            var funUrl  = GameSettings.GetGameUrl(GameProvider.GPI, GameLinkSetting.Fun);
            var realUrl = GameSettings.GetGameUrl(GameProvider.GPI, GameLinkSetting.Real);

            var gpi = new Gpi(new GameLinkInfo
            {
                Fun             = funUrl,
                Real            = realUrl,
                MemberSessionId = commonVariables.CurrentMemberSessionId
            });

            return(string.IsNullOrWhiteSpace(commonVariables.CurrentMemberSessionId)
                ? gpi.BuildUrl(funUrl, element, GameLinkSetting.Fun)
                : gpi.BuildUrl(realUrl, element, GameLinkSetting.Real));
        }

        return(string.Empty);
    }
Esempio n. 12
0
        protected override string CreateRealUrl(XElement element)
        {
            var gpi = new Gpi(GameLink).CheckRSlot(GameLinkSetting.Real, element);

            if (!string.IsNullOrWhiteSpace(gpi))
            {
                return(gpi);
            }

            string gameName = element.Attribute("Id") != null?element.Attribute("Id").Value : "";

            string url     = "";
            string realUrl = IsElementExists("Real", element, out url) ? url : GameLink.Real;

            return
                (realUrl.Replace("{GAME}", gameName)
                 .Replace("{LANG}", base.langCode)
                 .Replace("{TOKEN}", GameLink.MemberSessionId)
                 .Replace("{CASHIER}", GameLink.CashierPage)
                 .Replace("{LOBBY}", GameLink.LobbyPage)
                 .Replace("{CURR}", GetUserCurrency()));
        }