Beispiel #1
0
        private void ReadFiles()
        {
            if (!string.IsNullOrEmpty(txtOutputFolder.Text.Trim()) && Directory.Exists(txtOutputFolder.Text.Trim())) {
                ListViewItem thisItem = null;
                FileInfoEx thisInfo = null;

                lstFiles.BeginUpdate();
                lstFiles.Items.Clear();
                var enumerator = new FindFiles.FileSystemEnumerator(txtOutputFolder.Text.Trim(),"*.*", true);
                foreach (FileInfo fi in enumerator.Matches()) {
                    string thisFile = fi.FullName;
                    if ((!IsIgnorable(thisFile))) {
                        thisInfo = new FileInfoEx(thisFile);
                        var _with4 = thisInfo;
                        thisItem = new ListViewItem(_with4.FileInfo.Name, GetImageIndex(_with4.FileInfo.Extension));
                        thisItem.SubItems.Add(_with4.FileVersion);
                        thisItem.SubItems.Add(_with4.FileInfo.Length.ToString());
                        thisItem.SubItems.Add(_with4.FileInfo.LastWriteTime.ToString());
                        thisItem.SubItems.Add(_with4.Hash);
                        thisItem.Checked = (!Settings.Default.IgnoreFiles.Contains(_with4.FileInfo.Name));
                        thisItem.Tag = thisInfo;
                        lstFiles.Items.Add(thisItem);
                    }
                }
                lstFiles.EndUpdate();
            }
        }