private void checkVersion() { bool isNeedClean = false; if (WpStorage.GetIsoSetting("Version") != null) { string version = WpStorage.GetIsoSetting("Version").ToString(); if (version != DeviceUtil.GetAppVersion()) { isNeedClean = true; WpStorage.SetIsoSetting("Version", DeviceUtil.GetAppVersion()); } } else { if (IsolatedStorageSettings.ApplicationSettings.Count > 0 || WpStorage.isoFile.DirectoryExists(CommonData.IsoRootPath)) { isNeedClean = true; } WpStorage.SetIsoSetting("Version", DeviceUtil.GetAppVersion()); } if (isNeedClean) { if (MessageBox.Show("检测到版本更新,为避免数据冲突建议清除本地缓存,是否清除缓存?", "", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { WpStorage.DeleteDirectory(CommonData.IsoRootPath); IsolatedStorageSettings.ApplicationSettings.Clear(); WpStorage.SetIsoSetting("Version", DeviceUtil.GetAppVersion()); } } App.BeginApp(); }
public StartPage() { InitializeComponent(); versionText.Text = DeviceUtil.GetAppVersion(); BgImgTimer.Interval = new TimeSpan(1000); BgImgTimer.Tick += new EventHandler(BgImgTimer_Tick); BgImgTimer.Start(); }
private void Fankui_Click(object sender, RoutedEventArgs e) { PopupManager.OffPopUp(); string strForamt = string.Format(" Device Info:\r\n {0} \r\n OS Version: \r\n {1} \r\n App Version:{2} \r\n NetWorkInfo:\r\n {3} \r\n " , DeviceUtil.GetDeviceName() + DeviceUtil.GetManufactor(), DeviceUtil.GetOSVersion(), DeviceUtil.GetAppVersion(), DeviceUtil.GetNetWorkType()); EmailComposeTask emailTask = new EmailComposeTask() { To = "*****@*****.**", Subject = "芒果TV意见反馈", Body = strForamt, }; try { emailTask.Show(); } catch { } }