From 2c39a1ef8c13bd8d0321f79b0ce2850d0a590b45 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 27 Jun 2012 22:49:23 +0000 Subject: Done Save, Load and Delete dialogs. --- Noddybox.WindowsPhone.Test/App.xaml.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Noddybox.WindowsPhone.Test/App.xaml.cs') diff --git a/Noddybox.WindowsPhone.Test/App.xaml.cs b/Noddybox.WindowsPhone.Test/App.xaml.cs index 139cae7..7fd87f0 100644 --- a/Noddybox.WindowsPhone.Test/App.xaml.cs +++ b/Noddybox.WindowsPhone.Test/App.xaml.cs @@ -12,6 +12,7 @@ using System.Windows.Navigation; using System.Windows.Shapes; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; +using System.IO.IsolatedStorage; namespace Noddybox.WindowsPhone.Test { @@ -57,6 +58,24 @@ namespace Noddybox.WindowsPhone.Test PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } + IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication(); + + iso.CreateDirectory("/dir1"); + iso.CreateDirectory("/dir1/sub1"); + iso.CreateDirectory("/dir2"); + + for(int f = 1; f < 100; f++) + { + using (var s = iso.CreateFile(String.Format("/file{0}.{1}", f, (f%2) == 1 ? "txt":"bat"))) + { + s.WriteByte(1); + } + + using (var s = iso.CreateFile(String.Format("/dir1/file_foobar{0}.{1}", f, (f%2) == 1 ? "TXT":"bat"))) + { + s.WriteByte(1); + } + } } // Code to execute when the application is launching (eg, from Start) -- cgit v1.2.3