3
我正在尝试创建显示目标帐户未结余额的收据卡。在Bot Framework模拟器中显示时,是否有任何方法可以从生成的卡中删除“税”和“总计”字段?为Microsoft Bot-Builder定制ReceiptCard
产生ReceiptCards
private ReceiptCard GenerateNewReceiptCardAccount(Account account)
{
return new ReceiptCard()
{
Title = "Account Number: " + account.AccountNumber.ToUpperInvariant(),
Facts = new List<Fact>
{
new Fact("Reference Month:", account.MonthRef),
},
Items = GetReceiptItemListAccount(account),
Buttons = new List<CardAction>
{
new CardAction(
ActionTypes.OpenUrl,
"More Details",
"https://github.com/amido/azure-vector-icons/blob/master/renders/file.png",
"https://gmail.com")
}
};
}
方法产生ReceiptItems
private List<ReceiptItem> GetReceiptItemListAccount(Account account)
{
List<ReceiptItem> ri = new List<ReceiptItem>();
ri.Add(new ReceiptItem("30-Days Outstanding Balance", price: "$ " + account.Outstanding30Days.ToString("F")));
ri.Add(new ReceiptItem("Current Outstanding Balance", price: "$ " + account.OutstandingCurrent.ToString("F")));
ri.Add(new ReceiptItem("Total Outstanding Balance", price: "$ " + account.OutstandingTotal.ToString("F")));
return ri;
}
我得到现在在模拟器窗口结果方法: