aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-01-02 08:47:29 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-01-02 08:47:29 +0200
commit520e878bf98efcec9c75abcfe483175ff72620a2 (patch)
tree62a7221e3c22187821f6a5e399eca0f7bd31168a /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
parent30574fe4a6e1bb4f60a43e9000acaf919811689a (diff)
parent25f5e6ddef7ef2fa0a747305847eeb4ceee5a2c9 (diff)
downloadTango-520e878bf98efcec9c75abcfe483175ff72620a2.tar.gz
Tango-520e878bf98efcec9c75abcfe483175ff72620a2.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index 70378a4d5..e3a8b4e7c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -359,16 +359,14 @@ namespace Tango.MachineStudio.UI.ViewModels
{
if (_authenticationProvider.CurrentUser != null)
{
- var service = UpdateServiceHelper.GetUpdateServiceChannel();
- var client = service.CreateChannel();
+ var client = new MachineStudioUpdateService();
CheckForUpdatesResponse response = client.CheckForUpdates(new CheckForUpdatesRequest()
{
- Email = _authenticationProvider.CurrentUser.Email,
- Password = _authenticationProvider.CurrentUser.Password,
+ AccessToken = _authenticationProvider.AccessToken,
Version = _applicationManager.Version.ToString(),
AcceptBetaRelease = _settings.AcceptBetaRelease,
- });
+ }).Result;
IsUpdateAvailable = response.IsUpdateAvailable;
LatestVersion = response.Version;
@@ -453,6 +451,13 @@ namespace Tango.MachineStudio.UI.ViewModels
if (x.SelectedMachine.RequiresAuthentication)
{
+ //Check machine exist on my database first
+ if (x.SelectedMachine.Machine == null)
+ {
+ _notificationProvider.ShowError($"The specified machine '{x.SelectedMachine.SerialNumber}' could not be found on the database. Aborting connection.");
+ return;
+ }
+
_notificationProvider.ShowModalDialog<MachineLoginViewVM>(async (login) =>
{
using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.ToString() + "..."))