Esempio n. 1
0
        //============================================================================*
        // CompareTo()
        //============================================================================*

        public int CompareTo(cTestShot TestShot)
        {
            if (TestShot == null)
            {
                return(1);
            }

            int rc = m_nMuzzleVelocity.CompareTo(TestShot.m_nMuzzleVelocity);

            if (rc == 0)
            {
                rc = m_nPressure.CompareTo(TestShot.m_nPressure);

                if (rc == 0)
                {
                    rc = m_fMisfire.CompareTo(TestShot.m_fMisfire);

                    if (rc == 0)
                    {
                        rc = m_fSquib.CompareTo(TestShot.m_fSquib);
                    }
                }
            }

            return(rc);
        }
Esempio n. 2
0
        //============================================================================*
        // cTestShot() - Copy Constructor
        //============================================================================*

        public cTestShot(cTestShot TestShot)
        {
            m_nMuzzleVelocity = TestShot.m_nMuzzleVelocity;
            m_nPressure       = TestShot.m_nPressure;
            m_fMisfire        = TestShot.m_fMisfire;
            m_fSquib          = TestShot.m_fSquib;
        }
Esempio n. 3
0
        //============================================================================*
        // Comparer()
        //============================================================================*

        public static int Comparer(cTestShot TestShot1, cTestShot TestShot2)
        {
            if (TestShot1 == null)
            {
                if (TestShot2 != null)
                {
                    return(-1);
                }
                else
                {
                    return(0);
                }
            }
            else
            {
                if (TestShot2 == null)
                {
                    return(1);
                }
            }

            return(TestShot1.CompareTo(TestShot2));
        }