private void loadDisplay() { if (index != null) { if (pesStore != null) { pesStore.Clear(); } foreach (DataFile f in index.DataFiles) { if (f.Status == FileStatus.InLibrary) { log.DebugFormat("Loading file {0}.", f.IconPath); Gdk.Pixbuf icon = new Gdk.Pixbuf(f.IconPath); int w, h; w = h = 255; if (icon.Width < icon.Height) { w = (icon.Width * w) / icon.Height; } else { h = (icon.Height * h) / icon.Width; } icon = icon.ScaleSimple(w, h, InterpType.Bilinear); log.DebugFormat("Loaded file {0}. Adding to node view.", f.FileName); log.DebugFormat("Size of pixbuf {0}x{1}", icon.Width, icon.Height); if (pesStore != null) { PesFile pf = new PesFile(icon, f.FileName + "\n" + "Test"); ResizeIcon += new ResizeIconDelegate(pf.ResizeIcon); pesStore.AddNode(pf); } } } pesView.NodeStore = pesStore; } }
private void loadDisplay() { if (index != null) { if (pesStore != null) pesStore.Clear(); foreach (DataFile f in index.DataFiles) { if (f.Status == FileStatus.InLibrary) { log.DebugFormat("Loading file {0}.", f.IconPath); Gdk.Pixbuf icon = new Gdk.Pixbuf(f.IconPath); int w, h; w = h = 255; if (icon.Width < icon.Height) w = (icon.Width * w) / icon.Height; else h = (icon.Height * h) / icon.Width; icon = icon.ScaleSimple(w, h, InterpType.Bilinear); log.DebugFormat("Loaded file {0}. Adding to node view.", f.FileName); log.DebugFormat("Size of pixbuf {0}x{1}", icon.Width, icon.Height); if (pesStore != null) { PesFile pf = new PesFile(icon, f.FileName + "\n" + "Test"); ResizeIcon += new ResizeIconDelegate(pf.ResizeIcon); pesStore.AddNode(pf); } } } pesView.NodeStore = pesStore; } }