aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-17 16:43:40 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-17 16:43:40 +0200
commitae1cfd30f1efbd385eac04b3d02fa1ed161058a3 (patch)
tree5b77d7484e80491b06f1b726a57a61c782b5569e /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons
parent8270aa37dee33cda98603a995de823df393f7294 (diff)
downloadTango-ae1cfd30f1efbd385eac04b3d02fa1ed161058a3.tar.gz
Tango-ae1cfd30f1efbd385eac04b3d02fa1ed161058a3.zip
Add AppButtons to PPC.
Implemented Stop & Start job app buttons!
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StopPrintingButton.cs17
2 files changed, 43 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
new file mode 100644
index 000000000..8efd46e18
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.Integration.Operation;
+using Tango.PPC.Common.Notifications;
+
+namespace Tango.PPC.Jobs.AppButtons
+{
+ public class StartPrintingButton : AppButton
+ {
+ public StartPrintingButton(RelayCommand command, IMachineOperator op) : base("START DYEING", command)
+ {
+ op.StatusChanged += Op_StatusChanged;
+
+ Op_StatusChanged(this, op.Status);
+ }
+
+ private void Op_StatusChanged(object sender, MachineStatuses status)
+ {
+ IsEnabled = status == MachineStatuses.ReadyToDye;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StopPrintingButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StopPrintingButton.cs
new file mode 100644
index 000000000..8c3b444b3
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StopPrintingButton.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Common.Notifications;
+
+namespace Tango.PPC.Jobs.AppButtons
+{
+ public class StopPrintingButton : AppButton
+ {
+ public StopPrintingButton() : base("STOP DYEING", true)
+ {
+
+ }
+ }
+}