private string GetSelectImagePath() { string imageRelativePath = string.Empty; if (this.shellView1.SelectedItems.Count() > 0) { var item = this.shellView1.SelectedItems.First(); for (int ii = 0; ii < this.shellView1.SelectedItems.Count(); ii++) { var kk = shellView1.SelectedItems[ii]; string absolutePath = kk.FileSystemPath; this.selectedImageAbsolutePath = absolutePath; clsFileNanme_info itemn = new clsFileNanme_info(); itemn.FilName = kk.DisplayName; itemn.Filpath = selectedImageAbsolutePath; this.listBox1.Items.Add(itemn.FilName); FilelistResult.Add(itemn); } // this.selectedImage = absolutePath.Substring(EntityPathHelper.ImageBasePath.Length); } return(imageRelativePath); }
public List <clsFileNanme_info> ReadFilelist(ref BackgroundWorker bgWorker) { string ZFCEPath = AppDomain.CurrentDomain.BaseDirectory + "Resources\\scan\\"; FilelistResult = new List <clsFileNanme_info>(); Folder_list = new List <string>(); List <string> Alist1 = GetByfolderName(ZFCEPath); Folder_list = Alist1; for (int j = 0; j < Alist1.Count; j++) { List <string> Alist = GetFileName(Alist1[j] + "\\"); for (int i = 0; i < Alist.Count; i++) { clsFileNanme_info item = new clsFileNanme_info(); item.FilName = Alist[i].Replace(Alist1[j] + "\\", ""); item.Filpath = Alist[i]; item.foldername = Alist1[j].Replace(ZFCEPath, ""); FilelistResult.Add(item); } } // return(FilelistResult); }