|
|
|
@ -52,13 +52,17 @@ namespace ICSharpCode.SharpDevelop.Gui |
|
|
|
this.Dock = DockStyle.Fill; |
|
|
|
this.Dock = DockStyle.Fill; |
|
|
|
this.Controls.Add(listView); |
|
|
|
this.Controls.Add(listView); |
|
|
|
|
|
|
|
|
|
|
|
listView.ItemActivate += delegate { AddReference(); }; |
|
|
|
listView.ItemActivate += delegate { |
|
|
|
|
|
|
|
AddReference(); |
|
|
|
|
|
|
|
}; |
|
|
|
PopulateListView(); |
|
|
|
PopulateListView(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Panel upperPanel = new Panel { Dock = DockStyle.Top, Height = 20 }; |
|
|
|
Panel upperPanel = new Panel { Dock = DockStyle.Top, Height = 20 }; |
|
|
|
filterTextBox = new TextBox { Width = 150, Dock = DockStyle.Right }; |
|
|
|
filterTextBox = new TextBox { Width = 150, Dock = DockStyle.Right }; |
|
|
|
filterTextBox.TextChanged += delegate { Search(); }; |
|
|
|
filterTextBox.TextChanged += delegate { |
|
|
|
|
|
|
|
Search(); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
upperPanel.Controls.Add(filterTextBox); |
|
|
|
upperPanel.Controls.Add(filterTextBox); |
|
|
|
|
|
|
|
|
|
|
|
@ -67,8 +71,7 @@ namespace ICSharpCode.SharpDevelop.Gui |
|
|
|
|
|
|
|
|
|
|
|
public void AddReference() |
|
|
|
public void AddReference() |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach (ListViewItem item in listView.SelectedItems) |
|
|
|
foreach (ListViewItem item in listView.SelectedItems) { |
|
|
|
{ |
|
|
|
|
|
|
|
IProject project = (IProject)item.Tag; |
|
|
|
IProject project = (IProject)item.Tag; |
|
|
|
|
|
|
|
|
|
|
|
selectDialog.AddReference( |
|
|
|
selectDialog.AddReference( |
|
|
|
@ -96,8 +99,7 @@ namespace ICSharpCode.SharpDevelop.Gui |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (tokens.Length == 0) |
|
|
|
if (tokens.Length == 0) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
foreach(var token in tokens) |
|
|
|
foreach (var token in tokens) { |
|
|
|
{ |
|
|
|
|
|
|
|
if (bigText.IndexOf(token, StringComparison.OrdinalIgnoreCase) < 0) |
|
|
|
if (bigText.IndexOf(token, StringComparison.OrdinalIgnoreCase) < 0) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -111,8 +113,7 @@ namespace ICSharpCode.SharpDevelop.Gui |
|
|
|
|
|
|
|
|
|
|
|
foreach (IProject project in ProjectService.OpenSolution.Projects. |
|
|
|
foreach (IProject project in ProjectService.OpenSolution.Projects. |
|
|
|
Where(pr=>ContainsAnyOfTokens(pr.Name, tokens)) |
|
|
|
Where(pr=>ContainsAnyOfTokens(pr.Name, tokens)) |
|
|
|
.OrderBy(p => p.Name, StringComparer.OrdinalIgnoreCase) |
|
|
|
.OrderBy(p => p.Name, StringComparer.OrdinalIgnoreCase)) { |
|
|
|
) { |
|
|
|
|
|
|
|
ListViewItem newItem = new ListViewItem(new string[] { project.Name, project.Directory }); |
|
|
|
ListViewItem newItem = new ListViewItem(new string[] { project.Name, project.Directory }); |
|
|
|
newItem.Tag = project; |
|
|
|
newItem.Tag = project; |
|
|
|
listView.Items.Add(newItem); |
|
|
|
listView.Items.Add(newItem); |
|
|
|
|