isolatedstorage

IsolatedStorage causes Memory to run out

筅森魡賤 提交于 2019-12-31 04:36:11
问题 hey. I'm reading an image from Isolated Storage when the user clicks on an item like this: using (IsolatedStorageFile currentIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { using (var img = currentIsolatedStorage.OpenFile(fileName, FileMode.Open)) { byte[] buffer = new byte[img.Length]; imgStream = new MemoryStream(buffer); //read the imagestream into the byte array int read; while ((read = img.Read(buffer, 0, buffer.Length)) > 0) { img.Write(buffer, 0, read); } img

Windows Phone 7 Silverlight binding image from the IsolatedStorage

心不动则不痛 提交于 2019-12-29 07:20:11
问题 I need to find the way to save images to the IsolatedStorage and show them I the Silverlight (XAML) Important: Silverlight have to take image “himself”, I cannot set the image from the code behind I have tried many solutions before. The very last solution is, to bind byte array and convert them to the Image XAML StackPanel Orientation="Horizontal" Margin="0,0,0,20"> <Image Width="110" CacheMode="BitmapCache" Source="{Binding ThumbLocal,Converter={StaticResource imgConverter}}" Margin="12,0,9

A change in one object changes the second one too

我是研究僧i 提交于 2019-12-25 18:35:02
问题 I'm creating two objects and assign them with a data from IsolatedStorage . But when I change one object the second one changes too. ( I think the problem may be the pointers are the same, but I can't solve it. ) private ArrayOfClsSimpleData lstUsers; private ArrayOfClsSimpleData tmpLstUsers; in class' globals tmpLstUsers = IsolatedStorageHelper.GetObject<ArrayOfClsSimpleData>("users"); lstUsers = IsolatedStorageHelper.GetObject<ArrayOfClsSimpleData>("users"); The first status of the arrays:

The IsolatedStorageSettings.Save method in Windows Phone: does it save the whole dictionary?

回眸只為那壹抹淺笑 提交于 2019-12-25 12:12:39
问题 Does the IsolatedStorageSettings.Save method in a Windows Phone application save the whole dictionary regardless of the changes we made in it? I.e. if we have say 50 items in it, and change just one, does the Save method saves (serializes, etc) the whole dictionary again and again? Is there any detailed documentation on this class and does anybody know what data storage format is used "under the hood"? 回答1: I've managed to find the implementation of the IsolatedStorageSettings.Save method in

The IsolatedStorageSettings.Save method in Windows Phone: does it save the whole dictionary?

て烟熏妆下的殇ゞ 提交于 2019-12-25 12:11:42
问题 Does the IsolatedStorageSettings.Save method in a Windows Phone application save the whole dictionary regardless of the changes we made in it? I.e. if we have say 50 items in it, and change just one, does the Save method saves (serializes, etc) the whole dictionary again and again? Is there any detailed documentation on this class and does anybody know what data storage format is used "under the hood"? 回答1: I've managed to find the implementation of the IsolatedStorageSettings.Save method in

How to validate, only allowing the user to select 1 file to read?

喜你入骨 提交于 2019-12-25 06:49:07
问题 Below are the codes to allow the user to read a File. How to allow the user to select only 1 file to read? private void button3_Click(object sender, RoutedEventArgs e) { ViewDiskModel model = this.ContentPanel.DataContext as ViewDiskModel; if (model.Files.Any(file => file.IsChecked)) { model.ReadSelectedFiles.Execute(null); NavigationService.Navigate(new Uri("/AnswerQuestionPage.xaml", UriKind.Relative)); } else if ((model.Files.Any(file => file.IsChecked)) > 1) { MessageBox.Show("Please

WP8 copy SharedStorge file directly into IsolatedStorage

我只是一个虾纸丫 提交于 2019-12-25 02:41:28
问题 I am developing a Windows Phone 8 application but am having a lot of issues with file access permission exceptions hindering the approval of my application when ever I try accessing files in the "local" folder (this only happens after the application has been signed by the WP store, not when deployed from Visual Studio). To solve this I have moved all file operations to IsolatedStorage and this seems to have fixed the problems. I only have one problem left though. My application needs to make

windows phone 7 File Listing IsolatedStorage

☆樱花仙子☆ 提交于 2019-12-25 00:50:58
问题 i have a problem when i want get list of file in a directory this is my code try { using (var store = IsolatedStorageFile.GetUserStoreForApplication()) { StringBuilder sb = new StringBuilder(); string subDir = Path.Combine("NotesYours", "Notes"); if (store.DirectoryExists(subDir)) { string searchPath = Path.Combine(subDir, "*"); string[] fileInSubDir = store.GetFileNames(searchPath); tbtbtes.Text = fileInSubDir.Length.ToString(); } else { MessageBox.Show("dir not exist"); } } } catch

windows phone 7 isolated storage - operation not permitted

爱⌒轻易说出口 提交于 2019-12-24 14:26:40
问题 So I've been working on a simple game and I wanted to implement a highscore system. Once the player loads up the main page for the first time a new text file is created ("hsc.txt") and some fake values are inserted which are later on split up by the program, however, currently my code throws a System.IO.IsolatedStorage.IsolatedStorageException and I can't seem to find the problem. I've looked up the error that I got from the message box which was " - operation not permitted " but all the

Storing data on Windows phone

血红的双手。 提交于 2019-12-24 13:35:02
问题 I'm working on an app that is going to store some favourites information that the user has added. I want to store two pieces of information for each favourite - a number and a piece of text. So it will be something like this: 123 Some text 1234 Some more text 1233 More text And so on. The number will be unique so it should be fine to use as a key and I will need to have this number stored separately anyway in order to use it to query some data. What is the best way to store this data on