当前位置: 首页>>代码示例>>C#>>正文


C# ITicketHelper.GetResourceData方法代码示例

本文整理汇总了C#中ITicketHelper.GetResourceData方法的典型用法代码示例。如果您正苦于以下问题:C# ITicketHelper.GetResourceData方法的具体用法?C# ITicketHelper.GetResourceData怎么用?C# ITicketHelper.GetResourceData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITicketHelper的用法示例。


在下文中一共展示了ITicketHelper.GetResourceData方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildGameName

        private string BuildGameName(ITicket ticket, ITicketHelper ticketHelper)
        {
            string gameName = ticketHelper.GetResourceData("MG_Casino", ticket.TransDesc);
            string markups = string.Format("{0} {1}{2}", OpenGameNameTag, gameName, CloseGameNameTag);

            return markups;
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:7,代码来源:Choice2008.cs

示例2: BuildChoice

        protected override void BuildChoice(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            base.BuildChoice(ticket, ticketHelper, ticketData);
            var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);

            var ticketDetails = GetTicketReference(ticket, ticketData);
            var choiceDetails = string.Format("<div id='parlay_{0}' style='display:none;'>", ticket.RefNo);

            if (ticketDetails.Count > 0 && IsNotRunningTicket(ticket))
            {
                int count = 1;
                foreach (var ticketDetail in ticketDetails)
                {
                    var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
                    var betTeam = string.Format(BetTeamFormat, ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam), odds);
                    var league = string.Format(LeagueFormat, ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));

                    choiceDetails += string.Format("<div class='ticketList'>{0}{1}</div>", betTeam, league);
                    if (count++ < ticketDetails.Count)
                    {
                        choiceDetails += "<div class='line'></div>";
                    }
                }
            }
            else
            {
                choiceDetails += string.Format("<div class='no-details'>{0}</div>", CoreBetList.ThereIsNoTicketDetailAvailable);
            }

            choiceDetails += "</div>";
            Template.League.SetValue(Template.League.ToString() + choiceDetails);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:32,代码来源:Choice1703.cs

示例3: RenderRTF

        public override List<IRichTextString> RenderRTF(
            ITicket ticket,
            ITicketHelper ticketHelper,
            List<ITicketData> ticketData,
            bool isShowScoreMap,
            RTFHelper rtfHelper)
        {
            Render(ticket, ticketHelper, ticketData, isShowScoreMap);
            RTFHelper tmpRtfHelper = rtfHelper.Clone();

            var betTypeName = GetBetTypeName(ticket.BetTypeId, ticketHelper);
            tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} {1}", Template.League.sportTypeName, betTypeName));

            var ticketDetails = GetTicketReference(ticket, ticketData);
            foreach (var ticketDetail in ticketDetails)
            {
                var odds = ConvertByBetType.Odds(ticketDetail.Odds, ticket.BetTypeId, ticket.OddsType);
                var betTeam = ticketHelper.GetResourceData(GetResourceId(), ticketDetail.BetTeam);
                var league = string.Format("{0} {1} {2}", ticketHelper.GetSportNameById(ticket.SportTypeId), betTypeName, GetBetChoice(ticketDetail.TransDesc));

                tmpRtfHelper.RTFRenderer.AddText("\n");
                tmpRtfHelper.RTFRenderer.AddText(string.Format("{0} @ {1}", betTeam, odds), rtfHelper.PosFont);
                tmpRtfHelper.RTFRenderer.AddText("\n");
                tmpRtfHelper.RTFRenderer.AddText(league, rtfHelper.NormalFont);
            }

            var choice = tmpRtfHelper.RTFRenderer.Render();
            tmpRtfHelper.RTFRenderer.Clear();
            return new List<IRichTextString>() { choice };
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:30,代码来源:Choice1703.cs

示例4: BuildLeague

        protected override void BuildLeague(ITicket ticket, ITicketHelper ticketHelper)
        {
            if (Template.League == null || Template.League.LeagueName == null)
            {
                return;
            }

            Template.League.LeagueName.leagueName = ticketHelper.GetResourceData(GameGroupRefId, ticket.TransDesc);

            if (string.IsNullOrEmpty(ticket.BetCheck))
            {
                Template.League.Append(BuildShowRnGBetsDetails(ticket));
            }
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:14,代码来源:Choice2101.cs

示例5: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var betChoice = ticketHelper.GetResourceData(GameTypeRefId, ticket.TransDesc);

            if (!string.IsNullOrEmpty(betChoice))
            {
                betChoice = BetTypeOpenTag + betChoice + BetTypeCloseTag;
            }

            if (!string.IsNullOrEmpty(ticket.BetCheck))
            {
                betChoice += ticket.BetCheck;
            }

            Template.betTeam = betChoice;
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:16,代码来源:Choice2101.cs

示例6: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            var bettypeTime = GetBetTypeTime(ticket);

            if (string.IsNullOrWhiteSpace(bettypeTime))
            {
                Template.betTeam = string.Empty;

                return;
            }

            var betTeamName = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
            var bettypeTimes = bettypeTime.Split(',');
            var teamName = ticketHelper.GetTeamNameById(bettypeTimes[0]);

            Template.betTeam = string.Format("{0} {1} {2}%", teamName, betTeamName, bettypeTimes[1]);
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:17,代码来源:Choice805.cs

示例7: BuildBetTeam

        protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
        {
            if (ticket == null || ticketHelper == null)
            {
                return;
            }

            Template.Handicap = null;
            base.BuildBetTeam(ticket, ticketHelper, ticketData);

            var transDescData = ParseTransDesc(ticket.TransDesc);

            if (transDescData.ContainsKey(BetChoiceKey))
            {
                var betChoice = transDescData[BetChoiceKey];

                Template.betTeam = ticketHelper.GetResourceData(ResourceId, betChoice);
            }
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:19,代码来源:Choice1003.cs

示例8: GetBetTeamName

 protected override string GetBetTeamName(ITicketData ticketData, ITicketHelper ticketHelper)
 {
     return ticketHelper.GetResourceData(GetResourceId(), ticketData.BetTeam);
 }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:4,代码来源:Choice1701.cs

示例9: BuildBetTeam

 protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
 {
     Template.betTeam = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
 }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:4,代码来源:Choice801.cs

示例10: GetBetChoiceName

 protected virtual string GetBetChoiceName(ITicketHelper ticketHelper, int betTypeId, Dictionary<string, string> transDecsParsed)
 {
     return ticketHelper.GetResourceData(BetTypeRefIdNames[betTypeId], transDecsParsed[BetChoiceDataName]);
 }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:4,代码来源:Choice1801.cs

示例11: GetRoomAndTable

        private string GetRoomAndTable(ITicket ticket, ITicketHelper ticketHelper)
        {
            var transDecsParsed = DeserializeTransDesc(ticket.TransDesc.ToUpper());

            var roomAndName = string.Empty;

            if (transDecsParsed.ContainsKey(RoundName))
            {
                roomAndName += ticketHelper.GetResourceData("AG_Room", transDecsParsed[RoundName]) + " ";
            }

            if (transDecsParsed.ContainsKey(TableCodeName))
            {
                roomAndName += transDecsParsed[TableCodeName];
            }

            return roomAndName;
        }
开发者ID:huyjack178,项目名称:harrsion-project,代码行数:18,代码来源:Choice1801.cs


注:本文中的ITicketHelper.GetResourceData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。