aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-26 10:45:22 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-26 10:45:22 +0200
commit58f7128ac32d80cb6baf9bee7389eeef889067ae (patch)
tree5e0f955c814f79800bd7115b677b5042f0a3ffa2 /Software/Visual_Studio/PPC/Modules
parenta70419a35bac0e053278002856499430edbbb598 (diff)
downloadTango-58f7128ac32d80cb6baf9bee7389eeef889067ae.tar.gz
Tango-58f7128ac32d80cb6baf9bee7389eeef889067ae.zip
Working on backup/restore...
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs
index 067e40d08..dd561c5be 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/ViewModels/BackupViewVM.cs
@@ -15,11 +15,11 @@ namespace Tango.PPC.BackupRestore.ViewModels
{
public class BackupViewVM : PPCViewModel
{
+ private String _backupFileName;
+
[TangoInject]
public IBackupManager BackupManager { get; set; }
- public BackupSettings BackupSettings { get; set; }
-
private BackupRestoreProgressEventArgs _currentBackupProgress;
public BackupRestoreProgressEventArgs CurrentBackupProgress
{
@@ -27,7 +27,6 @@ namespace Tango.PPC.BackupRestore.ViewModels
set { _currentBackupProgress = value; RaisePropertyChangedAuto(); }
}
-
private bool _isBackupJobs;
public bool IsBackupJobs
{
@@ -100,6 +99,10 @@ namespace Tango.PPC.BackupRestore.ViewModels
if (IsFree)
{
IsFree = false;
+ await BackupManager.CreateBackup(_backupFileName, BackupName, new BackupSettings()
+ {
+ Mode = IsBackupFull ? BackupMode.Full : BackupMode.Jobs,
+ });
await Task.Delay(10000);
IsFree = true;
}
@@ -107,7 +110,7 @@ namespace Tango.PPC.BackupRestore.ViewModels
public override void OnApplicationStarted()
{
-
+
}
public override void OnApplicationReady()
@@ -137,6 +140,7 @@ namespace Tango.PPC.BackupRestore.ViewModels
if (result != null)
{
+ _backupFileName = result.Path + ExplorerFileDefinition.Backup.Extension;
BackupLocation = System.IO.Path.GetFileNameWithoutExtension(result.Path) + ExplorerFileDefinition.Backup.Extension;
}
}