2 using System.Collections.Generic;
6 using System.Windows.Controls;
7 using System.Windows.Documents;
10 using System.Windows.Media.Animation;
11 using System.Windows.Shapes;
12 using Microsoft.Phone.Controls;
17 public partial class ArrayPage : PhoneApplicationPage
19 public static Uri
URI =
new Uri(
"/ArrayPage.xaml", UriKind.Relative );
21 [Save]
string[] array =
new string[4];
22 TextBox[] textBoxes =
new TextBox[4];
26 InitializeComponent();
28 textBoxes[0] = textBox1;
29 textBoxes[1] = textBox2;
30 textBoxes[2] = textBox3;
31 textBoxes[3] = textBox4;
36 private void ArrayToBoxes()
38 for (
int i = 0; i < array.Length; i++ )
39 textBoxes[i].Text = array[i];
42 private void BoxesToArray()
44 for (
int i = 0; i < array.Length; i++ )
45 array[i] = textBoxes[i].Text;
48 private void buttonDelete_Click(
object sender, RoutedEventArgs e )
50 for (
int i = 0; i < 4; i++ )
51 textBoxes[i].Text =
"";
56 private void buttonSave_Click(
object sender, RoutedEventArgs e )
62 private void buttonLoad_Click(
object sender, RoutedEventArgs e )
66 textBox1.Text =
"File not found!";
74 private void buttonDelete_Click_1(
object sender, RoutedEventArgs e )
79 private void buttonClear_Click(
object sender, RoutedEventArgs e )
81 for (
int i = 0; i < textBoxes.Length; i++ )
82 textBoxes[i].Text =
"";
static IsolatedStorageManager Instance
override void Delete(string fileName)
Poistaa tiedoston.
override bool Exists(string fileName)
Kertoo onko tiedosto tai hakemisto olemassa.
void Save(object obj, string fileName)