/// <summary>
        /// Constructor of the view to customize the user feedbacks
        /// </summary>
        public ChoiceFeedbackView()
        {
            instance = this;
            InitializeComponent();
            ChoiceFeedbackViewModel cfvm = new ChoiceFeedbackViewModel();

            this.DataContext = cfvm;
            InitCheckbox();
            // if facetracking is activate
            if (TrackingSideTool.Get().ActivateFaceTrackingCheckBox.IsChecked.Value)
            {
                FaceChoiceFeedback.IsEnabled      = true;
                EmotionChoiceFeedback.IsEnabled   = true;
                LookDirecChoiceFeedback.IsEnabled = true;
            }
            else
            {
                FaceChoiceFeedback.Opacity      = 0.5;
                EmotionChoiceFeedback.Opacity   = 0.5;
                LookDirecChoiceFeedback.Opacity = 0.5;
            }
            // audio not available yet
            AudioChoiceFeedback.Opacity = 0.5;
            WpmChoiceFeedback.Opacity   = 0.5;
        }
Ejemplo n.º 2
0
 public static TrackingSideTool Get()
 {
     if (instance == null)
     {
         instance = new TrackingSideTool();
     }
     return(instance);
 }
 /// <summary>
 /// initialize the view according the current feedbacks selected or not
 /// </summary>
 private void InitCheckbox()
 {
     AgitationChoiceFeedback.IsChecked = DrawingSheetAvatarViewModel.Get().displayAgitationFeedback;
     if (DrawingSheetAvatarViewModel.Get().displayHandsJoinedFeedback&& DrawingSheetAvatarViewModel.Get().displayArmsCrossedFeedback)
     {
         ArmsChoiceFeedback.IsChecked = true;
     }
     HandsJoinedChoiceFeedback.IsChecked = DrawingSheetAvatarViewModel.Get().displayHandsJoinedFeedback;
     ArmsCrossedChoiceFeedback.IsChecked = DrawingSheetAvatarViewModel.Get().displayArmsCrossedFeedback;
     if (TrackingSideTool.Get().ActivateFaceTrackingCheckBox.IsChecked.Value)
     {
         if (DrawingSheetAvatarViewModel.Get().displayEmotionFeedback&& DrawingSheetAvatarViewModel.Get().displayLookDirFeedback)
         {
             FaceChoiceFeedback.IsChecked = true;
         }
         EmotionChoiceFeedback.IsChecked   = DrawingSheetAvatarViewModel.Get().displayEmotionFeedback;
         LookDirecChoiceFeedback.IsChecked = DrawingSheetAvatarViewModel.Get().displayLookDirFeedback;
     }
 }