static AstroUtilities() { using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Earth.bin")) using (BinaryReader reader = new BinaryReader(resStr)) { long entriesCount = resStr.Length / EarthAberrationData.REC_LENGTH; s_AberrationArgs = new EarthAberrationData[entriesCount]; for (int i = 0; i < entriesCount; i++) { s_AberrationArgs[i] = new EarthAberrationData(reader); } } using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Nutation.bin")) using (BinaryReader reader = new BinaryReader(resStr)) { long entriesCount = resStr.Length / EarthNutationData.REC_LENGTH; s_NutationArgs = new EarthNutationData[entriesCount]; for (int i = 0; i < entriesCount; i++) { s_NutationArgs[i] = new EarthNutationData(reader); } } using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Constellations.bin")) using (TextReader reader = new StreamReader(resStr)) { for (int i = 0; i < 88; i++) { s_Constellations[i] = new Constellation(); s_Constellations[i].Name = reader.ReadLine(); } for (int i = 0; i < 88; i++) { s_Constellations[i].Abbreviation = reader.ReadLine(); } for (int i = 0; i < 357; i++) { s_ConstellationBoundaries[i] = new ConstellationBoundaryEntry(); s_ConstellationBoundaries[i].RaFrom = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].RaTo = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].Dec = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].ConstellationIndex = int.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); } } }
static AstroUtilities() { using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Earth.bin")) using (BinaryReader reader = new BinaryReader(resStr)) { long entriesCount = resStr.Length / EarthAberrationData.REC_LENGTH; s_AberrationArgs = new EarthAberrationData[entriesCount]; for (int i = 0; i < entriesCount; i++) { s_AberrationArgs[i] = new EarthAberrationData(reader); } } using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Nutation.bin")) using (BinaryReader reader = new BinaryReader(resStr)) { long entriesCount = resStr.Length / EarthNutationData.REC_LENGTH; s_NutationArgs = new EarthNutationData[entriesCount]; for (int i = 0; i < entriesCount; i++) { s_NutationArgs[i] = new EarthNutationData(reader); } } using (Stream resStr = AssemblyHelper.GetEmbededResourceStreamThatClientMustDispose("Tangra.KweeVanWoerden.Resources", "Constellations.bin")) using (TextReader reader = new StreamReader(resStr)) { for (int i = 0; i < 88; i++) { s_Constellations[i] = new Constellation(); s_Constellations[i].Name = reader.ReadLine(); } for (int i = 0; i < 88; i++) s_Constellations[i].Abbreviation = reader.ReadLine(); for (int i = 0; i < 357; i++) { s_ConstellationBoundaries[i] = new ConstellationBoundaryEntry(); s_ConstellationBoundaries[i].RaFrom = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].RaTo = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].Dec = float.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); s_ConstellationBoundaries[i].ConstellationIndex = int.Parse(reader.ReadLine(), CultureInfo.InvariantCulture); } } }