Example #1
0
        /// <summary>
        /// Obtiene un objeto con la deserializacion en binario del IsolatedStorageFile
        /// </summary>
        void Load()
        {
            IsolatedStorageFile userStore = IsolatedStorageFile.GetUserStoreForAssembly();

            //If No data saved for this user
            if (userStore.GetFileNames(LastAccessStorageName).Length == 0)
            {
                _LastAccess = new LastAccess();
                return;
            }

            IsolatedStorageFileStream userStream = new IsolatedStorageFileStream(LastAccessStorageName, FileMode.Open, userStore);

            try
            {
                _LastAccess = (LastAccess)DeSerializeDictionary(userStream);
            }
            catch (System.Runtime.Serialization.SerializationException)
            {
                _LastAccess = new LastAccess();
            }
        }
Example #2
0
        /// <summary>
        /// Obtiene un objeto con la deserializacion en binario del IsolatedStorageFile
        /// </summary>
        void Load()
        {
            IsolatedStorageFile userStore = IsolatedStorageFile.GetUserStoreForAssembly();

            //If No data saved for this user
            if (userStore.GetFileNames(LastAccessStorageName).Length == 0)
            {
                _LastAccess = new LastAccess();
                return;
            }

            IsolatedStorageFileStream userStream = new IsolatedStorageFileStream(LastAccessStorageName, FileMode.Open, userStore);
            try
            {
                _LastAccess = (LastAccess) DeSerializeDictionary(userStream);
            }
            catch (System.Runtime.Serialization.SerializationException )
            {
                _LastAccess = new LastAccess();
            }
        }