コード例 #1
0
        private int PosStartComparison(DsMultiBouder.boulderResultsRow r1, DsMultiBouder.boulderResultsRow r2)
        {
            if (r1.iid == r2.iid)
            {
                return(0);
            }
            long res1 = (r1.IsresNull() ? 0 : r1.res);
            long res2 = (r2.IsresNull() ? 0 : r2.res);

            if (res1 != res2)
            {
                return(res2.CompareTo(res1));
            }
            if (r1.pos != r2.pos)
            {
                return(r1.pos.CompareTo(r2.pos));
            }
            if (r1.nya != r2.nya)
            {
                return(r1.nya.CompareTo(r2.nya));
            }
            if (r1.disq != r2.disq)
            {
                return(r1.disq.CompareTo(r2.disq));
            }
            if (r1.ParticipantsRow.vk != r2.ParticipantsRow.vk)
            {
                return(r1.ParticipantsRow.vk.CompareTo(r2.ParticipantsRow.vk));
            }
            return(r1.start.CompareTo(r2.start));
        }
コード例 #2
0
        private int PosComparison(DsMultiBouder.boulderResultsRow r1, DsMultiBouder.boulderResultsRow r2)
        {
            if (r1.iid == r2.iid)
            {
                return(r1.iid.CompareTo(r2.iid));
            }
            long res1 = (r1.IsresNull() ? 0 : r1.res);
            long res2 = (r2.IsresNull() ? 0 : r2.res);

            if (res1 != res2)
            {
                return(res2.CompareTo(res1));
            }
            if (r1.pos != r2.pos)
            {
                return(r1.pos.CompareTo(r2.pos));
            }
            if (r1.nya != r2.nya)
            {
                return(r1.nya.CompareTo(r2.nya));
            }
            if (r1.disq != r2.disq)
            {
                return(r1.disq.CompareTo(r2.disq));
            }
            if (r1.ParticipantsRow.vk != r2.ParticipantsRow.vk)
            {
                return(r1.ParticipantsRow.vk.CompareTo(r2.ParticipantsRow.vk));
            }
            if (r1.ParticipantsRow.TeamsRow.name != r2.ParticipantsRow.TeamsRow.name)
            {
                return(r1.ParticipantsRow.TeamsRow.name.CompareTo(r2.ParticipantsRow.TeamsRow.name));
            }
            if (r1.ParticipantsRow.surname != r2.ParticipantsRow.surname)
            {
                return(r1.ParticipantsRow.surname.CompareTo(r2.ParticipantsRow.surname));
            }
            string sName1 = (r1.ParticipantsRow.IsnameNull() ? "" : r1.ParticipantsRow.name);
            string sName2 = (r2.ParticipantsRow.IsnameNull() ? "" : r2.ParticipantsRow.name);

            return(sName1.CompareTo(sName2));
        }