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(); }
private void btn_FCFS_Click(object sender, EventArgs e) { setColorButtonMenu(); setVisibleQuantumTime(false); btn_FCFS.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { clearGanttChart(); putColorInPanel("FCFS"); } displayFCFS(); }
public Result_form1(ProcessesScheduling myScheduling) { InitializeComponent(); this.myScheduling = myScheduling; panelExColorProcess = new Panel[10]; processWaitingTime = new Label[10]; processTurnaroundTime = new Label[10]; label_process = new Label[10]; accessContent(); setVisibleContent(); setVisibleLanguageBar(); //set init Language. if (myScheduling.language == "EN") { comboBox_language.SelectedIndex = 0; } else if (myScheduling.language == "TH") { comboBox_language.SelectedIndex = 1; } setLanguage(); panelArray = new Panel[myScheduling.number_ganttChart]; valueGanttChart = new Label[myScheduling.number_ganttChart]; setEnableButtonMenu(); setColorButtonMenu(); setVisibleQuantumTime(false); // Check want display Gantt Chart. if (myScheduling.getFlagDisplayChart()) { DrawGanttChart(); } if (myScheduling.getFlagFCFS()) { btn_FCFS.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("FCFS"); } displayFCFS(); } else if (myScheduling.getFlagSJF_P()) { btn_SJF_P.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("SJF_P"); } displaySJF_P(); } else if (myScheduling.getFlagSJF_N()) { btn_SJF_N.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("SJF_N"); } displaySJF_N(); } else if (myScheduling.getFlagPriority_P()) { btn_Priority_P.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("Priority_P"); } displayPriority_P(); } else if (myScheduling.getFlagPriority_N()) { btn_Priority_N.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("Priority_N"); } displayPriority_N(); } else if (myScheduling.getFlagRR()) { setVisibleQuantumTime(true); numeric_quantumTime.Value = myScheduling.getQuantumTime(); btn_RR.BackColor = color_btn_choose; if (myScheduling.getFlagDisplayChart()) { putColorInPanel("RR"); } displayRR(); } }