Пример #1
0
 private void RowTextBox_TextChanged(object sender, EventArgs e)
 {
     if (verifyNumber(this.rowTextBox.Text.ToString()))
     {
         EventArgsRowsAmount args = new EventArgsRowsAmount();
         args.AmountOfRows = Convert.ToInt32(this.rowTextBox.Text.ToString());
         AmountOfRows?.Invoke(this, args);
     }
 }
Пример #2
0
        private void PopInfoTable_AmountOfRowsChanged(object sender, EventArgsRowsAmount e)
        {
            int currRows = genetictable.GetGeneticTableAmountOfRows();

            if (currRows < e.AmountOfRows && e.AmountOfRows > 0)
            {
                //add rows
                var deltaInRows = e.AmountOfRows - currRows;
                genetictable.AddTableRow(deltaInRows, TableRowType.GeneticDataRow);
            }
            else if (currRows > e.AmountOfRows && e.AmountOfRows > 0)
            {
                //delete rows
                var deltaInRows = currRows - e.AmountOfRows;
                genetictable.DeleteTableRow(deltaInRows);
            }
        }