Esempio n. 1
0
        public override void Refresh()
        {
            this.DriveInfo = new DriveInfo(Path.GetPathRoot(this.DirInfo.FullName));

            this.Icon = FsInfoFormat.GetFsItemIcon(this.DirInfo.FullName, true, out var descr);
            if (string.IsNullOrWhiteSpace(this.DriveInfo.VolumeLabel))
            {
                this.VolumeDescription = descr;
            }
            else
            {
                this.VolumeDescription = this.DriveInfo.VolumeLabel + ":" + descr;
            }


            this.RaizePropertyChanged("DriveInfo");
            this.RaizePropertyChanged("VolumeDescription");
            this.RaizePropertyChanged("Icon");

            base.Refresh();
        }
Esempio n. 2
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is string filePath && File.Exists(filePath))
     {
         return(FsInfoFormat.GetFsItemIcon(filePath, this.Small, out var descr));
     }