diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-25 17:52:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-25 17:52:49 +0200 |
| commit | 9277bbd2fa070c69b83904f8fe5628fab2b947b8 (patch) | |
| tree | 3099f9ce92f04c28517eb13938e913a1e376b3fe /Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs | |
| parent | f779e2b6f0bb1dedc7644c64651b59e31ce62c00 (diff) | |
| download | Tango-9277bbd2fa070c69b83904f8fe5628fab2b947b8.tar.gz Tango-9277bbd2fa070c69b83904f8fe5628fab2b947b8.zip | |
Working on job export import to storage.
Diffstat (limited to 'Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs | 25 |
1 files changed, 21 insertions, 4 deletions
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<ExplorerFileItem>), 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); } } } |
