// Constructor /// <summary> /// Create a new <see cref="GetAmazonThread" />. /// </summary> public GetAmazonThread(CoverGetter getter) { this.getter = getter; queue = Queue.Synchronized(new Queue()); Thread thread = new Thread(new ThreadStart(ThreadFunc)); thread.IsBackground = true; thread.Priority = ThreadPriority.BelowNormal; thread.Start(); }
// Constructor /// <summary> /// Create a new <see cref="GetWebThread" />. /// </summary> /// <param name="getter"> /// A <see cref="CoverGetter" />. /// </param> /// <param name="key"> /// The album key. /// </param> /// <param name="url"> /// The URL from which to download the cover. /// </param> /// <param name="done_func"> /// The delegate to call when the cover is done downloading. /// </param> /// <returns> /// A <see cref="Gdk.Pixbuf" /> of the modified cover. /// </returns> public GetWebThread(CoverGetter getter, string key, string url, GotCoverDelegate done_func) { this.getter = getter; this.key = key; this.url = url; this.done_func = done_func; Thread thread = new Thread(new ThreadStart(ThreadFunc)); thread.IsBackground = true; thread.Priority = ThreadPriority.BelowNormal; thread.Start(); }
// Constructor /// <summary> /// Create a <see cref="CoverDatabase"/ > object. /// </summary> /// <param name="version"> /// Version of the database to use. /// </param> public CoverDatabase(int version) { db = new Database(FileUtils.CoversDBFile, version); covers = new Hashtable(); // Hack to get the GtkStyle Gtk.Label label = new Gtk.Label(String.Empty); label.EnsureStyle(); downloading_pixbuf = label.RenderIcon ("muine-cover-downloading", StockIcons.CoverSize, null); label.Destroy(); getter = new CoverGetter(this); }