Friday, January 21, 2011

Windows Phone 7 Ad Control Testing in Emulator

I did the following after checking several posts on the Microsoft Ad Control for Windows Phone 7.
The following should go in the Constructor of the page.

 if (!CheckIsTrial())
{
SP_ADControl.Visibility = Visibility.Collapsed;

}
else
{
// Show_Buy_Now_Page();
SP_ADControl.Visibility = Visibility.Visible;
}



the following is the CheckisTrial Method



private bool CheckIsTrial()
{
#if DEBUG
MessageBoxResult result = MessageBox.Show("CLICK OK TO SIMULATE FULL LICENSE", "BUY NOW!", MessageBoxButton.OKCancel);


if (result == MessageBoxResult.OK)
{
return false;
}
else
{
return true;
}
#else
Return licenseInfo.IsTrial();
#endif
}

1 comment:

  1. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    WINDOWS PHONE 7 DEVELOPMENT| SEO tools

    ReplyDelete