Beispiel #1
0
        protected void OnSelectScheduler(object sender, EventArgs e)
        {
            switch (((ComboBox)sender).ActiveText)
            {
            case "SJF":
                if (sjf != null)
                {
                    escalonadPlot.AnimateData(sjf, true, "SJF");
                }
                break;

            case "RR":
                if (rr != null)
                {
                    escalonadPlot.AnimateData(rr, true, "Round Robin / Quantum: " + ((int)quantum).ToString());
                }
                break;

            case "FCFS":
                if (fcfs != null)
                {
                    escalonadPlot.AnimateData(fcfs, true, "FCFS");
                }
                break;
            }
        }
Beispiel #2
0
    protected void OnSelectScheduler(object sender, EventArgs e)
    {
        escalonadPlot.Pause();
        switch (((ComboBox)sender).ActiveText)
        {
        case "Benchmark":
            MediaButtonSensitibe(false);

            GenereteList(responseTimeFCFS, turnarondTimeFCFS, waitTimeFCFS, out List <double> fcfsTime);

            GenereteList(responseTimeSJF, turnarondTimeSJF, waitTimeSJF, out List <double> sjfTime);

            GenereteList(responseTimeRR, turnarondTimeRR, waitTimeRR, out List <double> rrTime);

            GenereteList("Tempo de Resposta", "Tempo de Vida", "Tempo de Espera", out List <string> text);

            escalonadPlot.AnimateData(fcfsTime, sjfTime, rrTime, text, "Benchmark");
            break;

        case "SJF":
            MediaButtonSensitibe(true);
            if (sjf != null)
            {
                escalonadPlot.AnimateData(sjf, true, "SJF", plot.YLabel);
            }
            break;

        case "RR":
            MediaButtonSensitibe(true);
            if (rr != null)
            {
                escalonadPlot.AnimateData(rr, true, "Round Robin / Quantum: " + ((int)quantumScale.Value).ToString(), plot.YLabel);
            }
            break;

        case "FCFS":
            MediaButtonSensitibe(true);
            if (fcfs != null)
            {
                escalonadPlot.AnimateData(fcfs, true, "FCFS", plot.YLabel);
            }
            break;
        }
    }
Beispiel #3
0
        public ImportView(SchedulersResult result) :
            base(WindowType.Toplevel)
        {
            Build();
            fcfs    = result.FCFS.ConvertAll((input) => { return(new PlotableProcess(input.Name, input.execTime)); });
            sjf     = result.SJF.ConvertAll((input) => { return(new PlotableProcess(input.Name, input.execTime)); });
            rr      = result.RR.ConvertAll((input) => { return(new PlotableProcess(input.Name, input.execTime)); });
            quantum = result.Quantum;

            escalonadPlot = new PlotInterface(vbox1);
            escalonadPlot.AnimateData(fcfs, true, "FCFS");
        }