예제 #1
0
        public void FinishCapture()
        {
            movementText = "";
            movementKey  = "";

            btnStopCapture.BeginInvoke(
                new Action(() => { btnStopCapture.Enabled = false; })
                );

            btnStartCapture.BeginInvoke(
                new Action(() => { btnStartCapture.Enabled = false; })
                );


            lblSensorReady.BeginInvoke(
                new Action(() => { lblSensorReady.Text = ""; })
                );

            lblMovement.BeginInvoke(
                new Action(() => { lblMovement.Text = ""; })
                );

            if (!shouldCancel)
            {
                formatedCoordinates = captureService.formatedCoordinates;
                communicationService.Communicate(formatedCoordinates, trainingFile);
            }

            if (trainingFile)
            {
                movementData.SetNull();
                movementData = Movements.Instance;
            }

            cbxSelectMovement.BeginInvoke(
                new Action(() => {
                cbxSelectMovement.SelectedIndex = -1;
                cbxSelectMovement.Enabled       = true;
            })
                );

            btnTrainingMove.BeginInvoke(
                new Action(() => { btnTrainingMove.Enabled = true; })
                );

            // bgdProgressStatus.ReportProgress(0);
        }