Esempio n. 1
0
 public FileInfo(string filename)
 {
     Filename = System.IO.Path.GetFileName(filename);
     Path     = System.IO.Path.GetDirectoryName(filename);
     if (FileLineCountHelper.IsText(filename, 8096))
     {
         Count = FileLineCountHelper.GetFileLineCount(filename);
     }
 }
        private void listViewItem_MouseDoubleClick(object sender, RoutedEventArgs e)
        {
            var fileInfo = (sender as ListViewItem).Content as FileInfo;

            if (fileInfo.Count == 0)
            {
                fileInfo.Count = FileLineCountHelper.GetFileLineCount(System.IO.Path.Combine(fileInfo.Path, fileInfo.Filename));
            }
            else
            {
                fileInfo.Count = 0;
            }
            fileInfo.ChangedCount();
        }