コード例 #1
0
ファイル: ChangesetGraph.cs プロジェクト: patelriki13/Git-GUI
        /// <summary>
        /// Sets colors for branches. Colors are chosen randomly from the list of allowed branch colors.
        /// </summary>
        private void SetBranchColors(LibGit2Sharp.BranchCollection branches)
        {
            foreach (LibGit2Sharp.Branch branch in branches)
            {
                BranchColors.Add(branch.Name, AllowedBranchColors.ElementAt(branchColorIndex++));

                if (branchColorIndex == AllowedBranchColors.Count)
                {
                    branchColorIndex = 0;
                }
            }
        }
コード例 #2
0
 internal BranchCollection(LibGit2Sharp.BranchCollection collection) => this.innerCollection = collection;