コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: SaveHelper.cs プロジェクト: armangharib/Swarm
        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());
            }
        }
コード例 #4
0
ファイル: SaveHelper.cs プロジェクト: kbo4sho/Swarm
 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();
     }
 }