| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 | 
							- using Aitex.Core.UI.MVVM;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.CommonData;
 
- using MECF.Framework.Common.Jobs;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.Linq;
 
- using System.Runtime.Serialization;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows;
 
- using System.Windows.Input;
 
- using FurnaceUI.Models;
 
- namespace FurnaceUI.Views.Status
 
- {
 
-     class ProcessJobWithDrawingViewModel : FurnaceUIViewModelBase
 
-     {
 
-         public bool IsPermission { get => this.Permission == 3; }
 
-         [Subscription("Scheduler.CurrentProcessJob")]
 
-         public ProcessJobInfo CurrentProcessJob
 
-         {
 
-             get;
 
-             set;
 
-         }
 
-         public string CurrentProcessJobName
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.Name.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         #region CurrentProcessJobState
 
-         public string CurrentProcessJobState
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.State.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsQueued
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Queued" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsSetUp
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "SetUp" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsProcessing
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Processing" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsProcessingComplete
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "ProcessingComplete" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsStopping
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Stopping" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsPausing
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Pausing" ? "Transparent" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsPaused
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Paused" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobStateIsAborting
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.State.ToString() == "Aborting" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsProcessJob
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return "Green";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsProcessJobforeGround
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessModeIsProcessJob == "Green")
 
-                 {
 
-                     return "White";
 
-                 }
 
-                 return "Black";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsActive
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 else if(CurrentProcessJob.State.ToString() != "Queued")
 
-                 {
 
-                     return "Green";
 
-                 }
 
-                 return "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsActiveforeGround
 
-         {
 
-             get
 
-             {
 
-                 if(CurrentProcessModeIsActive == "Green")
 
-                 {
 
-                     return "White";
 
-                 }
 
-                 return "Black";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsExecuting
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 else if((CurrentProcessJob.State.ToString() == "SetUp") || (CurrentProcessJob.State.ToString() == "Processing") || (CurrentProcessJob.State.ToString() == "ProcessingComplete"))
 
-                 {
 
-                     return "Green";
 
-                 }
 
-                 return "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsExecutingforeGround
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessModeIsExecuting == "Green")
 
-                 {
 
-                     return "White";
 
-                 }
 
-                 return "Black";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsPause
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 else if ((CurrentProcessJob.State.ToString() == "Pausing") || (CurrentProcessJob.State.ToString() == "Paused"))
 
-                 {
 
-                     return "Green";
 
-                 }
 
-                 return "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessModeIsPauseforeGround
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessModeIsPause == "Green")
 
-                 {
 
-                     return "White";
 
-                 }
 
-                 return "Black";
 
-             }
 
-         }
 
-         public string CurrentStartMode
 
-         {
 
-             get
 
-             {
 
-                 if(CurrentProcessJob != null)
 
-                 {
 
-                     if((CurrentProcessJob.State.ToString() == "SetUp") || (CurrentProcessJob.State.ToString() == "Processing") || (CurrentProcessJob.State.ToString() == "ProcessingComplete"))
 
-                     {
 
-                         return "Executing";
 
-                     }
 
-                     else if((CurrentProcessJob.State.ToString() == "Pausing") || (CurrentProcessJob.State.ToString() == "Paused"))
 
-                     {
 
-                         return "Pause";
 
-                     }
 
-                     return "Process Job";
 
-                 }
 
-                 return "Waiting For Start";
 
-             }
 
-         }
 
-         #endregion
 
-         #region CurrentProcessJobProcessingState
 
-         public string CurrentProcessJobProcessingState
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.ProcessingState.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsWaitingMaterial
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "WaitingMaterial" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsWaitingCharge
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "WaitingCharge" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsCoolingBeforeCharge
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "CoolingBeforeCharge" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsCharging
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "Charging" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsWaitingProcess
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "WaitingProcess" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsProcessing
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "Processing" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsCoolingBeforeDischarge
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "CoolingBeforeDischarge" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsWaitingDischarge
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "WaitingDischarge" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         public string CurrentProcessJobProcessingStateIsDischarging
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob == null)
 
-                 {
 
-                     return "Transparent";
 
-                 }
 
-                 return CurrentProcessJob.ProcessingState.ToString() == "Discharging" ? "Green" : "Transparent";
 
-             }
 
-         }
 
-         #endregion
 
-         public string CurrentProcessJobControlJobName
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.ControlJobName.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         public string CurrentProcessJobControlJobProcessRecipe
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.ProcessRecipe.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         public string CurrentProcessJobControlJobLayoutRecipe
 
-         {
 
-             get
 
-             {
 
-                 if (CurrentProcessJob != null)
 
-                 {
 
-                     return CurrentProcessJob.LayoutRecipe.ToString();
 
-                 }
 
-                 return null;
 
-             }
 
-         }
 
-         public ProcessJobWithDrawingViewModel()/* : base("MonitorJobViewModel")*/
 
-         {
 
-             
 
-             
 
-         }
 
-         public void ClosedCmd()
 
-         {
 
-             (GetView() as Window).Close();
 
-         }
 
-     }
 
- }
 
 
  |