@@ -428,6 +428,8 @@ public void SetDirectory(string path, bool addPrevPath = false)
428
428
for ( int i = 0 ; i < currentFiles . Length ; i ++ )
429
429
{
430
430
var file = currentFiles [ i ] ;
431
+ file . CurrentPath = currentPath ;
432
+
431
433
var fileNode = new TreeNode ( file . ToString ( ) ) ;
432
434
fileNode . Tag = file ;
433
435
fileNode . ImageIndex = file . IsDirectory ? 0 : 1 ;
@@ -514,6 +516,15 @@ protected override void OnDrawNode(DrawTreeNodeEventArgs e)
514
516
if ( fInfo == null )
515
517
return ;
516
518
519
+ e . Graphics . uwfDrawString (
520
+ fInfo . LastWriteTime . ToString ( "dd.MM.yyyy HH:mm" ) ,
521
+ Font ,
522
+ e . Node . ForeColor ,
523
+ selectionBounds . X + 460 ,
524
+ selectionBounds . Y ,
525
+ 200 ,
526
+ selectionBounds . Height ) ;
527
+
517
528
e . Graphics . uwfDrawString (
518
529
HumanizeBytes ( fInfo . Length ) ,
519
530
Font ,
@@ -527,12 +538,9 @@ protected override void OnDrawNode(DrawTreeNodeEventArgs e)
527
538
528
539
private static string HumanizeBytes ( long bytes )
529
540
{
530
- if ( bytes < 1024 )
531
- return " 1KB" ;
532
- if ( bytes < 1024 * 1024 )
533
- return ( bytes / 1024 ) + " KB" ;
541
+ if ( bytes < 1024 ) return " 1 KB" ;
534
542
535
- return "WE ";
543
+ return bytes / 1024 + " KB ";
536
544
}
537
545
}
538
546
}
@@ -545,16 +553,20 @@ public System.IO.FileInfo Info
545
553
{
546
554
get
547
555
{
548
- if ( info == null )
549
- info = new System . IO . FileInfo ( Name ) ;
556
+ if ( IsDirectory )
557
+ return null ;
558
+
559
+ if ( info == null && System . IO . File . Exists ( CurrentPath + Name ) )
560
+ info = new System . IO . FileInfo ( CurrentPath + Name ) ;
550
561
551
562
return info ;
552
563
}
553
564
}
554
565
#endif
555
-
556
- public bool IsDirectory { get ; set ; }
557
- public string Name { get ; set ; }
566
+
567
+ public string CurrentPath ;
568
+ public bool IsDirectory ;
569
+ public string Name ;
558
570
559
571
public override string ToString ( )
560
572
{
0 commit comments