コード例 #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;
            }
        }
コード例 #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";
            }
        }
コード例 #3
0
 private void SaveUnitsSetting()
 {
     FileStorageHelper.Save(
         Units,
         typeof(String),
         UnitsSerialFileLocation
         );
 }
コード例 #4
0
 private void SaveLocationsSetting()
 {
     FileStorageHelper.Save(
         Location,
         typeof(List <String>),
         LocationSerialFileLocation
         );
 }
コード例 #5
0
 private void SavePoolStatusesSettings()
 {
     FileStorageHelper.Save(
         PoolStatuses,
         typeof(List <Pool>),
         PoolStatusesSerialFileLocation
         );
 }
コード例 #6
0
 private void SaveOneImageBoolSetting()
 {
     FileStorageHelper.Save(
         OneImageBool,
         typeof(Boolean?),
         OneImageBoolSerialFileLocation
         );
 }
コード例 #7
0
 private void SaveTransitionTypeSetting()
 {
     FileStorageHelper.Save(
         TransitionType,
         typeof(String),
         TransitionTypeSerialFileLocation
         );
 }
コード例 #8
0
 private void SavePicturesDirectorySetting()
 {
     FileStorageHelper.Save(
         PicturesDirectory,
         typeof(String),
         PicturesDirectorySerialFileLocation
         );
 }
コード例 #9
0
 private void SaveRootFolderSetting()
 {
     FileStorageHelper.Save(
         RootFolder,
         typeof(String),
         RootFolderSerialFileLocation
         );
 }
コード例 #10
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");
            };
        }
コード例 #11
0
        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")
                    }),
                }
            };
        }