aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.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/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.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/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
index b009762b4..6a05eee12 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs
@@ -30,6 +30,7 @@ using Tango.PPC.Common.Models;
using Tango.Logging;
using Tango.PPC.Common.Messages;
using Tango.BL.Builders;
+using Tango.PPC.Jobs.AppButtons;
namespace Tango.PPC.Jobs.ViewModels
{
@@ -45,6 +46,7 @@ namespace Tango.PPC.Jobs.ViewModels
private Job _job_to_load;
private JobNavigationIntent _job_to_load_intent;
private static Dictionary<String, List<FineTuneItem>> _jobs_fine_tune_items;
+ private StartPrintingButton _start_printing_btn;
#region Properties
@@ -458,6 +460,8 @@ namespace Tango.PPC.Jobs.ViewModels
LogManager.Log("Directing view to display fine tuning region.");
View.DisplayFineTuning();
}
+
+ DyeCommand.RaiseCanExecuteChanged();
}
catch (Exception ex)
{
@@ -888,6 +892,11 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
private void ResetFineTuning()
{
+ if (Job != null && _jobs_fine_tune_items.ContainsKey(Job.Guid))
+ {
+ _jobs_fine_tune_items.Remove(Job.Guid);
+ }
+
SyncFineTuneItemsToBrushStops();
}
@@ -1012,6 +1021,8 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
public override void OnNavigatedTo()
{
+ _start_printing_btn.Push();
+
base.OnNavigatedTo();
LoadJob();
}
@@ -1021,6 +1032,8 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
public override void OnNavigatedFrom()
{
+ _start_printing_btn.Pop();
+
base.OnNavigatedFrom();
_job_to_load_intent = JobNavigationIntent.Default;
}
@@ -1050,6 +1063,12 @@ namespace Tango.PPC.Jobs.ViewModels
return result;
}
+ public override void OnApplicationReady()
+ {
+ base.OnApplicationReady();
+
+ _start_printing_btn = new StartPrintingButton(DyeCommand, MachineProvider.MachineOperator);
+ }
#endregion
#region INavigationObjectReceiver