private void button4_Click(object sender, EventArgs e) { while (q.Count() > 0) { q.Clear(); listBox1.Items.Clear(); } q = new Piramida <int>(); }
private void button2_Click(object sender, EventArgs e) { if (q.Count() == 0) { MessageBox.Show("Элементов больше нет"); // q = new Piramida<int>(); q = new Piramida <int>(); } try { q.Remove_max(); listBox1.Items.Clear(); for (int i = 0; i < q.Count(); i++) { listBox1.Items.Add(q.GetQ[i]); } } catch { label2.Text = Convert.ToString(0); } }
public Model(double intens, int b_min, int b_max) { queue = new SimpleQ <Process>(); ready_pr = new Piramida <Process>(); clock = new Clock(); cpu = new CPU(); resource = new Resource(); planner = new Planner(cpu, ready_pr); rand = new Random(); pl = new Rc_planner(resource, queue); intensive = intens; burst_min = b_min; burst_max = b_max; zadania = 0; max_length = 0; takt = 0; p = 0; srednee_waiting = 0; res = 0; srednee_oborot = 0; res1 = 0; }
public Planner(CPU centr_rp, Piramida <Process> p) { cpu = centr_rp; piramida = p; }