예제 #1
0
        private void MushraTestTransportControlsView_AddScore(object sender, bool testModeFlag)
        {
            if (testModeFlag)
            {
                EventArgs e = null;
                _sliderName = "";

                SliderChanged?.Invoke(sender, e);

                bool flag = CheckAllSamplesPlayedAndScored();
                ScoringSliderEvent?.Invoke(sender, flag);
                if (flag == false)
                {
                    MessageBox.Show("Can't iterate to next trial unless the current sample is played and scored.", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
                    return;
                }
            }
            _mushraModelList.Score.Clear();
            _mushraModelList.Score        = _scoreList.ToList();
            _mushraModelList.StimulusName = _stlimulusNames.ToList();
            _scoreList.Clear();
            ResetScales();
            ResetButtons();
            //_resetFlag = false;

            for (var index = 0; index < _numberOfActiveStimulus; index++)
            {
                _stimulusPlayed[index] = false;
                _stimulusScored[index] = false;
            }
        }
예제 #2
0
        private void slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            var sliderObject = e.OriginalSource as Slider;

            if (_sliderName == "")
            {
                _sliderName = sliderObject.Name;
            }
            else if (_sliderName != sliderObject.Name)
            {
                _previousSliderName = sliderObject.Name.ToString();
                SliderChanged?.Invoke(sender, e);
            }

            index  = _sliders.ToList().IndexOf(sliderObject);
            _score = sliderObject.Value;
        }