public static void SaveSettings() { if (File.Exists(libraryPath)) { File.Delete(libraryPath); } //create settings obj LibrarySettings settings = new LibrarySettings(); settings.Store(); FileIO.Write(libraryPath, settings, typeof(LibrarySettings)); }
public static void LoadSettings() { if (!File.Exists(libraryPath)) { SaveSettings(); } //preare settings obj LibrarySettings settings = (LibrarySettings)FileIO.Read(libraryPath, typeof(LibrarySettings)); if (settings != null) { settings.Restore(); } }