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)); } }
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); } }
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); } }
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); } }
public static void GalaxyFileStateChange() { if (webFileGalaxy.State == StateType.Error) { Script.Literal("alert({0})", webFileGalaxy.Message); } else if (webFileGalaxy.State == StateType.Received) { System.Html.Data.Files.Blob mainBlob = (System.Html.Data.Files.Blob)webFileGalaxy.GetBlob(); FileReader chunck = new FileReader(); chunck.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent e) { BinaryReader br = new BinaryReader(new Uint8Array(chunck.Result)); InitializeCosmos(br); }; chunck.ReadAsArrayBuffer(mainBlob); } }