C# Class DoodlePad.IsolatedStorageHelper

显示文件 Open project: disbitski/DoodlePad

Public Methods

Method Description
GetImage ( byte buffer ) : System.Windows.Media.Imaging.WriteableBitmap

Gets an image from storage

GetSaveBuffer ( System.Windows.Media.Imaging.WriteableBitmap bitmap ) : byte[]

Gets the buffer to save to disk from the writeable bitmap

ImgFromBase64 ( byte byteArray ) : BitmapImage
LoadIfExists ( string fileName ) : byte[]
SaveToDisk ( byte buffer, string fileName ) : void

Saves to isolated storage

Method Details

GetImage() public static method

Gets an image from storage
public static GetImage ( byte buffer ) : System.Windows.Media.Imaging.WriteableBitmap
buffer byte
return System.Windows.Media.Imaging.WriteableBitmap

GetSaveBuffer() public static method

Gets the buffer to save to disk from the writeable bitmap
public static GetSaveBuffer ( System.Windows.Media.Imaging.WriteableBitmap bitmap ) : byte[]
bitmap System.Windows.Media.Imaging.WriteableBitmap The bitmap image
return byte[]

ImgFromBase64() public static method

public static ImgFromBase64 ( byte byteArray ) : BitmapImage
byteArray byte
return System.Windows.Media.Imaging.BitmapImage

LoadIfExists() public static method

public static LoadIfExists ( string fileName ) : byte[]
fileName string
return byte[]

SaveToDisk() public static method

Saves to isolated storage
public static SaveToDisk ( byte buffer, string fileName ) : void
buffer byte The buffer
fileName string
return void