コード例 #1
0
ファイル: PictureControl.cs プロジェクト: JoeyScarr/kickass
 public new void Dispose()
 {
     if (p != null) {
         p.Dispose();
         p = null;
         m_Disposed = true;
     }
 }
コード例 #2
0
ファイル: PictureControl.cs プロジェクト: JoeyScarr/kickass
 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);
 }
コード例 #3
0
ファイル: PictureControl.cs プロジェクト: JoeyScarr/kickass
 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);
     }
 }