aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-29 13:15:09 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-29 13:15:09 +0200
commit9e6d1ddfb42c4e8357bd75c2b1d6f84df1ea1966 (patch)
tree131c98a3b19bfca2ce81259f8921c409fda7bee7 /Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
parentac3c227bb5d12339fee6fb4c243f3a5f67217915 (diff)
downloadTango-9e6d1ddfb42c4e8357bd75c2b1d6f84df1ea1966.tar.gz
Tango-9e6d1ddfb42c4e8357bd75c2b1d6f84df1ea1966.zip
Working on machine studio storage module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
index 72a4b2c87..6a9c5cae4 100644
--- a/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
@@ -21,9 +21,19 @@ namespace Tango.Integration.Storage
}
- internal StorageFileHandler(Action cancelAction)
+ internal StorageFileHandler(StorageFile storageFile, Action cancelAction)
{
_cancelAction = cancelAction;
+ StorageFile = storageFile;
+ }
+
+ public StorageFile StorageFile { get; set; }
+
+ private StorageFileHandlerStatus _status;
+ public StorageFileHandlerStatus Status
+ {
+ get { return _status; }
+ private set { _status = value; RaisePropertyChangedAuto(); }
}
private long _current;
@@ -38,6 +48,11 @@ namespace Tango.Integration.Storage
Current = _current,
Total = _total,
});
+
+ if (Status != StorageFileHandlerStatus.Active)
+ {
+ Status = StorageFileHandlerStatus.Active;
+ }
}
}
@@ -53,21 +68,25 @@ namespace Tango.Integration.Storage
return Task.Factory.StartNew(() =>
{
_cancelAction.Invoke();
- });
+ Status = StorageFileHandlerStatus.Canceled;
+ });
}
internal void RaiseCompleted()
{
+ Status = StorageFileHandlerStatus.Completed;
Completed?.Invoke(this, new EventArgs());
}
internal void RaiseCanceled()
{
+ Status = StorageFileHandlerStatus.Canceled;
Canceled?.Invoke(this, new EventArgs());
}
internal void RaiseFailed(Exception ex)
{
+ Status = StorageFileHandlerStatus.Failed;
Failed?.Invoke(this, ex);
}
}