Пример #1
0
        private double sortLogic(XPathAnalyzer.CrawTarget d)
        {
            var item = d.Score;

            if (sortMethod == SortMethod.行数排序)
            {
                return(d.NodeCount);
            }
            if (sortMethod == SortMethod.列数排序)
            {
                return(d.ColumnCount);
            }
            if (sortMethod == SortMethod.面积排序)
            {
                return(d.ColumnCount * d.NodeCount);
            }
            return(item);
        }
Пример #2
0
        private double sortLogic(XPathAnalyzer.CrawTarget d)
        {
            var item = d.Score;

            if (sortMethod == SortMethod.SortByRow)
            {
                return(d.NodeCount);
            }
            if (sortMethod == SortMethod.SortByColumn)
            {
                return(d.ColumnCount);
            }
            if (sortMethod == SortMethod.SortByArea)
            {
                return(d.ColumnCount * d.NodeCount);
            }
            return(item);
        }