Exemple #1
0
 private void btn_ok_quantumTime_Click(object sender, EventArgs e)
 {
     myScheduling.setQuantunTime((int)numeric_quantumTime.Value);
     myScheduling.clearDataRR();
     myScheduling.computeRR();
     if (myScheduling.getFlagDisplayChart())
     {
         clearVisibleLabel();
         putColorInPanel("RR");
     }
     displayRR();
 }
        private void button2_Click(object sender, EventArgs e)
        {
            // Add value to object.
            addDatatoObjectScheduling();
            myScheduling.clearContextSwitch();
            myScheduling.clearArrayData();
            //MessageBox.Show(""+myScheduling.getBrustTime(0)+"  "+myScheduling.getBrustTime(1)+"  "+myScheduling.getBrustTime(2));
            if (myScheduling.getFlagFCFS())
            {
                myScheduling.computeFCFS();
            }
            if (myScheduling.getFlagSJF_N())
            {
                myScheduling.computeSJF_N();
            }
            if (myScheduling.getFlagPriority_N())
            {
                myScheduling.computePriority_N();
            }
            if (myScheduling.getFlagSJF_P())
            {
                myScheduling.computeSJF_P();
            }
            if (myScheduling.getFlagPriority_P())
            {
                myScheduling.computePriority_P();
            }
            if (myScheduling.getFlagRR())
            {
                myScheduling.setQuantunTime((int)numericUpDown_QuantumTime.Value);
                myScheduling.computeRR();
            }
            // MessageBox.Show("" + myScheduling.Debug_FCFS());
            //MessageBox.Show("" + myScheduling.waitingTime_FCFS[0] +" " +myScheduling.waitingTime_FCFS[1] + "  " + myScheduling.waitingTime_FCFS[2]);

            Result_form1 form2 = new Result_form1(myScheduling);

            form2.Show();
            form2.Location = this.Location;
            Hide();
        }