Пример #1
0
            private static void convertStageToWholeRow(Stage stage, double payloadMass, TableRow row, SetTextBoxTextDelegate setTextBoxText)
            {
                foreach (TableCell cell in screenAllCells(row))
                {
                    switch (row.Cells.GetCellIndex(cell))
                    {
                    case (int)ColumnName.WetMass:
                        setTextBoxText(cell, stage.WetMass.ToString());
                        continue;

                    case (int)ColumnName.DryMass:
                        setTextBoxText(cell, stage.DryMass.ToString());
                        continue;

                    case (int)ColumnName.Isp:
                        setTextBoxText(cell, stage.Isp.ToString());
                        continue;

                    case (int)ColumnName.DeltaV:
                        setTextBoxText(cell, stage.DeltaV.ToString());
                        continue;

                    case (int)ColumnName.Thrust:
                        setTextBoxText(cell, stage.Thrust.ToString());
                        continue;

                    case (int)ColumnName.MinTWR:
                        setTextBoxText(cell, stage.MinTWR.ToString());
                        continue;

                    case (int)ColumnName.MaxTWR:
                        setTextBoxText(cell, stage.MaxTWR.ToString());
                        continue;

                    default:
                        continue;
                    }
                }
            }
Пример #2
0
 public static void ConvertRocketToWholeTable(Rocket rocket, Table rocketTable, SetTextBoxTextDelegate setTextBoxText)
 {
     foreach (TableRow row in screenRows(rocketTable, rocket.StageList.Count))
     {
         int rowIndex = rocketTable.Rows.GetRowIndex(row) - 1;
         convertStageToWholeRow(rocket.StageList.Find(s => s.ID == rowIndex), rocket.PayloadMass, row, setTextBoxText);
     }
 }