private TreeViewItem GetUnStageFiles(IEnumerable <string> output, int startIndex) { var cns = new GitTreeViewItem(GitStatusType.UnStage) { displayName = "Changes not staged for commit", id = -3, depth = 0 }; foreach (var i in GetUnStage(output, 1, startIndex)) { cns.AddChild(i); } return(cns); }
private TreeViewItem GetStageFiles(IEnumerable <string> output, int startIndex) { var ctc = new GitTreeViewItem(GitStatusType.Stage) { displayName = "Changes to be committed", id = -2, depth = 0 }; foreach (var i in GetStage(output, 1, startIndex)) { ctc.AddChild(i); } return(ctc); }
private TreeViewItem UntrackFiles(IEnumerable <string> output, int startIndex) { var uf = new GitTreeViewItem(GitStatusType.UnTrack) { displayName = "Untracked files", id = -4, depth = 0 }; var items = output .Where(l => l[0] == '?') .Select((l, i) => new GitTreeViewItem(l, GitStatusType.UnTrack) { id = startIndex + i, depth = 1, }) .Cast <TreeViewItem>(); foreach (var i in items) { uf.AddChild(i); } return(uf); }