コード例 #1
0
        private void Calibrate()
        {
            // Update screen to calibrate where the window currently is
            activeScreen = Screen.FromHandle(new WindowInteropHelper(this).Handle);

// TESTE FUNÇÃO
            sampleTimeMs     = Convert.ToInt32(TextBox_Amostragem.Text);
            transitionTimeMs = Convert.ToInt32(TextBox_Transicao.Text);

            string sequenciaCustomizada = " ";

            int sequencia;

            var directionToggleState = false;

            if (directionToggle.IsChecked == true)
            {
                directionToggleState = true;
            }
            var startToggleState = false;

            if (startToggle.IsChecked == true)
            {
                startToggleState = true;
            }

            if (predefinedMode.IsChecked == true)
            {
                sequencia = 1;
            }
            else if (randomMode.IsChecked == true)
            {
                sequencia = 2;
            }
            else
            {
                sequencia            = 3;
                sequenciaCustomizada = customModeInput.Text;
            }

// FIM TESTE FUNÇÃO
            // Initialize and start the calibration

            CalibrationRunner calRunner = new CalibrationRunner(activeScreen, activeScreen.Bounds.Size, totalPontos, sampleTimeMs, transitionTimeMs, sequencia, sequenciaCustomizada, directionToggleState, startToggleState);

            calRunner.OnResult += calRunner_OnResult;
            calRunner.Start();
        }
コード例 #2
0
        private void Calibrate()
        {
            // Update screen to calibrate where the window currently is
            activeScreen = Screen.FromHandle(new WindowInteropHelper(this).Handle);

// TESTE FUNÇÃO
            tempoAmostragem = Convert.ToInt32(TextBox_Amostragem.Text);
            tempoTransicao  = Convert.ToInt32(TextBox_Transicao.Text);

            //int[] josefa = tointarray(textoCustomizada.Text, '-');
            string sequenciaCustomizada = " ";

            int sequencia;

            if (seqCrescente.IsChecked == true)
            {
                sequencia = 1;
            }
            else if (seqDescrescente.IsChecked == true)
            {
                sequencia = 2;
            }
            else if (seqAleatoria.IsChecked == true)
            {
                sequencia = 3;
            }
            else
            {
                sequencia            = 4;
                sequenciaCustomizada = textoCustomizada.Text;
            }
// FIM TESTE FUNÇÃO
            // Initialize and start the calibration
            CalibrationRunner calRunner = new CalibrationRunner(activeScreen, activeScreen.Bounds.Size, totalPontos, tempoAmostragem, tempoTransicao, sequencia, sequenciaCustomizada);

            calRunner.OnResult += calRunner_OnResult;
            calRunner.Start();
        }