private static XmlDocument OpenDocument() { IsolatedStorageFileStream storageFileStream; try { storageFileStream = new IsolatedStorageFileStream("ApplicationSettings.xml", FileMode.Open, FileAccess.Read); } catch (FileNotFoundException) { return(ApplicationSettings.CreateDocument()); } XmlDocument xmlDocument = new XmlDocument(); XmlTextReader xmlTextReader = new XmlTextReader(storageFileStream); xmlDocument.Load(xmlTextReader); xmlTextReader.Close(); storageFileStream.Close(); return(xmlDocument); }
public void ClearSettings() { this.Document = ApplicationSettings.CreateDocument(); }