public void add(string url, object data = null, bool forceRemote = false) { if (list == null) { list = new List<FileData>(); } FileData item = new FileData(); item.url = url; item.data = data; item.forceRemote = forceRemote; item.content = new ByteArray(); list.Add(item); size = list.Count; }
private void completeHandler(FileData item) { // ThemeTrace.getInstance().appTxt("加载完成:" + loaderItem.url); if (item != null) { if (item.type == FileData.SWF || item.type == FileData.IMAGE) { } else if (item.type == FileData.FILE) { Dispatcher.dispatch(ModuleCommand.BATCH_ITEM_COMPLETE, item); loadCount++; if (loadCount == size) { loadCount = 0; Dispatcher.dispatch(ModuleCommand.BATCH_COMPLETE); } } } }