private TreeNode CreateProjectNode(MOG_Project pProject) { TreeNode project = CreateNode(pProject.GetProjectName(), "Project", new RemoteSettings()); // Load all the branches of each project ArrayList branches = MOG_DBProjectAPI.GetAllBranchNames(pProject.GetProjectName()); if (branches != null) { TreeNode branchNode = CreateNode("Branches", "Branches", new RemoteSettings()); foreach (MOG_DBBranchInfo branch in branches) { branchNode.Nodes.Add(CreateNode(branch.mBranchName, "Branch", new RemoteSettings())); } project.Nodes.Add(branchNode); } // Load all the users of the project LoadProjectUsers(pProject, project); // Load all the tool directories // Load misc return(project); }
private void PopulateTags() { GetLatestTagsToolStripMenuItem.DropDownItems.Clear(); ArrayList Branches = MOG_DBProjectAPI.GetAllBranchNames(); if (Branches != null) { // Get the last set active tag string active = ""; if (GetLatestTagsToolStripMenuItem.Tag is string) { active = GetLatestTagsToolStripMenuItem.Tag as string; AddTagItem(active, "None"); } else { AddTagItem("None", "None"); } foreach (MOG_DBBranchInfo branch in Branches) { if (branch.mTag) { AddTagItem(active, branch.mBranchName); } } } }
private void InitializeTags() { TagsListView.Items.Clear(); ArrayList Branches = MOG_DBProjectAPI.GetAllBranchNames(); if (Branches != null) { string activeTag = ""; if (MOG_ControllerProject.GetProject().GetConfigFile().KeyExist("Project", "ActiveTag")) { activeTag = MOG_ControllerProject.GetProject().GetConfigFile().GetString("Project", "ActiveTag"); } foreach (MOG_DBBranchInfo branch in Branches) { // Is this a tag? or // Is this 'Current'? if (branch.mTag || string.Compare(branch.mBranchName, "Current", true) == 0) { AddTagListViewItem(branch, (string.Compare(branch.mBranchName, activeTag, true) == 0)); } } } }
private void InitializeBranches() { BranchesListView.Items.Clear(); ArrayList Branches = MOG_DBProjectAPI.GetAllBranchNames(); if (Branches != null) { foreach (MOG_DBBranchInfo branch in Branches) { if (!branch.mTag) { AddBranchListViewItem(branch); } } } }
static public List <string> GetBranches(string projectname) { List <string> branches = new List <string>(); ArrayList branchNames = MOG_DBProjectAPI.GetAllBranchNames(projectname); if (branches != null) { foreach (MOG_DBBranchInfo branchName in branchNames) { // Ignore tags if (!branchName.mTag) { branches.Add(branchName.mBranchName); } } } return(branches); }