public async Task<CanvasProject> LoadCanvasProjectAsync(int canvasId) { CanvasProject returnValue = null; try { var objStorageHelper = new WinRtUtility.ObjectStorageHelper<CanvasProject>(WinRtUtility.StorageType.Local); returnValue = await objStorageHelper.LoadAsync(canvasId.ToString()); } catch (Exception ex) { returnValue = null; } return returnValue; }
public async Task <CanvasProject> LoadCanvasProjectAsync(int canvasId) { CanvasProject returnValue = null; try { var objStorageHelper = new WinRtUtility.ObjectStorageHelper <CanvasProject>(WinRtUtility.StorageType.Local); returnValue = await objStorageHelper.LoadAsync(canvasId.ToString()); } catch (Exception ex) { returnValue = null; } return(returnValue); }
static async Task <SaveAllSpecies> LoadFile(string filename) { SaveAllSpecies data = new SaveAllSpecies(); try { var objectStorageHelper = new WinRtUtility.ObjectStorageHelper <SaveAllSpecies>(WinRtUtility.StorageType.Local); data = await objectStorageHelper.LoadAsync(filename + ".xml"); return(data); } catch (Exception e) { //Shit return(new SaveAllSpecies()); } }
static async Task<SaveAllSpecies> LoadFile(string filename) { SaveAllSpecies data = new SaveAllSpecies(); try { var objectStorageHelper = new WinRtUtility.ObjectStorageHelper<SaveAllSpecies>(WinRtUtility.StorageType.Local); data = await objectStorageHelper.LoadAsync(filename + ".xml"); return data; } catch (Exception e) { //Shit return new SaveAllSpecies(); } }