예제 #1
0
파일: CASParts.cs 프로젝트: yakoder/NRaas
            public int CompareTo(Wrapper wrapper)
            {
                int result = -UIUtils.IsCustomFiltered(mType).CompareTo(UIUtils.IsCustomFiltered(wrapper.mType));

                if (result != 0)
                {
                    return(result);
                }

                result = UIUtils.IsInstalledContent(mType).CompareTo(UIUtils.IsInstalledContent(wrapper.mType));
                if (result != 0)
                {
                    return(result);
                }

                ProductVersion left  = UIUtils.ExtractProductVersion(mType);
                ProductVersion right = UIUtils.ExtractProductVersion(wrapper.mType);

                result = -left.CompareTo(right);
                if (result != 0)
                {
                    return(result);
                }

                return(mPart.DisplayIndex.CompareTo(wrapper.mPart.DisplayIndex));
            }