-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
267 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Windows.Data; | ||
using ExplorerEx.Model; | ||
using ExplorerEx.Utils; | ||
using HandyControl.Tools.Converter; | ||
|
||
namespace ExplorerEx.Converter; | ||
|
||
internal class FileListViewItemDetails0Converter : IValueConverter { | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { | ||
switch (value) { | ||
case DiskDriveItem ddi: | ||
if (ddi.Drive.IsReady) { | ||
return ddi.Drive.DriveFormat; | ||
} | ||
return string.Empty; | ||
case FileSystemItem fsi: | ||
return "DateModified".L() + ":".L() + fsi.DateModified; | ||
default: | ||
return string.Empty; | ||
} | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
internal class FileListViewItemDetails1Converter : IValueConverter { | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { | ||
switch (value) { | ||
case DiskDriveItem ddi: | ||
if (ddi.Drive.IsReady) { | ||
return string.Format("...FreeOf...".L(), Long2FileSizeConverter.StaticConvert(ddi.FreeSpace), Long2FileSizeConverter.StaticConvert(ddi.TotalSpace)); | ||
} | ||
return string.Empty; | ||
case FileListViewItem flv: | ||
return flv.FileSize == -1 ? string.Empty : "FileSize".L() + ":".L() + Long2FileSizeConverter.StaticConvert(flv.FileSize); | ||
default: | ||
return string.Empty; | ||
} | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { | ||
throw new NotImplementedException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.