コード例 #1
0
        protected WorkingStep(SerializationInfo info, StreamingContext context)
        {
            if (info.MemberCount > 6)
            {
                m_SerVersion = info.GetInt32("m_SerVersion");
            }
            else
            {
                m_SerVersion = 1;
            }

            m_StepNumber             = info.GetInt32("m_StepNumber");
            m_Name                   = info.GetString("m_Name");
            m_WithDrawel             = info.GetString("m_WithDrawel");
            m_Mode                   = (AllEnums.PBD_Mode)info.GetValue("m_Mode", typeof(AllEnums.PBD_Mode));
            m_AdaptiveScenes         = (ObservableCollection <AdaptiveScene>)info.GetValue("m_AdaptiveScenes", typeof(ObservableCollection <AdaptiveScene>));
            m_EndConditionObjectName = info.GetString("m_EndConditionObjectName");

            if (SerVersion < 2)
            {
                return;
            }

            m_FailStates = (ObservableCollection <WorkflowFailState>)info.GetValue("m_FailStates", typeof(ObservableCollection <WorkflowFailState>));

            if (SerVersion < 3)
            {
                return;
            }

            m_TimeOut = info.GetInt32("m_TimeOut");

            if (SerVersion < 3)
            {
                return;
            }

            m_ExpectedDuration = info.GetInt32("m_ExpectedDuration");

            if (SerVersion < 5)
            {
                return;
            }

            m_IsManualStep = info.GetBoolean("m_IsManualStep");

            if (SerVersion < 6)
            {
                return;
            }

            m_IsQSStep = info.GetBoolean("m_IsQSStep");
        }
コード例 #2
0
 public void createNewName(AllEnums.PBD_Mode mode)
 {
     if (mode == AllEnums.PBD_Mode.BOX_WITHDRAWEL)
     {
         string newName = "Step " + m_StepNumber + ": Entnahme " + m_WithDrawel;
         Name = newName;
     }
     else if (mode == AllEnums.PBD_Mode.ASSEMBLY_DONE)
     {
         string newName = "Step " + m_StepNumber + ": Assembly ";
         Name = newName;
     }
     if (mode == AllEnums.PBD_Mode.END_CONDITION)
     {
         string newName = "Fertig";
         Name = newName;
     }
 }
コード例 #3
0
        public void createStep(AllEnums.PBD_Mode mode, List <AdaptiveScene> adaptiveScenes, string name, string endCondition)
        {
            string stepname   = "";
            string withdrawel = "";

            //stepname = "Schritt " + EditWorkflowManager.Instance.CurrentWorkingStepNumber + ": ";
            if (mode == AllEnums.PBD_Mode.BOX_WITHDRAWEL)
            {
                withdrawel = name;
                stepname   = "Entnahme " + withdrawel;
            }
            else if (mode == AllEnums.PBD_Mode.ASSEMBLY_DONE)
            {
                stepname = "Montage";
            }
            else if (mode == AllEnums.PBD_Mode.NETWORK_TABLE_DONE)
            {
                stepname = "Warte auf Tisch";
            }
            else if (mode == AllEnums.PBD_Mode.OBJECT_RECOGNIZED)
            {
                stepname = "Objekt " + name;
            }
            else if (mode == AllEnums.PBD_Mode.END_CONDITION)
            {
                stepname = "ASSEMBLY COMPLETE";
            }

            // add this to the workflow that is currently created
            EditWorkflowManager.Instance.AddWorkingStepByDemonstration(adaptiveScenes, stepname, withdrawel, EditWorkflowManager.Instance.CurrentWorkingStepNumber, endCondition, mode);
            EditWorkflowManager.Instance.CurrentWorkingStepNumber += 1;

            // refresh the whole thing
            //refreshLoadedWorkflow();
            //}
        }
コード例 #4
0
        public void AddWorkingStepByDemonstration(List <AdaptiveScene> adaptiveScenes, string pName, string withdrawel, int sNumber, string endCondition, AllEnums.PBD_Mode mode)
        {
            // add the working step
            WorkingStep newStep = new WorkingStep(pName, withdrawel, endCondition, sNumber);

            newStep.StepNumber = m_HighestWorkingStepNumber + 1;
            newStep.Withdrawel = withdrawel;
            newStep.Mode       = mode;

            if (mode == AllEnums.PBD_Mode.END_CONDITION)
            {
                newStep.createNewName(mode);
            }
            newStep.AdaptiveScenes.Clear(); // delete adaptivitylevels that are created from the usual way automatically
            adaptiveScenes.ForEach(aScene => newStep.AdaptiveScenes.Add(aScene));
            m_HighestWorkingStepNumber += 1;

            m_CurrentWorkflow.AddWorkingStep(newStep);
            if (mode == AllEnums.PBD_Mode.BOX_WITHDRAWEL)
            {
                string stepCsv = "StepENT" + sNumber;
            }
            if (mode == AllEnums.PBD_Mode.ASSEMBLY_DONE)
            {
                string stepCsv = "StepMON" + sNumber;
            }
        }
コード例 #5
0
 public void AddWorkingStepByDemonstration(AdaptiveScene adaptiveScene, string pName, string withdrawel, int sNumber, string endCondition, AllEnums.PBD_Mode mode)
 {
     AddWorkingStepByDemonstration(new List <AdaptiveScene> {
         adaptiveScene
     }, pName, withdrawel, sNumber, endCondition, mode);
 }
コード例 #6
0
 public void createStep(AllEnums.PBD_Mode mode, AdaptiveScene adaptiveScene, string name, string endCondition)
 {
     createStep(mode, new List <AdaptiveScene> {
         adaptiveScene
     }, name, endCondition);
 }