本文介绍了编程明确的Silverlight应用程序存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发表了一些客户的Silverlight应用程序。我有问题发布更新。

I have a Silverlight app published for some customers. I am having problems issuing updates.

我想,当一个用户加载的网页开始,如果他们的应用程序存储容量超过上一次的网站更新,那么这个发生。这将使我的申请工作。

I would like for when a user loads the webpage initially, if their Application Storage is older than the last time the site was updated, then this happens. This will make my application work.

于是,两个问题:

  • 我如何检查是否用户存储的应用程序存储容量超过最后更新Silverlight的网站?

  • How can I check if the users stored Application Storage is older thanthe last update to the Silverlight site?

如何删除应用程序存储的网站?

How can I delete the Application Storage for the site ?

我已经打过电话:

using( var store = IsolatedStorageFile.GetUserStoreForApplication() ) {
  store.Remove();
}
using( var store = IsolatedStorageFile.GetUserStoreForSite()) {
  store.Remove();
}

App.xaml.cs 文件,但这些似乎都在显示的页面上没有任何影响 - 应用程序存储没有完全清除。

in the App.xaml.cs file, but these seem to have no effect on the displayed page - the Application Storage is not fully cleared.

推荐答案

•我如何检查是否存储了用户的应用程序存储早于上次更新Silverlight的网站?

•How can I check if the users stored Application Storage is older than the last update to the Silverlight site?

这code进去的应用程序,以检查是否有和更新您的SL应用程序,我不知道这是否帮助,但如果你只是想要做的事与IsolatedStorageFile当有更新它应该是你想要什么:

this code go in app to check if there's and update to your SL application I don't know if it help but if you just want to do something with that IsolatedStorageFile when there's update it should be what you want :

Application.Current.CheckAndDownloadUpdateAsync();
Application.Current.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(Current_CheckAndDownloadUpdateCompleted);

private void Current_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
{
   if (e.UpdateAvailable)
   {

   }
}

•如何删除应用程序存储的网站?

•How can I delete the Application Storage for the site ?

IsolatedStorageFile store  = IsolatedStorageFile.GetUserStoreForApplication();
if(store.FileExists(FileName))
{
  store.DeleteFile(FileName);
}

这篇关于编程明确的Silverlight应用程序存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 00:42