aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
index 6be4ba4ca..ab4fd8e0b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs
@@ -38,6 +38,7 @@ namespace Tango.MachineStudio.UI.ViewModels
public class UpdateViewVM : ViewModel
{
private String _appPath = AppDomain.CurrentDomain.BaseDirectory;
+ private LogManager logManager = LogManager.Default;
private INotificationProvider _notification;
private INavigationManager _navigation;
@@ -147,7 +148,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error while checking for version update!");
+ logManager.Log(ex, "Error while checking for version update!");
Status = UpdateStatus.Error;
}
finally
@@ -187,7 +188,7 @@ namespace Tango.MachineStudio.UI.ViewModels
try
{
- LogManager.Log("Creating temporary file " + tempFile);
+ logManager.Log("Creating temporary file " + tempFile);
int fileSize = 0;
@@ -202,12 +203,12 @@ namespace Tango.MachineStudio.UI.ViewModels
{
using (FtpClient ftp = new FtpClient(_updateInfo.FtpHost, _updateInfo.UserName, _updateInfo.Password))
{
- LogManager.Log("Connecting to FTP site: " + _updateInfo.FtpHost);
+ logManager.Log("Connecting to FTP site: " + _updateInfo.FtpHost);
ftp.ConnectAsync().Wait();
- LogManager.Log("Retrieving download size...");
+ logManager.Log("Retrieving download size...");
fileSize = (int)ftp.GetFileSize(_updateInfo.FilePath);
- LogManager.Log("Download size: " + fileSize + " bytes.");
- LogManager.Log("Starting download...");
+ logManager.Log("Download size: " + fileSize + " bytes.");
+ logManager.Log("Starting download...");
ftp.DownloadAsync(fs, _updateInfo.FilePath).Wait();
}
}
@@ -225,7 +226,7 @@ namespace Tango.MachineStudio.UI.ViewModels
{
if (args.EventType == ZipProgressEventType.Extracting_AfterExtractEntry)
{
- LogManager.Log("Extracting " + Path.GetFileName(args.CurrentEntry.FileName));
+ logManager.Log("Extracting " + Path.GetFileName(args.CurrentEntry.FileName));
UpdateProgress = ((double)(currentEntry++) / (double)zip.Entries.Count) * 100d;
}
};
@@ -250,7 +251,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
catch
{
- LogManager.Log("Could not extract file " + entry.FileName);
+ logManager.Log("Could not extract file " + entry.FileName);
}
}
}
@@ -260,7 +261,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error while extracting update package.");
+ logManager.Log(ex, "Error while extracting update package.");
Status = UpdateStatus.Error;
}
finally