예제 #1
0
        private static void OnBarSpacingChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer != null)
            {
                spectrumAnalyzer.OnBarSpacingChanged((double)e.OldValue, (double)e.NewValue);
            }
        }
예제 #2
0
        private static void OnRefreshIntervalChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer != null)
            {
                spectrumAnalyzer.OnRefreshIntervalChanged((int)e.OldValue, (int)e.NewValue);
            }
        }
예제 #3
0
        private static object OnCoerceRefreshInterval(DependencyObject o, object value)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer != null)
            {
                return(spectrumAnalyzer.OnCoerceRefreshInterval((int)value));
            }
            return(value);
        }
예제 #4
0
        private static object OnCoerceBarSpacing(DependencyObject o, object value)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer != null)
            {
                return(spectrumAnalyzer.OnCoerceBarSpacing((double)value));
            }
            return(value);
        }
예제 #5
0
        private static object OnCoerceBarCount(DependencyObject o, object value)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer != null)
            {
                return(spectrumAnalyzer.OnCoerceBarCount((int)value));
            }
            return(value);
        }
예제 #6
0
        private static void OnBarBackgroundChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            SpectrumAnalyzer spectrumAnalyzer = o as SpectrumAnalyzer;

            if (spectrumAnalyzer.barShapes != null && spectrumAnalyzer.barShapes.Count > 0)
            {
                foreach (Shape bar in spectrumAnalyzer.barShapes)
                {
                    bar.Fill = spectrumAnalyzer.BarBackground;
                }
            }
        }