Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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";
            }
        }
Esempio n. 3
0
        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");
            };
        }