static private GetRelatedBranches ( string trg ) : string[] | ||
trg | string | The server branch path. |
return | string[] |
/// <summary> /// Handles the Click event of the toolGetRelBranches control. /// Shows MessageBox with branches that have child/parent relationship for source and target paths. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void toolGetRelBranches_Click(object sender, EventArgs e) { string str1 = MergeFactory.GetRelatedBranches(defServerName).Aggregate((x, y) => x + Environment.NewLine + "---" + y); string str2 = MergeFactory.GetRelatedBranches(ClickedItem.sourcePath).Aggregate((x, y) => x + Environment.NewLine + "---" + y); MessageBox.Show("Related branches for merge target path:" + Environment.NewLine + "---" + str1 + Environment.NewLine + "Related branches for merge source path:" + Environment.NewLine + "---" + str2, Utilities.AppTitle); }
public void UpdateRelatedBranchesCombo() { comboBox1.Items.Clear(); comboBox1.Items.AddRange(listView1.Items.Cast <ListViewItem>() .Select(x => (x.Tag as ListViewItemTag).sourcePath) .Distinct() .SelectMany(x => MergeFactory.GetRelatedBranches(x)).ToArray()); }