コード例 #1
0
 public void FileStateChange()
 {
     if (webFile.State == StateType.Error)
     {
         errored = true;
         if (callBack != null)
         {
             callBack.Invoke(this);
         }
     }
     else if (webFile.State == StateType.Received)
     {
         Blob mainBlob = webFile.GetBlob();
         ReadFromBlob(mainBlob);
     }
 }
コード例 #2
0
        private void ReadFromBlob(Blob blob)
        {
            sourceBlob = blob;
            FileReader chunck = new FileReader();

            chunck.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent e)
            {
                ReadFromBin(new BinaryReader(new Uint8Array(chunck.Result)));
                if (callBack != null && parseSuccessful)
                {
                    callBack.Invoke(this);
                }
            };
            chunck.ReadAsArrayBuffer(blob);
        }