Beispiel #1
0
        private void writeToFile(string name, string frequency)
        {
            if (name != null)
            {
                stationObject           = new Station();
                stationObject.Name      = name;
                stationObject.Frequency = frequency;
                stationList.Add(stationObject);
            }

            IsolatedStorage.SaveToIsolatedStorage(stationList, "list");
            readFromFile();
        }
Beispiel #2
0
        private void readFromFile()
        {
            stationList = IsolatedStorage.LoadFromIsolatedStorage <ObservableCollection <Station> >("list");

            saved_presets_list.ItemsSource = stationList.OrderBy(x => Convert.ToDouble(x.Frequency)).ToList();
            if (stationList.Count == 0)
            {
                add_some_presets.Visibility = Visibility.Visible;
            }
            else
            {
                add_some_presets.Visibility = Visibility.Collapsed;
            }
        }