Курсовая работа: Подсистема управления процессами
{
dataGridView1.Rows[i].Cells[4].Value = Math.Round(FreeProcessorTime / HighPriorityProcessCount);
}
}
}
else dataGridView1.Rows[0].Cells[4].Value = "100";
index++;
}
void a_WorkingStateChanged(object sender, EventArgs e)
{
BetaProc b = sender as BetaProc;
manager.SetWaitProperty(b);
}
private void Form1_Load(object sender, EventArgs e)
{
manager.reporterD = dataGridView1;
// Заполняем RadioGroup processType и processPriority объектами RadioButton
RadioButton[] processTypeRadioButtons = new RadioButton[3];
for (int i = 0; i < groupBox1.Controls.Count; i++) processTypeRadioButtons[i] = (RadioButton)groupBox1.Controls[i];
RadioButton[] processPriorityRadioButtons = new RadioButton[5];
for (int i = 0; i < groupBox2.Controls.Count; i++) processPriorityRadioButtons[i] = (RadioButton)groupBox2.Controls[i];
processType = new RadioGroup(processTypeRadioButtons);
processPriority = new RadioGroup(processPriorityRadioButtons);
}
private void button2_Click(object sender, EventArgs e)
{
int processID = (int)dataGridView1.SelectedRows[0].Cells[0].Value - 1;
if (processID != -1 && (string)manager.reporterD.Rows[processID].Cells[3].Value != "Завершен")
{