Ejemplo n.º 1
0
        void MyTimePlotObserver_TargetChanged(object sender, PropertyChangedEventArgs e)
        {
            //Set appropriate bounds

            if (m_boundPolicy == MyBoundPolicy.INHERITED)
            {
                if (float.IsInfinity(Target.MinValueHint))
                {
                    m_boundMin    = -1;
                    m_boundPolicy = MyBoundPolicy.AUTO;
                }
                else
                {
                    m_boundMin = Target.MinValueHint;
                }

                if (float.IsInfinity(Target.MaxValueHint))
                {
                    m_boundMax    = 1;
                    m_boundPolicy = MyBoundPolicy.AUTO;
                }
                else
                {
                    m_boundMax = Target.MaxValueHint;
                }
            }

            if (!m_manualBoundHaveBeenSet)
            {
                m_manualBoundMin = m_boundMin;
                m_manualBoundMax = m_boundMax;
            }
        }
Ejemplo n.º 2
0
        void MyTimePlotObserver_TargetChanged(object sender, PropertyChangedEventArgs e)
        {
            //Set appropriate bounds

            if (m_boundPolicy == MyBoundPolicy.INHERITED)
            {
                if (float.IsInfinity(Target.MinValueHint))
                {
                    m_boundMin = -1;
                    m_boundPolicy = MyBoundPolicy.AUTO;
                }
                else
                    m_boundMin = Target.MinValueHint;

                if (float.IsInfinity(Target.MaxValueHint))
                {
                    m_boundMax = 1;
                    m_boundPolicy = MyBoundPolicy.AUTO;
                }
                else
                    m_boundMax = Target.MaxValueHint;

                m_plotCurrentValueMin = m_boundMin;
                m_plotCurrentValueMax = m_boundMax;
            }

            if (!m_manualBoundHaveBeenSet)
            {
                m_manualBoundMin = m_boundMin;
                m_manualBoundMax = m_boundMax;
            }
        }