예제 #1
0
 private void getSeedsFromGrid(List <Core.ChemicalElement> elements, List <double> quantities, DataGridView _grid)
 {
     foreach (DataGridViewRow row in _grid.Rows)
     {
         if (!row.IsNewRow)
         {
             foreach (DataGridViewCell cell in row.Cells)
             {
                 if (cell.ValueType == typeof(Core.ChemicalElement))
                 {
                     UI.ChemicalElement element = new UI.ChemicalElement();
                     element.initElementDataFromFather((Core.ChemicalElement)cell.Value);
                     elements.Add(element);
                 }
                 if (cell.ValueType == typeof(double) || cell.ValueType == typeof(int))
                 {
                     quantities.Add((double)cell.Value);
                 }
             }
         }
     }
 }
 public ChemicalElements_ComboBox_Ds(ChemicalElement element, double distribution)
 {
     this.element  = element;
     this.quantity = distribution;
 }