internal CelestialBodyInfo(Object a) { //store the actual object APIactualCelestialBodyInfo = a; //these sections get and store the reflection info and actual objects where required. Later in the properties we then read the values from the actual objects //for events we also add a handler //WORK OUT THE STUFF WE NEED TO HOOK FOR PEOPLE HERE bodyField = RBDBCelestialBodyType.GetField("body", BindingFlags.Public | BindingFlags.Instance); isResearchedField = RBDBCelestialBodyType.GetField("isResearched", BindingFlags.Public | BindingFlags.Instance); researchStateField = RBDBCelestialBodyType.GetField("researchState", BindingFlags.Public | BindingFlags.Instance); ignoreField = RBDBCelestialBodyType.GetField("ignore", BindingFlags.Public | BindingFlags.Instance); priorityField = RBDBCelestialBodyType.GetField("priority", BindingFlags.Public | BindingFlags.Instance); discoveryMessageField = RBDBCelestialBodyType.GetField("discoveryMessage", BindingFlags.Public | BindingFlags.Instance); KOPbarycenterField = RBDBCelestialBodyType.GetField("KOPbarycenter", BindingFlags.Public | BindingFlags.Instance); KOPrelbarycenterBodyField = RBDBCelestialBodyType.GetField("KOPrelbarycenterBody", BindingFlags.Public | BindingFlags.Instance); }
internal CelestialBodyInfo(Object a) { //store the actual object APIactualCelestialBodyInfo = a; //these sections get and store the reflection info and actual objects where required. Later in the properties we then read the values from the actual objects //for events we also add a handler //WORK OUT THE STUFF WE NEED TO HOOK FOR PEOPLE HERE //LogFormatted("Getting body field"); bodyField = RBDBCelestialBodyType.GetField("body", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (bodyField != null)); //LogFormatted("Getting isResearched field"); isResearchedField = RBDBCelestialBodyType.GetField("isResearched", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (isResearchedField != null)); //LogFormatted("Getting researchState field"); researchStateField = RBDBCelestialBodyType.GetField("researchState", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (researchStateField != null)); //LogFormatted("Getting ignore field"); ignoreField = RBDBCelestialBodyType.GetField("ignore", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (ignoreField != null)); //LogFormatted("Getting priority field"); priorityField = RBDBCelestialBodyType.GetField("priority", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (priorityField != null)); //LogFormatted("Getting discoveryMessage field"); discoveryMessageField = RBDBCelestialBodyType.GetField("discoveryMessage", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (discoveryMessageField != null)); //LogFormatted("Getting KOPbarycenter field"); KOPbarycenterField = RBDBCelestialBodyType.GetField("KOPbarycenter", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (KOPbarycenterField != null)); //LogFormatted("Getting KOPrelbarycenterBody field"); KOPrelbarycenterBodyField = RBDBCelestialBodyType.GetField("KOPrelbarycenterBody", BindingFlags.Public | BindingFlags.Instance); //LogFormatted_DebugOnly("Success: " + (KOPrelbarycenterBodyField != null)); }