예제 #1
0
        /// <summary>
        /// Launch the record when the waiting time is over
        /// </summary>
        public void launchRecordingAfterWait()
        {
            inRecord = true;

            allFalse();
            if (FaceRecognition == true)
            {
                TrackingSideToolViewModel tracking = TrackingSideToolViewModel.get();
                tracking.FaceTracking = true;
                tracking.emo          = true;
                //tracking.Mouth = true;
                //tracking.Mouth2 = true; //Those feature are not working for now
                //tracking.pupilR = true;
                tracking.LookR = true;
            }
            if (VoiceRecognition == true)
            {
                TrackingSideToolViewModel tracking = TrackingSideToolViewModel.get();
                //tracking.PeakDetection = true; //Create lags when in record
                tracking.SpeedRate        = true;
                tracking.ShowTextOnScreen = true;

                /*tracking.VoiceMonotony = true;
                 * tracking.BadVoiceReflex = true;*///Features are not working
            }
            if (BodyRecognition == true)
            {
                TrackingSideToolViewModel.get().UseFeedback = true;
            }

            SideToolsViewModel.Get().chooseTraining();

            TrainingSideToolViewModel tstvm = TrainingSideToolViewModel.Get();

            tstvm.limitedTimeHours   = "0";
            tstvm.limitedTimeMinutes = MinRecord.ToString();
            tstvm.limitedTimeSeconds = SecRecord.ToString();
            tstvm.isTimeLimited      = true;

            /*Depending on which view the user was using when he start his session record
             * the session recording will record the view the user was using*/
            if (MainWindow.drawingSheet.getMode() == SheetMode.AvatarMode)
            {
                tstvm.ToggleAvatarOpenGLRecording = true;
            }
            else if (MainWindow.drawingSheet.getMode() == SheetMode.StreamMode)
            {
                tstvm.ToggleStreamRecording = true;
            }
            tstvm.ToggleAudioRecording = true;

            //Launch the record
            ButtonAutomationPeer peer = new ButtonAutomationPeer(TrainingSideTool.Get().StartRecordingButton);

            IInvokeProvider invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;

            invokeProv.Invoke();
        }