private void button4_Click(object sender, EventArgs e)
 {
     DataGridViewRow row;
     if (count == ServersNumber)
     {
         MessageBox.Show("Done 4");
     }
     else
     {
         table[count] = new Server(UsersNumber, int.Parse(textBox4.Text.ToString()));
         for (int i = 0; i < this.dataGridView2.RowCount -1; ++i)
         {
             row = dataGridView2.Rows[i];
             table[count].InsertService(row.Cells["ServiceTime"].Value.ToString());
             table[count].InsertProbability(row.Cells["Probability2"].Value.ToString());
         }
         for (int j = 0; j < dataGridView2.RowCount; j++)
         {
             if (dataGridView2.Rows[0].IsNewRow == false)
                 dataGridView2.Rows.RemoveAt(0);
         }
         table[count].SetCumulative();
         ++count;
     }
 }
Ejemplo n.º 2
0
 private void FormHome_Load(object sender, EventArgs e)
 {
     serverObject = new Server();
 }