image - Load pictures from folder using c# based on filename criterial? -


recently i'm working application, problem faced is:

how can load image folder data grid view based on file date created criteria, file tag.

i appreciate really!

the folder contains pictures is: enter image description here

the controls want load pictures is:

enter image description here

at time date criteria show image based on date file created.

the button clicked show images is:

  private void btn_show_click(object sender, eventargs e)         {          } 

thanks help!

i bet solved question in case didn't here answer:

   public partial class form1 : form    {     imagelist list = new imagelist();      public form1()     {       initializecomponent();       getimages();     }      private void getimages()     {       string path = @"c:\imgfolder";       string[] filter = { ".bmp", ".jpg", ".jpeg", ".png" };       directoryinfo directoryinfo = new directoryinfo(path);       fileinfo[] fileinfo = directoryinfo.getfiles();        arraylist arraylist = new arraylist();        foreach (fileinfo fi in fileinfo.where(f => f.creationtime >= yourfromdatevariable && f.creationtime <= yourtodatevariable))         foreach (string s in filter)           if (s == fi.extension)             arraylist.add(fi.fullname);        //adding files image list:       (int = 0; < arraylist.count; i++)       {         image img = image.fromfile(arraylist[i].tostring());         list.images.add(img);       }     }   } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -