Ejemplo n.º 1
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");
        }
Ejemplo n.º 2
0
    public MainWindow() : base(WindowType.Toplevel)
    {
        Build();
        creationController = new CreationController(new List <ComboBox>
        {
            dirCreatorEntry,
            directoryEntry
        },
                                                    scrolledWindow);

        plot          = new PlotInterface(plotBox);
        escalonadPlot = new PlotInterface(plotBox, AtualizeAnimCallBack);
        DisableAll();
    }
Ejemplo n.º 3
0
        public static string ExportALL <T>(List <T> fcfs, List <T> sjf, List <T> rr, string extension, ComboBox box, PlotInterface @interface)
        {
            if (fcfs != null && sjf != null && rr != null)
            {
                if (GTKUtils.ShowFolderChooser(out string path))
                {
                    string[] names =
                    {
                        "FCFS", "SJF", "RR", "Benchmark",
                    };

                    for (int i = 0; i < names.Length; i++)
                    {
                        ExportTo(i, path, names[i], extension, box, @interface);
                    }

                    return(path);
                }
            }
            else
            {
                NotProcess();
            }

            return(null);
        }
Ejemplo n.º 4
0
 private static void ExportTo(int index, string path, string name, string extension, ComboBox box, PlotInterface @interface)
 {
     box.Active = index;
     @interface.ExportPNG(path + name + extension);
 }
Ejemplo n.º 5
0
 public static void Export <T>(List <T> toExport, int index, string extension, ComboBox box, PlotInterface @interface)
 {
     if (toExport != null)
     {
         if (GTKUtils.ShowFileChooser(out string path, extension, "Salvar Como...", "Salvar"))
         {
             ExportTo(index, path, "", "", box, @interface);
         }
     }
     else
     {
         NotProcess();
     }
 }