Esempio n. 1
0
        private void LoadCabinet()
        {
            if (webFile.State == StateType.Error)
            {
                Script.Literal("alert({0})", webFile.Message);
            }
            else if (webFile.State == StateType.Received)
            {
                mainBlob = (System.Html.Data.Files.Blob)webFile.GetBlob();
                FileReader chunck = new FileReader();
                chunck.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent e)
                {
                    int offset = GetSize((string)chunck.Result);

                    FileReader header = new FileReader();
                    header.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent ee)
                    {
                        string            data    = header.Result as string;
                        XmlDocumentParser xParser = new XmlDocumentParser();
                        Extract(xParser.ParseFromString(data, "text/xml"), offset);
                        callMe();
                    };
                    header.ReadAsText(mainBlob.Slice(0, offset));
                };
                chunck.ReadAsText(mainBlob.Slice(0, 255));
            }
        }
Esempio n. 2
0
 public void FileStateChange()
 {
     if (webFile.State == StateType.Error)
     {
         Script.Literal("alert({0})", webFile.Message);
     }
     else if (webFile.State == StateType.Received)
     {
         System.Html.Data.Files.Blob mainBlob = (System.Html.Data.Files.Blob)webFile.GetBlob();
         ReadFromBlob(mainBlob);
     }
 }
Esempio n. 3
0
 public static void StarFileStateChange()
 {
     if (webMpcFile.State == StateType.Error)
     {
         Script.Literal("alert({0})", webMpcFile.Message);
     }
     else if (webMpcFile.State == StateType.Received)
     {
         System.Html.Data.Files.Blob mainBlob = (System.Html.Data.Files.Blob)webMpcFile.GetBlob();
         FileReader chunck = new FileReader();
         chunck.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent e)
         {
             ReadFromBin(new BinaryReader(new Uint8Array(chunck.Result)));
             InitMPCVertexBuffer();
         };
         chunck.ReadAsArrayBuffer(mainBlob);
     }
 }
Esempio n. 4
0
 public string ReadAsText(Blob blob, string encoding)
 {
     return null;
 }
Esempio n. 5
0
 public string ReadAsText(Blob blob)
 {
     return null;
 }
Esempio n. 6
0
 public string ReadAsDataURL(Blob blob)
 {
     return null;
 }
Esempio n. 7
0
 public object ReadAsArrayBuffer(Blob blob)
 {
     return null;
 }