From 9277bbd2fa070c69b83904f8fe5628fab2b947b8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 25 Nov 2018 17:52:49 +0200 Subject: Working on job export import to storage. --- .../Tango.Explorer/ExplorerControl.cs | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs') diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs index d84138e0f..77116e94c 100644 --- a/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs @@ -61,6 +61,23 @@ namespace Tango.Explorer public static readonly DependencyProperty FileSelectedCommandProperty = DependencyProperty.Register("FileSelectedCommand", typeof(RelayCommand), typeof(ExplorerControl), new PropertyMetadata(null)); + public String Filter + { + get { return (String)GetValue(FilterProperty); } + set { SetValue(FilterProperty, value); } + } + public static readonly DependencyProperty FilterProperty = + DependencyProperty.Register("Filter", typeof(String), typeof(ExplorerControl), new PropertyMetadata(null)); + + public bool EnableFileSelection + { + get { return (bool)GetValue(EnableFileSelectionProperty); } + set { SetValue(EnableFileSelectionProperty, value); } + } + public static readonly DependencyProperty EnableFileSelectionProperty = + DependencyProperty.Register("EnableFileSelection", typeof(bool), typeof(ExplorerControl), new PropertyMetadata(true)); + + static ExplorerControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ExplorerControl), new FrameworkPropertyMetadata(typeof(ExplorerControl))); @@ -83,7 +100,7 @@ namespace Tango.Explorer } else if (Directory.Exists(CurrentPath)) { - CurrentFolder = ExplorerFolderItem.LoadFromPath(CurrentPath); + CurrentFolder = ExplorerFolderItem.LoadFromPath(CurrentPath, Filter); } _changing_current_path = false; @@ -107,11 +124,11 @@ namespace Tango.Explorer if (SelectedItem is ExplorerFolderItem) { var folder = SelectedItem as ExplorerFolderItem; - folder = ExplorerFolderItem.LoadFromPath(folder.Path); + folder = ExplorerFolderItem.LoadFromPath(folder.Path, Filter); CurrentFolder = folder; SelectedItem = null; } - else if (SelectedItem is ExplorerFileItem) + else if (SelectedItem is ExplorerFileItem && EnableFileSelection) { FileSelectedCommand?.Execute(SelectedItem); } @@ -126,7 +143,7 @@ namespace Tango.Explorer if (parentPath != null) { - CurrentFolder = ExplorerFolderItem.LoadFromPath(parentPath); + CurrentFolder = ExplorerFolderItem.LoadFromPath(parentPath, Filter); } } } -- cgit v1.3.1