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"); } }
//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); } }
//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); } }
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"; } }