示例#1
0
        public void ChildColours(NodeDto nodes, int checkins)
        {
            //var rootCheckins = checkins;
            if (nodes.children == null)
                return;

            foreach (var child in nodes.children)
            {
                var colours = new ColourConverter();
                child.data.colourHex = colours.GetColour(checkins, child.data.checkins).Substring(2, 6);
                child.data.percentage = ParaCalculator(checkins, child.data.checkins, 5.5)*150; //Math.Pow(((child.data.checkins / (double)checkins)), 1.0 / 5.5)*150;
                ChildColours(child, checkins);
            }
        }
示例#2
0
        public void ChildColours(NodeDto nodes, int checkins)
        {
            //var rootCheckins = checkins;
            if (nodes.children == null)
            {
                return;
            }

            foreach (var child in nodes.children)
            {
                var colours = new ColourConverter();
                child.data.colourHex  = colours.GetColour(checkins, child.data.checkins).Substring(2, 6);
                child.data.percentage = ParaCalculator(checkins, child.data.checkins, 5.5) * 150; //Math.Pow(((child.data.checkins / (double)checkins)), 1.0 / 5.5)*150;
                ChildColours(child, checkins);
            }
        }
        public ISourceTree GetAllNodes(string pathContains, string iteration, int depth)
        {
            var sourceItems = LogReader.GetSourceItems(pathContains, iteration);

            if (sourceItems == null)
            {
                return(null);
            }

            var tree = new SourceTree();

            tree.AddFiles(sourceItems, depth);

            var colours = new ColourConverter();

            colours.ChildColours(tree.Root, tree.Root.children.FirstOrDefault().data.checkins);

            return(tree);
        }