private void InitializeFlipImageGridSettings() { String picturesDirectoryImport = FileStorageHelper.RetrieveString(PicturesDirectorySerialFileLocation); if (picturesDirectoryImport != null) { Application.Current.Resources[KeyPicturesDirectory] = picturesDirectoryImport; } else { Application.Current.Resources[KeyPicturesDirectory] = "C:\\Users\\Public\\Pictures\\Sample Pictures"; } String transitionTypeImport = FileStorageHelper.RetrieveString(TransitionTypeSerialFileLocation); if (transitionTypeImport != null) { Application.Current.Resources[KeyTransitionType] = transitionTypeImport; } else { Application.Current.Resources[KeyTransitionType] = "rotate"; } Boolean?oneImageBoolImport = FileStorageHelper.RetrieveNullableBoolean(OneImageBoolSerialFileLocation); if (oneImageBoolImport != null) { Application.Current.Resources[KeyOneImageBool] = oneImageBoolImport; } else { Application.Current.Resources[KeyOneImageBool] = false; } }
private void InitializeWeatherAppletSettings() { List <String> locationImport = FileStorageHelper.RetrieveStringList(LocationSerialFileLocation); if (locationImport != null) { Application.Current.Resources[KeyLocation] = locationImport; } else { Application.Current.Resources[KeyLocation] = new List <String> { "22153", "Springfield,VA" } }; String unitsImport = FileStorageHelper.RetrieveString(UnitsSerialFileLocation); if (unitsImport != null) { Application.Current.Resources[KeyUnits] = unitsImport; } else { Application.Current.Resources[KeyUnits] = "imperial"; } }
private void SaveUnitsSetting() { FileStorageHelper.Save( Units, typeof(String), UnitsSerialFileLocation ); }
private void SaveLocationsSetting() { FileStorageHelper.Save( Location, typeof(List <String>), LocationSerialFileLocation ); }
private void SavePoolStatusesSettings() { FileStorageHelper.Save( PoolStatuses, typeof(List <Pool>), PoolStatusesSerialFileLocation ); }
private void SaveOneImageBoolSetting() { FileStorageHelper.Save( OneImageBool, typeof(Boolean?), OneImageBoolSerialFileLocation ); }
private void SaveTransitionTypeSetting() { FileStorageHelper.Save( TransitionType, typeof(String), TransitionTypeSerialFileLocation ); }
private void SavePicturesDirectorySetting() { FileStorageHelper.Save( PicturesDirectory, typeof(String), PicturesDirectorySerialFileLocation ); }
private void SaveRootFolderSetting() { FileStorageHelper.Save( RootFolder, typeof(String), RootFolderSerialFileLocation ); }
private void InitializeRootFolderSettings() { String rootFolderImport = FileStorageHelper.RetrieveString(RootFolderSerialFileLocation); if (rootFolderImport != null) { Application.Current.Resources[KeyRootFolder] = rootFolderImport; } else { Application.Current.Resources[KeyRootFolder] = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Membership Records"); }; }
private void InitializePoolStatusesSettings() { List <Pool> poolStatusesImport = FileStorageHelper.RetrievePoolList(PoolStatusesSerialFileLocation); if (poolStatusesImport != null) { Application.Current.Resources[KeyPoolStatuses] = poolStatusesImport; } else { Application.Current.Resources[KeyPoolStatuses] = new List <Pool> { new Pool("Main Pool", new List <PoolVariable>() { new PoolVariable("pH"), new PoolVariable("Cl"), new PoolVariable("Water temp") }), new Pool("Baby Pool", new List <PoolVariable>() { new PoolVariable("pH"), new PoolVariable("Cl") }), } }; }