Example #1
0
 public void View(IDataStream stream)
 {
     foreach (PictureControl old in flowLayoutPanel1.Controls) {
         old.Dispose();
     }
     flowLayoutPanel1.Controls.Clear();
     m_Folder = stream as Folder;
     if (m_Folder != null) {
         PictureControl previous = null;
         PictureControl first = null;
         foreach (FileSystemNode f in m_Folder.GetChildren()) {
             if (f is File && FileTypes.IsPicture(f)) {
                 PictureControl control = new PictureControl();
                 flowLayoutPanel1.Controls.Add(control);
                 control.SetDataStream(f);
                 if (previous != null) {
                     previous.SetNextPictureControl(control);
                 }
                 previous = control;
                 if (first == null) {
                     first = control;
                 }
             }
         }
         if (first != null) {
             first.ViewDataStream();
         }
     }
 }
Example #2
0
 public void SetNextPictureControl(PictureControl next)
 {
     m_Next = next;
 }