/// <summary>
 /// Prevents a default instance of the <see cref="VisualDimensionGraph"/> class from being created.
 /// </summary>
 private VisualDimensionGraph()
 {
     DisplayController = new VisualDisplayController();
     TimeAxis = new VisualTimeAxis();
     WordSegments = new Collection<VisualSegment>();
     PhoneSegments = new Collection<VisualSegment>();
     SelectedFrameIndexes = new ObservableCollection<int>();
     PhoneDurations = new VisualDurations();
     WaveSamples = new VisualLinerSamples();
 }
Ejemplo n.º 2
0
 public void SetDataContext(VisualGain visualGain)
 {
     _linerGraph.SetDataContext(visualGain);
     VisualLinerSamples guideline = new VisualLinerSamples();
     guideline.TimeAxis = visualGain.TimeAxis;
     guideline.YAxis = visualGain.YAxis;
     guideline.Samples = visualGain.GuideLineSamples;
     _guidelineGraph.SetDataContext(guideline);
     _highlightFrames.TimeAxis = visualGain.TimeAxis;
     _visualGain = visualGain;
 }
        public void SetDataContext(VisualWaveForm visualWaveForm, bool isBinding)
        {
            VisualLinerSamples samples = new VisualLinerSamples();
            samples.TimeAxis = _internalTimeAxis;
            samples.YAxis = visualWaveForm.YAxis;
            samples.Samples = visualWaveForm.WaveSamples;
            _linerGraph.SetDataContext(samples);

            _internalTimeAxis.CopyPropertiesFrom(visualWaveForm.TimeAxis);
            _internalTimeAxis.SampleInterval = (double)1000 / visualWaveForm.Format.SamplesPerSecond;
            if (isBinding)
            {
                visualWaveForm.PropertyChanged += OnWaveFormPropertyChanged;
                _timeAxisPropertiesBinder = new ViewDataPropertyBinder(_internalTimeAxis, visualWaveForm.TimeAxis);
                _timeAxisPropertiesBinder.ExcludedProperties.Add("SampleInterval");
            }
        }
Ejemplo n.º 4
0
 public void SetDataContext(VisualF0 visualF0)
 {
     _linerGraph.SetDataContext(visualF0);
     VisualLinerSamples guidelineSamples = new VisualLinerSamples();
     guidelineSamples.TimeAxis = visualF0.TimeAxis;
     guidelineSamples.YAxis = visualF0.YAxis;
     guidelineSamples.Samples = visualF0.GuideLineSamples;
     _guidelineGraph.SetDataContext(guidelineSamples);
     _highlightFrames.TimeAxis = visualF0.TimeAxis;
     _visualF0 = visualF0;
 }