Exemplo n.º 1
0
 private void generateReport_Click(object sender, EventArgs e)
 {
     GeneralUIReportGenerator.GenerateReport(
         currentPlanetarySystem.Name,
         backupPlanetarySystem.GetAllBodies(),
         currentPlanetarySystem.GetAllBodies(),
         canvasBitmap);
 }
Exemplo n.º 2
0
 private void planetarySystemTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node.Text != currentPlanetarySystem.Name &&
         e.Node.Text != "No star assigned" &&
         e.Node.Text != "Planets:" &&
         e.Node.Text != "Moons:" &&
         e.Node.Text != "Asteroids:" &&
         e.Node.Text != "Artificial objects:")
     {
         var name = e.Node.Text;
         if (name.IndexOf("Star: ") >= 0)
         {
             name = name.Remove(0, 6);
         }
         var allBodies         = currentPlanetarySystem.GetAllBodies();
         var selectedBodyQuery = from b in allBodies
                                 where b.Name == name
                                 select b;
         selectedBody = selectedBodyQuery.FirstOrDefault();
         LoadBodyInfo(selectedBody);
     }
 }