本文整理汇总了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;
}
示例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);
}
示例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 };
}
示例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));
}
}
示例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;
}
示例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]);
}
示例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);
}
}
示例8: GetBetTeamName
protected override string GetBetTeamName(ITicketData ticketData, ITicketHelper ticketHelper)
{
return ticketHelper.GetResourceData(GetResourceId(), ticketData.BetTeam);
}
示例9: BuildBetTeam
protected override void BuildBetTeam(ITicket ticket, ITicketHelper ticketHelper, List<ITicketData> ticketData)
{
Template.betTeam = ticketHelper.GetResourceData(GetResourceId(), GetBetChoice(ticket));
}
示例10: GetBetChoiceName
protected virtual string GetBetChoiceName(ITicketHelper ticketHelper, int betTypeId, Dictionary<string, string> transDecsParsed)
{
return ticketHelper.GetResourceData(BetTypeRefIdNames[betTypeId], transDecsParsed[BetChoiceDataName]);
}
示例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;
}