private void btnAddMultivariateDistribution_Click(object sender, EventArgs e)
        {
            MultivariateDistributionSettingsForm multivariateDistribution = new MultivariateDistributionSettingsForm(false, true);

            if (multivariateDistribution.ShowDialog(this) == DialogResult.OK)
            {
                var data = multivariateDistribution.GetFunctionArgument();
                _argumentsMultivariateSource.Add(data);
                _argumentsMultivariateSource.MoveLast();
            }
        }
 private void dataGridMultivariateDistributions_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex >= 0 && e.ColumnIndex >= 0)
     {
         if (dataGridMultivariateDistributions.Rows[e.RowIndex].DataBoundItem is MultivariateDistributionFunctionArgument current)
         {
             MultivariateDistributionSettingsForm multivariateDistribution = new MultivariateDistributionSettingsForm(current);
             if (multivariateDistribution.ShowDialog(this) == DialogResult.OK)
             {
                 var edited = multivariateDistribution.GetFunctionArgument();
                 current.Arguments = edited.Arguments;
                 current.MultivariateDistributionSettings = edited.MultivariateDistributionSettings;
                 dataGridMultivariateDistributions.InvalidateRow(e.RowIndex);
             }
         }
     }
 }