summaryrefslogtreecommitdiff
path: root/Noddybox.WindowsPhone.Test
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2012-06-27 22:49:23 +0000
committerIan C <ianc@noddybox.co.uk>2012-06-27 22:49:23 +0000
commit2c39a1ef8c13bd8d0321f79b0ce2850d0a590b45 (patch)
tree72ba36255d4aabe03c3d063f501248cc4680c79c /Noddybox.WindowsPhone.Test
parent1c036de8e527038f00b7ff07fc1ef4b80f23a846 (diff)
Done Save, Load and Delete dialogs.
Diffstat (limited to 'Noddybox.WindowsPhone.Test')
-rw-r--r--Noddybox.WindowsPhone.Test/App.xaml.cs19
-rw-r--r--Noddybox.WindowsPhone.Test/MainPage.xaml3
-rw-r--r--Noddybox.WindowsPhone.Test/MainPage.xaml.cs5
3 files changed, 26 insertions, 1 deletions
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)
diff --git a/Noddybox.WindowsPhone.Test/MainPage.xaml b/Noddybox.WindowsPhone.Test/MainPage.xaml
index 8e80897..5d0d3fe 100644
--- a/Noddybox.WindowsPhone.Test/MainPage.xaml
+++ b/Noddybox.WindowsPhone.Test/MainPage.xaml
@@ -29,7 +29,8 @@
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
- <noddybox:SaveDialog />
+ <!--<noddybox:LoadDialog TitleText="Select File to Load" OkPressed="SaveDialog_OkPressed"/>-->
+ <noddybox:DeleteDialog TitleText="Select Files to Delete" />
</Grid>
</Grid>
diff --git a/Noddybox.WindowsPhone.Test/MainPage.xaml.cs b/Noddybox.WindowsPhone.Test/MainPage.xaml.cs
index 726cedc..7583388 100644
--- a/Noddybox.WindowsPhone.Test/MainPage.xaml.cs
+++ b/Noddybox.WindowsPhone.Test/MainPage.xaml.cs
@@ -20,5 +20,10 @@ namespace Noddybox.WindowsPhone.Test
{
InitializeComponent();
}
+
+ private void SaveDialog_OkPressed(object sender, Silverlight.FileDialogEvent e)
+ {
+ MessageBox.Show(e.Path);
+ }
}
} \ No newline at end of file