Skip to content

Commit

Permalink
Allow exact match for package ID search to be turned off.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewNaylor committed Oct 4, 2020
1 parent ad42b61 commit 058f40f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions guinget/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<setting name="UpgradeSettingsFromPreviousVersion" serializeAs="String">
<value>False</value>
</setting>
<setting name="ExactMatchForLastSelectedIDSearch" serializeAs="String">
<value>True</value>
</setting>
</guinget.My.MySettings>
</userSettings>
<runtime>
Expand Down
7 changes: 6 additions & 1 deletion guinget/MainWindow.vb
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,12 @@ Public Class aaformMainWindow
If datagridviewPackageList.Rows.Count > 0 Then
' We have to wrap it with quotes to get an exact match, since
' that's probably what the user wants.
toolstriptextboxSearch.Text = """" & datagridviewPackageList.SelectedRows.Item(0).Cells.Item(2).Value.ToString & """"
If My.Settings.ExactMatchForLastSelectedIDSearch = True Then
' Only run an exact match for the package ID if the user wants it.
toolstriptextboxSearch.Text = """" & datagridviewPackageList.SelectedRows.Item(0).Cells.Item(2).Value.ToString & """"
Else
toolstriptextboxSearch.Text = datagridviewPackageList.SelectedRows.Item(0).Cells.Item(2).Value.ToString
End If
BeginPackageIdSearch()
End If
End Sub
Expand Down
12 changes: 12 additions & 0 deletions guinget/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions guinget/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
<Setting Name="UpgradeSettingsFromPreviousVersion" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ExactMatchForLastSelectedIDSearch" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 058f40f

Please sign in to comment.