From 58f79af3b62e7737191205e029ccdc8fb79c40cc Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 23 Jan 2020 16:53:51 +0200 Subject: Fixed a bug with none site for machine. Added Job run designation, source, uploading, heating time... --- .../ViewModels/MainViewVM.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index bd08e3e7c..e0d99d0f0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -610,8 +610,10 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } } - Sites = await ActiveMachineAdapter.Context.Sites.ToListAsync(); - Sites.Insert(0, new Site() { Name = "NONE", ID = -1 }); + var sites = await ActiveMachineAdapter.Context.Sites.ToListAsync(); + sites.Insert(0, new Site() { Name = "NONE", ID = -1 }); + + Sites = sites; SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid); ColorCalibrationViewVM = new ColorCalibrationViewVM(_notification, ActiveMachine, _activeMachineAdapter.Context) @@ -627,8 +629,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels HardwareConfigurationViewVM.Init(ActiveMachine.Configuration); } - await MachineUpdatesViewVM.Init(ActiveMachine, ActiveMachineAdapter.Context); - TupViewVM.Init(ActiveMachine); + if (!IsNewMachine) + { + await MachineUpdatesViewVM.Init(ActiveMachine, ActiveMachineAdapter.Context); + TupViewVM.Init(ActiveMachine); + } ActiveMachine.Configuration.HardwareVersionChanged += Configuration_HardwareVersionChanged; -- cgit v1.3.1