Esempio n. 1
0
 private void updateByStateChange(VTRState newState)
 {
     setStatePanels(newState);
     setStateLabel(newState);
     setButtonsEnableState(newState);
     setOtherElementsEnableState(newState);
 }
Esempio n. 2
0
 private static void currentVTRStateChangedHandler(VTR vtr, VTRState newState)
 {
     if ((newState == VTRState.ManuallyStopped) || (newState == VTRState.ManuallyStopped) || (newState == VTRState.Failure))
     {
         currentVTR.StateChanged -= currentVTRStateChangedHandler;
         startNextVTR();
     }
 }
Esempio n. 3
0
 private void setStatePanels(VTRState state)
 {
     statePanel_Reset.BackColor           = (state == VTRState.Reset) ? Color.Aqua : Color.White;
     statePanel_Starting.BackColor        = (state == VTRState.Starting) ? Color.Yellow : Color.White;
     statePanel_Capturing.BackColor       = (state == VTRState.Capturing) ? Color.DarkOrange : Color.White;
     statePanel_Stopping.BackColor        = (state == VTRState.Stopping) ? Color.Yellow : Color.White;
     statePanel_Ready.BackColor           = (state == VTRState.Ready) ? Color.Lime : Color.White;
     statePanel_ManuallyStopped.BackColor = (state == VTRState.ManuallyStopped) ? Color.SeaGreen : Color.White;
     statePanel_Failure.BackColor         = (state == VTRState.Failure) ? Color.Red : Color.White;
 }
Esempio n. 4
0
        private void setStateLabel(VTRState state)
        {
            string stateLabelText = "";

            switch (state)
            {
            case VTRState.Reset:
                stateLabelText = "reset";
                break;

            case VTRState.Starting:
                stateLabelText = "starting capturing";
                break;

            case VTRState.Capturing:
                stateLabelText = "capturing";
                break;

            case VTRState.Stopping:
                stateLabelText = "stopping capturing";
                break;

            case VTRState.Ready:
                stateLabelText = "ready";
                break;

            case VTRState.ManuallyStopped:
                stateLabelText = "ready (manually stopped)";
                break;

            case VTRState.Failure:
                stateLabelText = "failure";
                break;
            }
            stateLabel.Text = "State: " + stateLabelText;

            captureFilenameLabel.Visible = (state == VTRState.Starting);
        }
Esempio n. 5
0
 private static void vtrStateChangedHandler(VTR vtr, VTRState newState)
 {
     calculateGlobalState();
 }
Esempio n. 6
0
 private void vtrStateChangedHandler(VTR vtr, VTRState newState)
 {
     this.InvokeIfRequired(vtrControl => {
         vtrControl.updateByStateChange(newState);
     });
 }
Esempio n. 7
0
 private void setOtherElementsEnableState(VTRState state)
 {
     captureFilenameTextbox.Enabled = (state == VTRState.Reset);
     useInNextBatchCheckbox.Enabled = (state == VTRState.Reset);
     editDetailsButton.Enabled      = (state == VTRState.Reset);
 }
Esempio n. 8
0
 private void setButtonsEnableState(VTRState state)
 {
     startButton.Enabled = (state == VTRState.Reset);
     stopButton.Enabled  = (state == VTRState.Capturing);
     resetButton.Enabled = (state != VTRState.Capturing) && (state != VTRState.Starting) && (state != VTRState.Stopping);
 }