Project Description
Serene is a library for Windows Phone 7 that allows applications to self monitor usage and try to prompt good users to leave feedback on marketplace.

Install the Libraries from Nuget
Add it to your project with nuget: Install-Package Serene
http://nuget.org/List/Packages/Serene

Basic usage example of Serene
public partial class MainPage : PhoneApplicationPage
{
    private readonly ISereneManager _sereneManager;

    public MainPage()
    {
        InitializeComponent();
        Loaded += MainPageLoaded;
        _sereneManager = new SereneManager(new[] { new BasicUsageCriteria() });
    }

    void MainPageLoaded(object sender, RoutedEventArgs e)
    {
        _sereneManager.RunCriteria();
        _sereneManager.RedirectToMarketPlaceIfRequired("Would you like to rate this application now?", "Serene", DateTime.Now.AddDays(14));
    }
}


If you require something more flexible, for example you want to control the message UI being displayed. Then Serene has these bits exposed too:
var status = _sereneManager.RunCriteria();

if(status.MeetsCriteria)
    if(MessageBox.Show("Would you like to rate this application now?", "Serene", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
        _sereneManager.RedirectToMarketPlace();
    else
    {
        _sereneManager.RemindAgainLater(DateTime.Now.AddDays(14));
    }

Last edited May 3, 2011 at 10:01 AM by brendan, version 6