From 73a0ad494269ddcf9f86bf64b891f52a5e331c42 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 22 Dec 2018 16:20:25 +0100 Subject: [PATCH] moved language select view assets to localization folder in Resources as well --- Assets/Resources/localization.meta | 10 +++ Assets/Resources/localization.xml | 12 +-- Assets/Resources/localization/flag_de.png | Bin 0 -> 376 bytes .../Resources/localization/flag_de.png.meta | 78 ++++++++++++++++++ Assets/Resources/localization/flag_jp.png | Bin 0 -> 2430 bytes .../Resources/localization/flag_jp.png.meta | 78 ++++++++++++++++++ Assets/Resources/localization/flag_uk_us.png | Bin 0 -> 2996 bytes .../localization/flag_uk_us.png.meta | 78 ++++++++++++++++++ .../Resources/localization/t_credits_de.txt | 17 ++++ .../localization/t_credits_de.txt.meta | 9 ++ .../Resources/localization/t_credits_en.txt | 17 ++++ .../localization/t_credits_en.txt.meta | 9 ++ .../localization/t_credits_version.txt | 1 + .../localization/t_credits_version.txt.meta | 9 ++ .../Scripts/Common/TextElement.cs | 17 ++-- .../RothenburgAR/Scripts/LanguageManager.cs | 2 +- .../Scripts/UI/LanguageSelectViewBehaviour.cs | 9 +- .../Scripts/Updater/UpdaterBehaviour.cs | 16 ++-- 18 files changed, 335 insertions(+), 27 deletions(-) create mode 100644 Assets/Resources/localization.meta create mode 100644 Assets/Resources/localization/flag_de.png create mode 100644 Assets/Resources/localization/flag_de.png.meta create mode 100644 Assets/Resources/localization/flag_jp.png create mode 100644 Assets/Resources/localization/flag_jp.png.meta create mode 100644 Assets/Resources/localization/flag_uk_us.png create mode 100644 Assets/Resources/localization/flag_uk_us.png.meta create mode 100644 Assets/Resources/localization/t_credits_de.txt create mode 100644 Assets/Resources/localization/t_credits_de.txt.meta create mode 100644 Assets/Resources/localization/t_credits_en.txt create mode 100644 Assets/Resources/localization/t_credits_en.txt.meta create mode 100644 Assets/Resources/localization/t_credits_version.txt create mode 100644 Assets/Resources/localization/t_credits_version.txt.meta diff --git a/Assets/Resources/localization.meta b/Assets/Resources/localization.meta new file mode 100644 index 0000000..89a3a58 --- /dev/null +++ b/Assets/Resources/localization.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2bd6ad883b515814d9c8b932f563372d +folderAsset: yes +timeCreated: 1545490981 +licenseType: Free +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/localization.xml b/Assets/Resources/localization.xml index 93ee8cd..7b7f87b 100644 --- a/Assets/Resources/localization.xml +++ b/Assets/Resources/localization.xml @@ -1,7 +1,7 @@ - - + + @@ -55,11 +55,11 @@ - - + + - - + + \ No newline at end of file diff --git a/Assets/Resources/localization/flag_de.png b/Assets/Resources/localization/flag_de.png new file mode 100644 index 0000000000000000000000000000000000000000..bfa00bb28527a5393af4b74adc84e538d85c8b55 GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^cYwHsg9%8MJiX)tq}Y|gW!U_%O^81FzR}` zIEGZrd3(i?x50pc<)GOATLleb72DZ%sTgy;+qlyZs0%0fmu4y-~aFRT+ee~_aC3uM+&wYhk0bgNuXW=JAYQ>91+g8p~h0hA2Q#NXjt4JqDr*Io5gL23=ha^7#_=5eZ10S!?W)TW*4vh1(FF z(adfPK#y_q!Z@}xn3d^DS6Inm3!yCLV;?r>!JD_KdYkwhF$TwzDgWJklMcVuf8xow z#ckcb(5o+FqXxeeP5p#KcWEAusvo=aup#jRUmY|=n{AGZZwj6LVl=8Iq$G-q8XLrB;(GL4f@P}s6t@x(1(n!s>L*b+)%L`)-E6Khw)>wD4 z&r~(6++R;Kg=w zP5QlqL_LAaAR+Y`O<6T8cqRDxN-xLucJd1U9X>{qkVdIA8ZE4zg98Y$>4DI>i|1m4 zid3=+lM^!whv$yvBMjao9xOIYM5B3hjXI$0?iOnGoHh{3_w_*7;{a+xZUp+}%X{JU z<{DImvm#5SB4+u{*tU2tshfyiEaPY>BrG=?o^*>(M{uDWXyT;`@&%aw6 zSFTFj!p|mmt3O_Tr^DZSsx_N&*g;!$jqWj3d5-oapW8ivb5rF<*i@uEx4yjmwLXob zr;q^e+#A3JIEMZvrpS$w~-S{F`anT)iv$ z=27Y#pNW(~?#OCf6%&dF_;d>BZkmwVU)}o9u|bDP}mQ9cX9kaa0J!bV!vIwuGF! zxPCymxMjgNq{V9FTB0L{rXnFpt86T3`lI^$kV^rA5@)|!q=1)N4M9DeY563j+LNd~hXHCAQSmM7rl@H!U9xE6?`x2GJs_{yG_ z^?~W`psgMYvyYM!riO&7#DD|RqzLJh%DUFQ0%bQ~uJP|1$aOU`))kWb^WmQ$>KPT5 zrJM;0Z+4aPn`h7~hqh%s^bL|f-1MkL>q`lNGrdL7CHUGK~QG4n?=` zmZY00*a^}LKEGOv{V2LTGUaHx*R8HKG}2U<>Uk%$P*Q;F5VaO)_#KX#uzlQKy}p6i zTyZLi3DXd!Vw_I`DG6gI$}LQ7Drk^T%s%aczw#6oMDFokYb`x2+~(!J>-gQ|*#4a7 zS>+syLuee(HLp%5T-;LQw@BIOt}~JzXGTu=z$ccSrF54TAOi^YZ5^K8`nQShzksDX)8xt4_&NYNhm($WOq37#zmIXEJ^%m! literal 0 HcmV?d00001 diff --git a/Assets/Resources/localization/flag_jp.png.meta b/Assets/Resources/localization/flag_jp.png.meta new file mode 100644 index 0000000..a539426 --- /dev/null +++ b/Assets/Resources/localization/flag_jp.png.meta @@ -0,0 +1,78 @@ +fileFormatVersion: 2 +guid: 2c05577f49b120f4b8ee7b9733af5ad2 +timeCreated: 1545490982 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/localization/flag_uk_us.png b/Assets/Resources/localization/flag_uk_us.png new file mode 100644 index 0000000000000000000000000000000000000000..b30a8d9f0d9fdb177e593baaa79e08eb863edaed GIT binary patch literal 2996 zcmd^B`9Bkm8y_OMK9SNPVG6k>A)g%En8|HoXdg$;2(vkIRYZol$6UE`My`z3C>m?7 zxvvmqZaG4v$=B!m{WHGL>-9YE*K@y~=k@&X#G0GJ`FSq#0002~I|h1)W1Ko>e{POr zIniAOItDf@0uBXKGennvfAxd&XZ=2Gxssy(2rAn;`)OkBc2vUMifOx7Cno68TIUCbX0M4bVNZ)S>qFp^lDW8f~PLKGxg&nZcOs@0;rHpBfmL9vqw=8k!j%o*5aL9Uc8TKK^ZD zVs3JhIW;vuGqbqe-nBPAH9NDkJv}=+yY%(z^4#3Y+}tXYxjH|;wz%+pX=#0Vd1GZ| zb8T&Fef`JA#`fms&eqoMj~~0cKMxLn?(Od%931@K|HV2uVEy@Zz+xR99{xF|qobqa zgZY1;!!gspkLNsvHn7D400Pv1neCHrxy!NffvkL%lpTDCAx%y<6391B1cz9zx1- zxe9hXgzHU31z?DPTtNZOx_~sr?Y*GnzmPL?Ez3J`+NG>>VfnYF)C|bMZQ;9*o4NzS z1#QDFw(-J(a22aOoO24Yh>~*e!M7wmD3C6*c5>PLxgk|{$5)DpC|Bmva272Yrz6Zh zpbSanr~)hMz>oq_U*S6PcR{93*Ab!A;e7TG94uRnWfy}$?zR{@b%oSMok zm?e4I8gS1HRPSs}_%)d5j*LrjnGvHf`)ZSG?1Uu4@EM=Uj;u>T8JtmajVDG>|`E+ z-R87zV}~^P}y7lJlN}E>-4> zDt%l@qS;y^!Tu*^qT*{quBg-2;=CJ84JeGdpVG-XRf9CBAihR5dM10V*!#r<3U&Uv ze47De8aKZwqQpw#3zMNrx5;ZG;_5RuBUNBvip$d(UF6B4-Yf_;S1B@8C@5rt9$d&p zmXS6*efmryFu5u?U&m2CS}G)~JNRWOJw4`nz7JpYW*dVqT21>kUwU_jvbONbxj#RLFVx|TwjMK&%m8&`m%W%rnlv<@s`SM4>D^dkjZ%C9+YSd z#(o(IU4!_l*ikXcMD}Zeie+$qc(vk3ACp3Z(@QQ@Dvc(lIcV z7Hmv4KKKbRxq&2^JdRa9Lf1N8T4F9CESYXWVy?({qeZS&-`{;q3}ongg?S;LJV91k zg&AbVtB$v&dKaX%+-fAAaZ>Bm?)E0K~5)o^=g^kAv4dwdWX%hXTv1PTbO>&Y0T#{11hB=GyM=%wTYxE0wE`15db z;QUJ4eGaJU4-{UMiwL(Fh!b3D~;># z04Thg6es5Q{;3)FZ^p+g@*>i`(ZnuhK_9jgVU?M)v>JuDDY_{=>4^U5hs05zJF_MF`e6wUOGvM@EmKC(DRRBuzGHA*mx z8KmxceY2EHd+5GtuJ+vLlu$850s_NYn|Q0Fk608Sc1P!3g>RH-@ZxXS)yj9N5iam9 ziNJ<0*tln}dN>&8cSoeKFNi9Ot1s~W;>-9D2_6(X)VH0L-=jo1jta740z55#uGXAB z9r4?c?X#_qvk+(l2gakUv^(@u)ULXl(=a6UtGBUY(loe~;!1)4Z9vmJKoej*k1NQ&)^ zmws1xvd8>Lj;?P$JNJnqmG$JM;VShc}Cj5X?LG_suOWE#A#44z6W%$e>_Rx|a zpB~eSrB-X z5EeNc^>2;7ly?BAd@K~3-#?Kln7AWDRX+|YfFEkJyXo0!t?Zr!0SA{X^821%NI`5U zIIycoMvJZcg`Mod6^GDwB|yN`C5a(oE8d_yMl=7|8zEL7#@mB)3ZZW)gMbf1=$on_ zps?1?Z_!La<(48H-s3hIc}l(?gg8{7D`%6Z&@GXvZ&uG{=DtFrFS$~L literal 0 HcmV?d00001 diff --git a/Assets/Resources/localization/flag_uk_us.png.meta b/Assets/Resources/localization/flag_uk_us.png.meta new file mode 100644 index 0000000..48a81d3 --- /dev/null +++ b/Assets/Resources/localization/flag_uk_us.png.meta @@ -0,0 +1,78 @@ +fileFormatVersion: 2 +guid: c64690fd7ce0e5c4a8061babcfa165a6 +timeCreated: 1545490982 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/localization/t_credits_de.txt b/Assets/Resources/localization/t_credits_de.txt new file mode 100644 index 0000000..066f2fd --- /dev/null +++ b/Assets/Resources/localization/t_credits_de.txt @@ -0,0 +1,17 @@ +Diese Anwendung wurde als Projektarbeit im 6. Semester von Studenten der Hochschule für angewandte Wissenschaften Würzburg-Schweinfurt erstellt. + +Entwicklerteam: +René Ziegler +Matthias Kleinhenz +Alexander Frühwald + +Betreuer FHWS: +Prof. Dr. Frank Deinzer +Toni Fetzer + +Besonderer Dank für die Aufnahme der 3D-Scans geht an Frank Ebner. + +Verantwortlicher im Auftrag des Reichstadtmuseums in Rothenburg: +Dr. Hellmuth Möhring + +Die in dieser App verwendeten Icons sind Teil der Google Material Icon Library, abrufbar unter https://material.io/icons/ und sind lizenziert unter der Apache License Version 2.0. \ No newline at end of file diff --git a/Assets/Resources/localization/t_credits_de.txt.meta b/Assets/Resources/localization/t_credits_de.txt.meta new file mode 100644 index 0000000..650cf06 --- /dev/null +++ b/Assets/Resources/localization/t_credits_de.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e33d40fce62ea349af0e5cb81a4058b +timeCreated: 1545490982 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/localization/t_credits_en.txt b/Assets/Resources/localization/t_credits_en.txt new file mode 100644 index 0000000..f7eda7f --- /dev/null +++ b/Assets/Resources/localization/t_credits_en.txt @@ -0,0 +1,17 @@ +This app has been created as a project by 6th semester students at the University of Applied Sciences Wurzburg-Schweinfurt. + +Developer Team: +René Ziegler +Matthias Kleinhenz +Alexander Frühwald + +Project Monitoring FHWS: +Prof. Dr. Frank Deinzer +Toni Fetzer + +Special thanks for taking the 3D-Scans go to Frank Ebner. + +Responsible on behalf of the Reichstadtmuseum of Rothenburg: +Dr. Hellmuth Moehring + +Icons used in this App are part of the Google Material Icon Library, available at https://material.io/icons/ and are licensed under the Apache License Version 2.0. \ No newline at end of file diff --git a/Assets/Resources/localization/t_credits_en.txt.meta b/Assets/Resources/localization/t_credits_en.txt.meta new file mode 100644 index 0000000..0d4735e --- /dev/null +++ b/Assets/Resources/localization/t_credits_en.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e87879c9f3136b4a8527b183fd599c8 +timeCreated: 1545490982 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/localization/t_credits_version.txt b/Assets/Resources/localization/t_credits_version.txt new file mode 100644 index 0000000..0dd00d0 --- /dev/null +++ b/Assets/Resources/localization/t_credits_version.txt @@ -0,0 +1 @@ +Version RC3 - 05.10.2017 \ No newline at end of file diff --git a/Assets/Resources/localization/t_credits_version.txt.meta b/Assets/Resources/localization/t_credits_version.txt.meta new file mode 100644 index 0000000..2ac14f9 --- /dev/null +++ b/Assets/Resources/localization/t_credits_version.txt.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe180226794a33a4fb817bbc80b657c6 +timeCreated: 1545490982 +licenseType: Free +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RothenburgAR/Scripts/Common/TextElement.cs b/Assets/RothenburgAR/Scripts/Common/TextElement.cs index e9c216d..08b3585 100644 --- a/Assets/RothenburgAR/Scripts/Common/TextElement.cs +++ b/Assets/RothenburgAR/Scripts/Common/TextElement.cs @@ -1,4 +1,5 @@ -using System; +using UnityEngine; +using System; using System.Collections.Generic; using System.IO; using System.Xml; @@ -76,7 +77,7 @@ namespace RothenburgAR.Common TextEntryType type = TextElement.GetTextEntryTypeFromString(typeStr); var valueStr = xmlNode.Attributes["value"].Value; if (type == TextEntryType.File) - valueStr = Path.Combine(basePath, valueStr); + valueStr = valueStr; textElement.AddTextElement(langCode, type, valueStr); } return textElement; @@ -103,13 +104,15 @@ namespace RothenburgAR.Common if (Type == TextEntryType.Inline) return Value; - // If it is no inline text, we need to have a file path as "value". - if (!File.Exists(Value)) - throw new FileNotFoundException(); - // Attention: // if there should be performance issues, here could be a nice place to add caching - return File.ReadAllText(Value, System.Text.Encoding.UTF8); + var file = Resources.Load(Value); + + // If it is no inline text, we need to have a file path as "value". + if (file == null) + throw new FileNotFoundException(); + + return file.text; } } diff --git a/Assets/RothenburgAR/Scripts/LanguageManager.cs b/Assets/RothenburgAR/Scripts/LanguageManager.cs index 3ef2345..05b1c3b 100644 --- a/Assets/RothenburgAR/Scripts/LanguageManager.cs +++ b/Assets/RothenburgAR/Scripts/LanguageManager.cs @@ -100,7 +100,7 @@ namespace RothenburgAR { var langKey = languageNode.Attributes["key"].Value; var langName = languageNode.Attributes["name"].Value; - var langFlagPath = Path.Combine(PathHelper.DataPath, languageNode.Attributes["flagPath"].Value); + var langFlagPath = languageNode.Attributes["flagPath"].Value; AddLanguage(langKey, langName, langFlagPath); diff --git a/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs b/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs index 0b7d3eb..60706c8 100644 --- a/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs +++ b/Assets/RothenburgAR/Scripts/UI/LanguageSelectViewBehaviour.cs @@ -32,13 +32,10 @@ namespace RothenburgAR.UI { var newFlag = GameObject.Instantiate(FlagPrefab, FlagContainer.transform); newFlag.SetActive(true); - - if (File.Exists(language.FlagImagePath)) - { - var bytes = File.ReadAllBytes(language.FlagImagePath); - Texture2D texture = new Texture2D(4, 4, TextureFormat.RGBA32, false); - texture.LoadImage(bytes); + var texture = Resources.Load(language.FlagImagePath); + if (texture != null) + { var image = newFlag.GetComponentInChildren(); image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)); image.preserveAspect = true; diff --git a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs index 253fe03..95746b7 100644 --- a/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs +++ b/Assets/RothenburgAR/Scripts/Updater/UpdaterBehaviour.cs @@ -212,7 +212,7 @@ namespace RothenburgAR.Updater var exhibits = JsonConvert.DeserializeObject>(http.Download.text); foreach (var exhibit in exhibits) { - UpdateMedia(exhibit); + UpdateMedia(exhibit, currentHandlers); } }; } @@ -225,13 +225,13 @@ namespace RothenburgAR.Updater private IEnumerator UpdateVersionFileCoroutine(List currentHandlers, string versionPath, string version) { // updates version file only if all sub files were downloaded successfully - yield return new WaitUntil(() => httpHandlers.All(h => h.IsDone)); - if (httpHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break; + yield return new WaitUntil(() => currentHandlers.All(h => h.IsDone)); + if (currentHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break; File.WriteAllText(versionPath, version); } - private void UpdateMedia(ApiExhibit exhibit) + private void UpdateMedia(ApiExhibit exhibit, List batchHandlers) { var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List { null }).ToList(); @@ -255,6 +255,7 @@ namespace RothenburgAR.Updater .Send(); httpHandlers.Add(http); + batchHandlers.Add(http); http.Operation.completed += ar => { @@ -276,7 +277,7 @@ namespace RothenburgAR.Updater var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries); foreach (var subfile in subfiles) { - UpdateSubfile(path, url, subfile); + UpdateSubfile(path, url, subfile, batchHandlers); } } @@ -326,7 +327,7 @@ namespace RothenburgAR.Updater var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries); foreach (var subfile in subfiles) { - UpdateSubfile(path, url, subfile); + UpdateSubfile(path, url, subfile, new List()); } } @@ -351,7 +352,7 @@ namespace RothenburgAR.Updater return eTag; } - private void UpdateSubfile(string path, string parentUrl, string subfile) + private void UpdateSubfile(string path, string parentUrl, string subfile, List batchHandlers) { var filepath = Path.Combine(path, subfile); var eTag = GenerateETag(filepath); @@ -362,6 +363,7 @@ namespace RothenburgAR.Updater .Send(); httpHandlers.Add(http); + batchHandlers.Add(http); http.Operation.completed += ar => {