예제 #1
0
        static public string GetRobotWorkerStatusText(RobotWorkerStatus RWS)
        {
            //TODO: fix
            switch (RWS)
            {
            case RobotWorkerStatus.Stopping:
                return("Stopping");

            case RobotWorkerStatus.Stopped:
                return("Stopped");

            case RobotWorkerStatus.WaitingForQueuedItems:
                return("Waiting for queued items");

            case RobotWorkerStatus.RunningJob:
                return("Running Job");

            case RobotWorkerStatus.FinishRunningJob:
                return("Finish running job");

            case RobotWorkerStatus.Pausing:
                return("Pausing");

            case RobotWorkerStatus.Paused:
                return("Paused");

            default:
                return("Stopped");
            }
        }
예제 #2
0
        //The event-invoking method that derived classes can override.


        public virtual void OnStatusChanged(RobotWorkerStatusChangeEventArgs e)
        {
            this._Status = e.RobotWorkerStatus;
            // Make a temporary copy of the event to avoid possibility of
            // a race condition if the last subscriber unsubscribes
            // immediately after the null check and before the event is raised.
            EventHandler <RobotWorkerStatusChangeEventArgs> handler = StatusChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #3
0
 //The event-invoking method that derived classes can override.
 public virtual void OnStatusChanged(RobotWorkerStatusChangeEventArgs e)
 {
     this._Status = e.RobotWorkerStatus;
     // Make a temporary copy of the event to avoid possibility of
     // a race condition if the last subscriber unsubscribes
     // immediately after the null check and before the event is raised.
     EventHandler<RobotWorkerStatusChangeEventArgs> handler = StatusChanged;
     if (handler != null)
     {
         handler(this, e);
     }
 }
예제 #4
0
 public static string GetRobotWorkerStatusText(RobotWorkerStatus RWS)
 {
     //TODO: fix
     switch(RWS)
     {
         case RobotWorkerStatus.Stopping:
             return "Stopping";
         case RobotWorkerStatus.Stopped:
             return "Stopped";
         case RobotWorkerStatus.WaitingForQueuedItems:
             return "Waiting for queued items";
             case RobotWorkerStatus.RunningJob:
             return "Running Job";
         case RobotWorkerStatus.FinishRunningJob:
             return "Finish running job";
         case RobotWorkerStatus.Pausing:
             return "Pausing";
         case RobotWorkerStatus.Paused:
             return "Paused";
         default:
             return "Stopped";
     }
 }