标签:
1 private void NavigationHelper_SaveState(object sender, SaveStateEventArgs e) 2 { 3 // TODO: 在此处保存页面的唯一状态。 4 ApplicationDataContainer localsetting = Windows.Storage.ApplicationData.Current.LocalSettings; 5 if ((String)localsetting.Values["AppCourt"] == "2") 6 { 7 localsetting.Values["AppCourt"] = "3"; 8 showMessageBox(); 9 } 10 else if (localsetting.Values.ContainsKey("AppCourt")) 11 { 12 localsetting.Values["AppCourt"] =(int.Parse((String)localsetting.Values["AppCourt"])+1).ToString(); 13 } 14 else 15 { 16 localsetting.Values["AppCourt"] = "1"; 17 } 18 } 19 async void showMessageBox() 20 { 21 MessageDialog messagedialog = new MessageDialog("给个好评鼓励开发=_="); 22 messagedialog.Commands.Add(new UICommand("好评",new UICommandInvokedHandler(this.CommandRateInvokedHandler))); 23 messagedialog.Commands.Add(new UICommand("取消")); 24 await messagedialog.ShowAsync(); 25 }
标签:
原文地址:http://www.cnblogs.com/NEIL-X/p/4302465.html