c# - 使用 XNA 游戏以试用模式进入 Marketplace

标签 c# windows-phone-7 xna

我想检测我的游戏是否处于试用模式并让用户去市场购买。

我编写的代码是 HERE

虽然他们提供的代码样本不起作用

if (Guide.IsTrialMode)
{
    Guide.ShowMarketplace(signedInGamer.PlayerIndex);
}

它给出 The name SignedInGamer doesn't exist in the current context

我试着玩了一下并将其修改为:

if (Guide.IsTrialMode)
{
   //Guide.ShowMarketplace(signedInGamer.PlayerIndex);
    Guide.ShowMarketplace(PlayerIndex.One);                
}

它现在可以工作,但在模拟器上它进入市场并提供:

enter image description here

我不确定是因为游戏处于 Debug模式还没有发布,还是因为我做了修改?!

最佳答案

这是因为它还没有在市场上发布。您链接到的页面有此注释:

When the method Guide.ShowMarketplace is called on an application that has not yet been published to the Windows Phone Marketplace, it will result in an error being displayed. If this error has the error code 805a0194, then the call was successful and will operate correctly when the application is published. When your application is published, the Guide.ShowMarketplace will automatically detect your application’s unique ID and launch the correct details page in the Windows Phone Marketplace client application.

关于c# - 使用 XNA 游戏以试用模式进入 Marketplace,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8824754/

相关文章:

c# - 将 TPL 任务与 HttpWebRequest 结合使用

windows - 在 Windows Phone 应用程序中更改我的 xap 名称

c# - 具有抗锯齿功能的 XNA 3.1 DrawUserPrimitives - 多重采样不起作用?

c# - 强制关闭 TCP 客户端时服务器无法识别断开连接

c# - 将 WindowsAzure.ServiceBus 迁移到 Azure.Messaging.ServiceBus

wpf - 正确的 MVVM 设计模式 - ViewModel 和 DataContext

c# - XNA C# 中的颜色替换

c# - "TypeInitializationException was unhandled"

javascript - 如何使用 selenium Web 驱动程序或使用 Javascript 防止页面重新加载?

c# - 转换为小数点后两位