您的位置:首页 > 其它

Using the Windows Phone Isolated Storage Explorer tool

2011-10-17 14:29 537 查看
Using the Windows Phone Isolated Storage Explorer tool

http://www.windowsphonegeek.com/tips/Using-the-Windows-Phone-Isolated-Storage-Explorer-tool

Using the Windows Phone Isolated Storage Explorer toolpublished on: 8/12/2011| Views: 1772| Tags: IsoStore1234567891011121314151617181920 Currently rated 4.83 by 6 people

12345 Rate Now!

by WindowsPhoneGeek

In this post I am going to talk about Windows Phone 7 Isolated Storage Explorer. This is a nice tool that helps developers explore the Windows Phone isolated storage.

Windows Phone 7 Isolated Storage Explorer is a free Open Source project published on Codeplex: http://wp7explorer.codeplex.com/

It can work both as a desktop application for testers or integrated in Visual Studio for developers. You can read the full description here.

NOTE: Although the project is considered to be in Beta we tested the product in details and as a conclusion it turns out to be stable enough and also quite helpful!

Why use it?

Here are some good reasons of why using this tool:

it is easy to install and use
you can check the state of the Isolated Storage of your Windows Phone apps
you can copy files from the Isolated Storage to your PC and vice versa
How to use WP7 Isolated Storage Explorer?

Step1: Download the installation .msi package from: http://wp7explorer.codeplex.com/





Step2: Install the downloaded "WP7 Isolated Storage Explorer v1.0 Beta.msi"





Step3: Create a new Windows Phone 7.1 Project and add reference to IsolatedStorageExplorer.dll.

C:\Program Files (x86)\WP7 Isolated Storage Explorer\Library\IsolatedStorageExplorer.dll





Step4: Call "IsolatedStorageExplorer.Explorer.Start("<hostname>")" in the Launching event in App.xaml.cs.

Note: <hostname> is the host name or IP of the of the testing or development machine.

example:

?
Step5: Add the call to "IsolatedStorageExplorer.Explorer.RestoreFromTombstone()" in the handler for the Activated event in App.xaml.cs:

?
According to the official documentation: The WP7 Isolated Storage Explorer supports connections from the emulator or actual devices. For applications running on devices a data connection must be enabled (WiFi or the mobile data connection).
It is not recommended to use the WP7 Isolated Storage Explorer on a device over a mobile data connection due to the traffic the application will generate, that might be charged by the mobile carrier.
The development or testing machine's firewall must allow connections to the WP7 Isolated Storage Explorer Service on port 2502.

Step6: Save a sample .txt file into IsolatedStorage like for example:

?
?
NOTE: For more info about Isolated Storage you can take a look at our of 12posts: All about WP7 Isolated Storage

Step7: Run your Windows Phone project and press the "Save to IsoStore" button so that the text file will be stored in to the Isolated Storage. Next run the Isolated Storage Explorer tool which you can find installed on your PC at the following folder:

C:\Program Files (x86)\WP7 Isolated Storage Explorer\DesktopClient\WP7 Isolated Storage Explorer.exe





Alternatively you can start the tool from Visual Studio: View->Other Windows-> WP7 Isolated Storage Explorer:





Here is how the result should look like:





Step8: You can also add a file from your computer directly to the Isolated Storage of your app without writing any code just by using the Isolated Storage Explorer tool context menu and selecting the "Add Existing Item" option:







In this post I demonstrated how quick and easy it is to explore the IsolatedStorage of your Windows Phone app using the Windows Phone Isolated Storage Explorer. Here is the full source code:

I hope that the post was helpful.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: