當前位置: 首頁>>代碼示例>>C#>>正文


C# Currency.GetString方法代碼示例

本文整理匯總了C#中System.Currency.GetString方法的典型用法代碼示例。如果您正苦於以下問題:C# Currency.GetString方法的具體用法?C# Currency.GetString怎麽用?C# Currency.GetString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Currency的用法示例。


在下文中一共展示了Currency.GetString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: getProductTransactionEntry

 /// <summary>
 /// Initializes a product data entry for use in XML.
 /// </summary>
 /// <param name="currencyType">Type of currency the item is sold for</param>
 /// <param name="description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="rentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
 /// <param name="hash">Item hash value that is recognized by NFS: World</param>
 /// <param name="iconString">Item icon that is displayed somewhere around its title</param>
 /// <param name="levelLimit">0 if not level limited, minimum level value if else</param>
 /// <param name="tooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="price">How much the item is sold for</param>
 /// <param name="priorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
 /// <param name="id">Server product id</param>
 /// <param name="title">Item title that is displayed in-game</param>
 /// <param name="itemType">Item type that NFS: World can recognize</param>
 /// <param name="extraDetail">If there is one, a special condition for the item that is displayed in-game</param>
 /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
 public static XElement getProductTransactionEntry(Currency currencyType, String description, Int32 rentalDurationInMinutes, Int64 hash, String iconString, Int16 levelLimit, String tooltipDescription, Int32 price, Int16 priorityNumber, String id, String title, GameItemType itemType, Special extraDetail = Special.None)
 {
     XElement ProductNode =
         new XElement("ProductTrans",
             new XElement("Currency", currencyType.GetString()),
             new XElement("Description", description),
             new XElement("DurationMinute", rentalDurationInMinutes.ToString()),
             new XElement("Hash", hash.ToString()),
             new XElement("Icon", iconString),
             new XElement("Level", levelLimit.ToString()),
             new XElement("LongDescription", tooltipDescription),
             new XElement("Price", price.ToString()),
             new XElement("Priority", priorityNumber.ToString()),
             new XElement("ProductId", id),
             new XElement("ProductTitle", title),
             new XElement("ProductType", itemType.GetString()),
             new XElement("SecondaryIcon", extraDetail.GetString()),
             new XElement("UseCount", "1")
         );
     return ProductNode;
 }
開發者ID:berkay2578,項目名稱:nfsw-server,代碼行數:38,代碼來源:Economy.cs

示例2: GetProductTransactionEntry

 /// <summary>
 /// Initializes a product data entry for use in XML.
 /// </summary>
 /// <param name="CurrencyType">Type of currency the item is sold for</param>
 /// <param name="Description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="RentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
 /// <param name="Hash">Item hash value that is recognized by NFS: World</param>
 /// <param name="IconString">Item icon that is displayed somewhere around it's title</param>
 /// <param name="LevelLimit">0 if not level limited, minimum level value if else</param>
 /// <param name="TooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="Price">How much the item is sold for</param>
 /// <param name="PriorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
 /// <param name="SType">Item type that the server can recognize, not the game</param>
 /// <param name="Id">Item index for the server</param>
 /// <param name="Title">Item title that is displayed in-game</param>
 /// <param name="GType">Item type that NFS: World can recognize, not the server</param>
 /// <param name="ExtraDetail">If there is one, a special condition for the item that is displayed in-game</param>
 /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
 public static XElement GetProductTransactionEntry(Currency CurrencyType, String Description, Int32 RentalDurationInMinutes, Int64 Hash, String IconString, Int16 LevelLimit, String TooltipDescription, Int32 Price, Int16 PriorityNumber, ServerItemType SType, Int32 Id, String Title, GameItemType GType, Special ExtraDetail)
 {
     XElement ProductNode = 
         new XElement("ProductTrans",
             new XElement("BundleItems",
                 new XAttribute(ServerAttributes.nilNS + "nil", "true")
             ),
             new XElement("CategoryId",
                 new XAttribute(ServerAttributes.nilNS + "nil", "true")
             ),
             new XElement("Currency", CurrencyType.GetString()),
             new XElement("Description", Description),
             new XElement("DurationMinute", RentalDurationInMinutes.ToString()),
             new XElement("Hash", Hash.ToString()),
             new XElement("Icon", IconString),
             new XElement("Level", LevelLimit.ToString()),
             new XElement("LongDescription", TooltipDescription),
             new XElement("Price", Price.ToString()),                   
             new XElement("Priority", PriorityNumber.ToString()),
             new XElement("ProductId", String.Format("ItemEntry{0}-{1}", SType.GetString(), Id.ToString())),
             new XElement("ProductTitle", Title),
             new XElement("ProductType", GType.GetString()),
             new XElement("SecondaryIcon", ExtraDetail.GetString()),
             new XElement("UseCount", "1")
         );
     return ProductNode;
 }
開發者ID:Mellowz,項目名稱:nfsw-server,代碼行數:45,代碼來源:Server.cs


注:本文中的System.Currency.GetString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。