예제 #1
0
        /// <summary>
        /// Called when [threshold value changed].
        /// </summary>
        /// <param name="d">The d.</param>
        /// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
        private static void OnThresholdValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SimpleGraph graph = (SimpleGraph)d;

            if (e.NewValue != null)
            {
                graph.UpdateThresholdLine();
            }
        }
예제 #2
0
        /// <summary>
        /// Called when [max value changed].
        /// </summary>
        /// <param name="d">The d.</param>
        /// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
        private static void OnMaxValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SimpleGraph graph = (SimpleGraph)d;

            if (e.NewValue != null)
            {
                graph.y1Label.Content = graph.MaxValue.ToString("N0");
                graph.y2Label.Content = (graph.MaxValue / 2).ToString("N0");
                graph.y3Label.Content = graph.MinValue.ToString("N0");
                graph.UpdateThresholdLine();
            }
        }