internal static void DisplayItem(iPodSharp.ImageItemRecord item, string basepath) { Gtk.Window win = new Gtk.Window("iThumbnail Test"); Gtk.HBox hbox = new Gtk.HBox(); Gtk.VBox vbox = new Gtk.VBox(); win.Add(hbox); hbox.PackStart(vbox); foreach (iPodSharp.ImageDataObjectRecord file in item.Versions) { if (file.Child.CorrelationID > 1) { string path = file.Child.Path.Replace(':', '/'); path = basepath + path; Gdk.Pixbuf thumb = IthmbDb.Load(file.Child.CorrelationID, file.Child.ThumbPosition, file.Child.ThumbSize, path); Gtk.Image image = new Gtk.Image(thumb); vbox.PackStart(image); } } win.ShowAll(); }
public void Dump() { System.Console.WriteLine(dbrec.Datasets.Count); foreach (ImageDataSetRecord dataset in dbrec.Datasets) { ListRecord list = dataset.Record; System.Console.WriteLine("{0}.Count = {1}", list.Name, list.Items.Count); if (list is ImageListRecord) { ImageItemRecord image = ((ImageListRecord)list).Images [0] as ImageItemRecord; IthmbDb.DisplayItem(image, System.IO.Path.GetDirectoryName(this.Path)); foreach (ImageItemRecord iirec in ((ImageListRecord)list).Images) { System.Console.WriteLine("Id = {0}", iirec.Id); foreach (ImageDataObjectRecord file in iirec.Versions) { System.Console.WriteLine(" path={0} size {1} position {2} ID {3}", file.Child.Path, file.Child.ThumbPosition, file.Child.ThumbSize, file.Child.CorrelationID); } } } else if (list is AlbumListRecord) { foreach (AlbumBookRecord book in list.Items) { System.Console.WriteLine("Book Title = {0}", book.Title); foreach (AlbumItemRecord entry in book.Items) { System.Console.WriteLine("entry {0}", entry.Id); } } } } }