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"); }
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(); }
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); }
private static void ExportTo(int index, string path, string name, string extension, ComboBox box, PlotInterface @interface) { box.Active = index; @interface.ExportPNG(path + name + extension); }
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(); } }