private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e)
{
// TODO: 在此处保存页面的唯一状态。
ApplicationDataContainer localsetting = Windows.Storage.ApplicationData.Current.LocalSettings;
if ((String)localsetting.Values["AppCourt"] == "")
{
localsetting.Values["AppCourt"] = "";
showMessageBox();
}
else if (localsetting.Values.ContainsKey("AppCourt"))
{
localsetting.Values["AppCourt"] =(int.Parse((String)localsetting.Values["AppCourt"])+).ToString();
}
else
{
localsetting.Values["AppCourt"] = "";
}
}
async void showMessageBox()
{
MessageDialog messagedialog = new MessageDialog("给个好评鼓励开发=_=");
messagedialog.Commands.Add(new UICommand("好评",new UICommandInvokedHandler(this.CommandRateInvokedHandler)));
messagedialog.Commands.Add(new UICommand("取消"));
await messagedialog.ShowAsync();
}