private void StateChange(object pSource, HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State pState) { if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.IDLE) { m_ButtonStartWorkflow.IsEnabled = false; m_ButtonStopWorkflow.IsEnabled = false; m_ButtonPrevious.IsEnabled = false; m_ButtonNext.IsEnabled = false; } else if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.WORKFLOW_LOADED) { m_ButtonStartWorkflow.IsEnabled = true; m_ButtonStopWorkflow.IsEnabled = false; m_ButtonPrevious.IsEnabled = false; m_ButtonNext.IsEnabled = false; } else if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.WORKFLOW_PLAYING) { m_ButtonStartWorkflow.IsEnabled = false; m_ButtonStopWorkflow.IsEnabled = true; m_ButtonPrevious.IsEnabled = true; m_ButtonNext.IsEnabled = true; } else { m_ButtonStartWorkflow.IsEnabled = false; m_ButtonStopWorkflow.IsEnabled = false; m_ButtonPrevious.IsEnabled = false; m_ButtonNext.IsEnabled = false; } }
private void StateChange(object pSource, HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State pState) { if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.IDLE) { m_ButtonStart.IsEnabled = true; m_ButtonStop.IsEnabled = false; m_ButtonContinue.IsEnabled = false; m_ButtonSaveWorkFlow.IsEnabled = true; m_ButtonLoadWorkFlow.IsEnabled = false; m_ButtonRemoveWorkingStep.IsEnabled = false; m_ButtonUp.IsEnabled = false; m_ButtonDown.IsEnabled = false; } else if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.RECORD) { m_ButtonStart.IsEnabled = false; m_ButtonStop.IsEnabled = true; m_ButtonContinue.IsEnabled = true; m_ButtonSaveWorkFlow.IsEnabled = false; m_ButtonLoadWorkFlow.IsEnabled = false; m_ButtonRemoveWorkingStep.IsEnabled = true; m_ButtonUp.IsEnabled = true; m_ButtonDown.IsEnabled = true; } else if (pState == HciLab.motionEAP.InterfacesAndDataModel.AllEnums.State.RECORD_PAUSED) { m_ButtonStart.IsEnabled = false; m_ButtonStop.IsEnabled = true; m_ButtonContinue.IsEnabled = true; m_ButtonSaveWorkFlow.IsEnabled = false; m_ButtonLoadWorkFlow.IsEnabled = false; m_ButtonRemoveWorkingStep.IsEnabled = false; m_ButtonUp.IsEnabled = false; m_ButtonDown.IsEnabled = false; } else { m_ButtonStart.IsEnabled = false; m_ButtonStop.IsEnabled = false; m_ButtonContinue.IsEnabled = false; m_ButtonSaveWorkFlow.IsEnabled = false; m_ButtonLoadWorkFlow.IsEnabled = false; m_ButtonRemoveWorkingStep.IsEnabled = false; m_ButtonUp.IsEnabled = false; m_ButtonDown.IsEnabled = false; } }