public void setValueFromObject() { int num = myScheduling.getNumberProcess(); numericUpDown_QuantumTime.Value = myScheduling.getQuantumTime(); for (int i = 0; i < num; i++) { arrivalTimeArray[i].Value = myScheduling.getArrivalTime(i); burstTimeArray[i].Value = myScheduling.getBrustTime(i); priorityArray[i].Value = myScheduling.getPriority(i); } checkBox_displayChart.Checked = myScheduling.getFlagDisplayChart(); }
public void setData() { int num = myScheduling.getNumberProcess(); for (int i = 0; i < num; i++) { label_Aviral[i].Text = myScheduling.getArrivalTime(i).ToString(); label_Burst[i].Text = myScheduling.getBrustTime(i).ToString(); label_Priority[i].Text = myScheduling.getPriority(i).ToString(); } if (myScheduling.getFlagFCFS()) { lbl_avg_FCFS.Text = "" + myScheduling.getAVG_waitingTimeFCFS().ToString("0.00"); lbl_contextSwitch_FCFS.Text = "" + myScheduling.getContextSwitch_FCFS(); } if (myScheduling.getFlagSJF_P()) { lbl_avg_SJF_P.Text = "" + myScheduling.getAVG_waitingTimePriority_P().ToString("0.00"); lbl_contextSwitch_SJF_P.Text = "" + myScheduling.getContextSwitch_SJF_P(); } if (myScheduling.getFlagSJF_N()) { lbl_avg_SJF_N.Text = "" + myScheduling.getAVG_waitingTimeSJF_N().ToString("0.00"); lbl_contextSwitch_SJF_N.Text = "" + myScheduling.getContextSwitch_SJF_N(); } if (myScheduling.getFlagPriority_P()) { lbl_avg_Priority_P.Text = "" + myScheduling.getAVG_waitingTimePriority_P().ToString("0.00"); lbl_contextSwitch_Priority_P.Text = "" + myScheduling.getContextSwitch_Priority_P(); } if (myScheduling.getFlagPriority_N()) { lbl_avg_Priority_N.Text = "" + myScheduling.getAVG_waitingTimePriority_N().ToString("0.00"); lbl_contextSwitch_Priority_N.Text = "" + myScheduling.getContextSwitch_Priority_N(); } if (myScheduling.getFlagRR()) { lbl_avg_RR.Text = "" + myScheduling.getAVG_waitingTimeRR().ToString("0.00"); lbl_contextSwitch_RR.Text = "" + myScheduling.getContextSwitch_RR(); lbl_quantumTime.Text = "" + myScheduling.getQuantumTime().ToString(); } }