From 52813618e140c921ff653d9c227c35032207b495 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 15 Apr 2020 04:54:52 +0300 Subject: FSE Firmware FileSystem. --- Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs') diff --git a/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs b/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs index 0a7fe8ddc..58d0772f5 100644 --- a/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs +++ b/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs @@ -305,6 +305,14 @@ namespace Tango.FileSystem public static readonly DependencyProperty SelectionModeProperty = DependencyProperty.Register("SelectionMode", typeof(SelectionMode), typeof(FileExplorerControl), new PropertyMetadata(SelectionMode.Extended)); + public bool AllowFolderDownload + { + get { return (bool)GetValue(AllowFolderDownloadProperty); } + set { SetValue(AllowFolderDownloadProperty, value); } + } + public static readonly DependencyProperty AllowFolderDownloadProperty = + DependencyProperty.Register("AllowFolderDownload", typeof(bool), typeof(FileExplorerControl), new PropertyMetadata(true)); + static FileExplorerControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(FileExplorerControl), new FrameworkPropertyMetadata(typeof(FileExplorerControl))); @@ -369,7 +377,7 @@ namespace Tango.FileSystem DownloadCommand?.Execute(SelectedItems.ToList()); - }, () => SelectedItems != null && SelectedItems.Count > 0 && SelectedItems.All(x => x.Type != FileSystemItemType.Drive)); + }, () => SelectedItems != null && SelectedItems.Count > 0 && SelectedItems.All(x => x.Type != FileSystemItemType.Drive && (AllowFolderDownload || x.Type == FileSystemItemType.File))); OpenCommand = new RelayCommand(() => { -- cgit v1.3.1