aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs')
-rw-r--r--Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs b/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs
index 3660a18f0..0769b3576 100644
--- a/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs
+++ b/Software/Visual_Studio/Tango.FileSystem/FileExplorerControl.cs
@@ -233,6 +233,22 @@ namespace Tango.FileSystem
public static readonly DependencyProperty RenameCommandInternalProperty =
DependencyProperty.Register("RenameCommandInternal", typeof(ICommand), typeof(FileExplorerControl), new PropertyMetadata(null));
+ public ICommand UploadCommandInternal
+ {
+ get { return (ICommand)GetValue(UploadCommandInternalProperty); }
+ set { SetValue(UploadCommandInternalProperty, value); }
+ }
+ public static readonly DependencyProperty UploadCommandInternalProperty =
+ DependencyProperty.Register("UploadCommandInternal", typeof(ICommand), typeof(FileExplorerControl), new PropertyMetadata(null));
+
+ public ICommand UploadCommand
+ {
+ get { return (ICommand)GetValue(UploadCommandProperty); }
+ set { SetValue(UploadCommandProperty, value); }
+ }
+ public static readonly DependencyProperty UploadCommandProperty =
+ DependencyProperty.Register("UploadCommand", typeof(ICommand), typeof(FileExplorerControl), new PropertyMetadata(null));
+
public bool IsContextMenuOpened
{
get { return (bool)GetValue(IsContextMenuOpenedProperty); }
@@ -395,6 +411,11 @@ namespace Tango.FileSystem
return true;
});
+
+ UploadCommandInternal = new RelayCommand(() =>
+ {
+ UploadCommand?.Execute(null);
+ });
}
private void OnIsContextMenuOpenedChanged()
@@ -408,6 +429,7 @@ namespace Tango.FileSystem
(DeleteCommandInternal as RelayCommand)?.RaiseCanExecuteChanged();
(RenameCommandInternal as RelayCommand)?.RaiseCanExecuteChanged();
(NewFolderCommandInternal as RelayCommand)?.RaiseCanExecuteChanged();
+ (UploadCommandInternal as RelayCommand)?.RaiseCanExecuteChanged();
if (IsContextMenuOpened)
{
@@ -808,6 +830,7 @@ namespace Tango.FileSystem
try
{
+ Debug.WriteLine("Drag Started...");
var ef = DragDrop.DoDragDrop(this, new DataObject(DataFormats.FileDrop, files, false), DragDropEffects.Copy);
}
catch (Exception ex)
@@ -816,6 +839,8 @@ namespace Tango.FileSystem
Debugger.Break();
}
+ Debug.WriteLine("Drag Stopped...");
+
await Task.Delay(3000);
foreach (var watcher in watchers)
@@ -838,6 +863,7 @@ namespace Tango.FileSystem
{
if (IsVisible)
{
+ AllowDrop = true;
await Task.Delay(100);
this.Focus();
Keyboard.Focus(this);