Пример #1
0
        private void btn_ok_number_of_process_Click(object sender, EventArgs e)
        {
            no_of_process     = (int)numeric_numProcess.Value;
            MainFCFSflag      = (bool)radioButton1.Checked;
            RRflag            = (bool)radioButton4.Checked;
            SJF_premptive     = (bool)radioButton3.Checked;
            SJF_non_premptive = (bool)radioButton2.Checked;
            P_premptive       = (bool)radioButton6.Checked;
            P_non_premptive   = (bool)radioButton5.Checked;

            if (RRflag)
            {
                data_input_RR RR_data = new data_input_RR();
                RR_data.Show();
                RR_data.Location = this.Location;
                //form2.StartPosition = this.StartPosition;
                Hide();
            }
            else if (SJF_non_premptive || SJF_premptive || MainFCFSflag)
            {
                data_input_sjf_fcfs data = new data_input_sjf_fcfs();
                data.Show();
                data.Location = this.Location;
                //form2.StartPosition = this.StartPosition;
                Hide();
            }
            else if (P_non_premptive || P_premptive)
            {
                data_input_p data_p = new data_input_p();
                data_p.Show();
                data_p.Location = this.Location;
                //form2.StartPosition = this.StartPosition;
                Hide();
            }
        }
Пример #2
0
 private void btn_back_Click(object sender, EventArgs e)
 {
     if (Form_process.RRflag)
     {
         data_input_RR data = new data_input_RR();
         data.Show();
         Hide();
     }
     else if (Form_process.P_premptive)
     {
         data_input_p data = new data_input_p();
         data.Show();
         Hide();
     }
     else if (Form_process.P_non_premptive)
     {
         data_input_p data = new data_input_p();
         data.Show();
         Hide();
     }
     else if (Form_process.SJF_non_premptive)
     {
         data_input_sjf_fcfs data = new data_input_sjf_fcfs();
         data.Show();
         Hide();
     }
     else if (Form_process.SJF_premptive)
     {
         data_input_sjf_fcfs data = new data_input_sjf_fcfs();
         data.Show();
         Hide();
     }
     else
     {
         data_input_sjf_fcfs data = new data_input_sjf_fcfs();
         data.Show();
         Hide();
     }
 }