aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 18:06:43 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 18:06:43 +0300
commit5e66f7f601bfbb2f4d46b7b379fd37a5cb88d0bf (patch)
treec6fa1f4bcf331d3d36b8f92798e1edac81d90b61 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
parent9c5f5c1351c78536b54df2c90742efae19f00b59 (diff)
downloadTango-5e66f7f601bfbb2f4d46b7b379fd37a5cb88d0bf.tar.gz
Tango-5e66f7f601bfbb2f4d46b7b379fd37a5cb88d0bf.zip
Working on machine setup.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs27
1 files changed, 20 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
index f469fb799..dc5164465 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
@@ -37,10 +37,17 @@ namespace Tango.PPC.Common.MachineSetup
}
private double _downloadProgress;
- public double DownloadProgress
+ public double UpdatingPackagesProgress
{
get { return _downloadProgress; }
- set { _downloadProgress = value; RaisePropertyChangedAuto(); }
+ private set { _downloadProgress = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _updatingPackagesStatus;
+ public String UpdatingPackagesStatus
+ {
+ get { return _updatingPackagesStatus; }
+ set { _updatingPackagesStatus = value; RaisePropertyChangedAuto(); }
}
public Task Setup(string serialNumber, string machineServiceAddress)
@@ -49,7 +56,9 @@ namespace Tango.PPC.Common.MachineSetup
{
//Connect to machine service and get matching packages for this machine.
- CurrentStep = MachineSetupSteps.DownloadingPackage;
+ CurrentStep = MachineSetupSteps.UpdatingPackages;
+ UpdatingPackagesProgress = 0;
+ UpdatingPackagesStatus = "Connecting to machine service...";
MachineSetupRequest request = new MachineSetupRequest();
request.SerialNumber = serialNumber;
@@ -72,15 +81,17 @@ namespace Tango.PPC.Common.MachineSetup
//Download software package.
var tempFile = TemporaryManager.CreateFile(".zip");
+ UpdatingPackagesStatus = "Downloading application package...";
+
int fileSize = 0;
- DownloadProgress = 0;
+ UpdatingPackagesProgress = 0;
using (FileStreamWrapper fs = new FileStreamWrapper(tempFile.Path, FileMode.Create, (current) =>
{
InvokeUINow(() =>
{
Thread.Sleep(10);
- DownloadProgress = ((double)current / (double)fileSize) * 100d;
+ UpdatingPackagesProgress = ((double)current / (double)fileSize) * 100d;
});
}))
{
@@ -102,15 +113,17 @@ namespace Tango.PPC.Common.MachineSetup
//Download embedded package.
tempFile = TemporaryManager.CreateFile(".zip");
+ UpdatingPackagesStatus = "Downloading embedded package...";
+
fileSize = 0;
- DownloadProgress = 0;
+ UpdatingPackagesProgress = 0;
using (FileStreamWrapper fs = new FileStreamWrapper(tempFile.Path, FileMode.Create, (current) =>
{
InvokeUINow(() =>
{
Thread.Sleep(10);
- DownloadProgress = ((double)current / (double)fileSize) * 100d;
+ UpdatingPackagesProgress = ((double)current / (double)fileSize) * 100d;
});
}))
{