public new void Dispose() { if (p != null) { p.Dispose(); p = null; m_Disposed = true; } }
public void View(IDataStream stream) { if (stream is FileSystemNode) { lCaption.Text = ((FileSystemNode)stream).Name; } p = new Picture(stream); Thread t = new Thread(delegate(object o) { Picture pic = (Picture)o; System.Drawing.Image i = pic.GetImage(); if (i != null) { this.Invoke(new Action(delegate() { SetImage(i); lLoading.Visible = false; })); } }); t.Start(p); }
public void ViewDataStream() { if (!m_Disposed) { p = new Picture(m_Stream); Thread t = new Thread(delegate(object o) { Picture pic = (Picture)o; System.Drawing.Image i = pic.GetImage(); this.Invoke(new Action(delegate() { if (i != null) { SetImage(i); } lLoading.Visible = false; if (m_Next != null) { m_Next.ViewDataStream(); } })); }); t.Start(p); } }