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;
}
我得到現在在模擬器窗口結果方法: