/// <summary>
        /// This method gets and return the current state of a Workstation
        /// </summary>
        /// <param name="wsID">The workstation whose state to find</param>
        /// <returns>The state of the workstation</returns>
        public WorkstationState GetWorkstationState(int wsID)
        {
            // create a WS state to return
            WorkstationState state = new WorkstationState();

            // get states of all properties of the WorkstationState
            state.EmpType         = GetEmpType(wsID);
            state.TrayID          = GetTrayNum(wsID);
            state.TrayVolume      = GetTrayVol(wsID);
            state.CompletedParts  = GetCompletedParts(wsID);;
            state.DefectParts     = GetBadParts(wsID);
            state.GoodParts       = GetGoodParts(wsID);
            state.BezelVolume     = GetBezelVol(wsID);
            state.BulbVolume      = GetBulbVol(wsID);
            state.HarnessVolume   = GetHarnessVol(wsID);
            state.HousingVolume   = GetHousingVol(wsID);
            state.LensVolume      = GetLensVol(wsID);
            state.ReflectorVolume = GetReflectorVol(wsID);
            state.RunnerIsOut     = IsRunnerOut(wsID);

            return(state);
        }
Пример #2
0
 /// <summary>
 /// This method populates the andon display with the current state of the WS
 /// </summary>
 /// <param name="state"></param>
 private void PopulateAndonDisplay(WorkstationState state)
 {
     // Populate all fields of andon display with current state of WS
     EmployeeTypeLabel.Text    = state.EmpType;
     TrayIDLabel.Text          = state.TrayID.ToString();
     TrayAmountLabel.Text      = state.TrayVolume;
     TotalPartsLabel.Text      = state.CompletedParts.ToString();
     DefectPartsLabel.Text     = state.DefectParts.ToString();
     GoodPartsLabel.Text       = state.GoodParts.ToString();
     BezelAmountLabel.Text     = state.BezelVolume;
     BulbAmountLabel.Text      = state.BulbVolume;
     HarnessAmountLabel.Text   = state.HarnessVolume;
     LensAmountLabel.Text      = state.LensVolume;
     HousingAmountLabel.Text   = state.HousingVolume;
     ReflectorAmountLabel.Text = state.ReflectorVolume;
     if (state.RunnerIsOut)
     {
         RunnerLabel.Text = "Yes";
     }
     else
     {
         RunnerLabel.Text = "No";
     }
 }