Automap (client) [VS plugin mod]
Revision | 5fde0b7a52ff9c32db3bcb2749379d9431d0964e (tree) |
---|---|
Time | 2020-02-27 08:45:29 |
Author | melchior <melchior@user...> |
Commiter | melchior |
Post PR4 fixes; (added static HTML to project_,
changed helper method [C# 8 compatibility, revert in future]
@@ -96,7 +96,6 @@ | ||
96 | 96 | <Folder Include="Data\" /> |
97 | 97 | <Folder Include="assets\" /> |
98 | 98 | <Folder Include="assets\automap\" /> |
99 | - <Folder Include="assets\automap\config\" /> | |
100 | 99 | <Folder Include="Designators\" /> |
101 | 100 | <Folder Include="Libs\" /> |
102 | 101 | <Folder Include="Subsystems\" /> |
@@ -106,7 +105,7 @@ | ||
106 | 105 | <None Include="modinfo.json"> |
107 | 106 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
108 | 107 | </None> |
109 | - <None Include="assets\automap\config\automap_format.css"> | |
108 | + <None Include="assets\automap\config\automap.html"> | |
110 | 109 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
111 | 110 | </None> |
112 | 111 | </ItemGroup> |
@@ -37,14 +37,14 @@ namespace Automap | ||
37 | 37 | int q = Convert.ToInt32(value * (1 - f * saturation)); |
38 | 38 | int t = Convert.ToInt32(value * (1 - (1 - f) * saturation)); |
39 | 39 | |
40 | - return hi switch | |
40 | + switch (hi) | |
41 | 41 | { |
42 | - 0 => Color.FromArgb(255, v, t, p), | |
43 | - 1 => Color.FromArgb(255, q, v, p), | |
44 | - 2 => Color.FromArgb(255, p, v, t), | |
45 | - 3 => Color.FromArgb(255, p, q, v), | |
46 | - 4 => Color.FromArgb(255, t, p, v), | |
47 | - _ => Color.FromArgb(255, v, p, q), | |
42 | + case 0: return Color.FromArgb(255, v, t, p); | |
43 | + case 1: return Color.FromArgb(255, q, v, p); | |
44 | + case 2: return Color.FromArgb(255, p, v, t); | |
45 | + case 3: return Color.FromArgb(255, p, q, v); | |
46 | + case 4: return Color.FromArgb(255, t, p, v); | |
47 | + default: return Color.FromArgb(255, v, p, q); | |
48 | 48 | }; |
49 | 49 | } |
50 | 50 |
@@ -400,16 +400,16 @@ namespace Automap | ||
400 | 400 | int Z_chunk_pos = int.Parse(result.Groups["Z"].Value); |
401 | 401 | |
402 | 402 | //Parse PNG chunks for METADATA in shard |
403 | - using var fileStream = shardFile.OpenRead(); | |
403 | + using (var fileStream = shardFile.OpenRead( )) { | |
404 | 404 | //TODO: Add corrupted PNG Exception handing HERE ! |
405 | 405 | PngReader pngRead = new PngReader(fileStream); |
406 | - pngRead.ReadSkippingAllRows(); | |
407 | - pngRead.End(); | |
406 | + pngRead.ReadSkippingAllRows( ); | |
407 | + pngRead.End( ); | |
408 | 408 | |
409 | - PngMetadataChunk metadataFromPng = pngRead.GetChunksList().GetById1(PngMetadataChunk.ID) as PngMetadataChunk; | |
409 | + PngMetadataChunk metadataFromPng = pngRead.GetChunksList( ).GetById1(PngMetadataChunk.ID) as PngMetadataChunk; | |
410 | 410 | |
411 | 411 | chunkTopMetadata.Add(metadataFromPng.ChunkMetadata); |
412 | - | |
412 | + } | |
413 | 413 | } |
414 | 414 | } |
415 | 415 |