stify">}
}
public partial class MainView: Form
{
private int n, m, krit, comp, var;
private List > y;
private List paretoSet;
private List paretoSet2;
private Pareto pareto;
public MainView ()
{
InitializeComponent ();
InitComboboxes (2, 20, 1);
y = new List > ();
paretoSet = new List ();
dataGridView1.AllowUserToAddRows = false;
dgA.AllowUserToAddRows = false;
dgK.AllowUserToAddRows = false;
dgX.AllowUserToAddRows = false;
}
private void InitComboboxes (int minimum, int maximum, int step)
{
for (int i = minimum; i
{
comboBox1.Items.Add (i);
comboBox2.Items.Add (i);
comboBox3.Items.Add (i);
comboBox4.Items.Add (i);
comboBox5.Items.Add (i);
}
}
private void button1_Click (object sender, EventArgs e)
{
n = Convert.ToInt32 (comboBox1.Text);
m = Convert.ToInt32 (comboBox2.Text);
dataGridView1.ColumnCount = n;
dataGridView1.RowCount = m;
for (int i = 0; i
dataGridView1.Columns [i]. Name = "k" + (i +1). ToString ();
}
private void GetValuesFromGrid ()
{
y = new List > ();
if (tabControl1.SelectedIndex == 0)
{
for (int i = 0; i
{
var list = new List ();
for (int j = 0; j
list.Add (Convert.ToInt32 (dataGridView1 [j, i]. Value.ToString ()));
y.Add (list);
}
}
else if (tabControl1.SelectedIndex == 1)
{
for (int i = 0; i
{
var list = new List ();
for (int j = 0; j
{
int sum = 0;
...