Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Sep 6, 2021
2 parents 74efe2e + f996ef7 commit b08475a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Analogy/Analogy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer</RepositoryUrl>
<PackageTags />
<RepositoryType>git</RepositoryType>
<Version>4.7.5</Version>
<Version>4.7.6</Version>
<Copyright>Lior Banai © 2019-2020</Copyright>
<Product>Analogy Log Viewer</Product>
<PackageReleaseNotes></PackageReleaseNotes>
Expand Down Expand Up @@ -130,7 +130,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Analogy.LogViewer.gRPC" Version="1.7.5">
<PackageReference Include="Analogy.LogViewer.gRPC" Version="1.7.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
1 change: 1 addition & 0 deletions Analogy/CommonChangeLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static IEnumerable<AnalogyChangeLog> GetChangeLog()
{
return new List<AnalogyChangeLog>
{
new AnalogyChangeLog("V4.7.6 - Update Analogy.LogViewer.gRPC - remove hard-coded port 6000",AnalogChangeLogType.Bug,"Lior Banai",new DateTime(2021,09,01)),
new AnalogyChangeLog("V4.7.5 - [Plotting] Allow to set default window size #1092",AnalogChangeLogType.Improvement,"Lior Banai",new DateTime(2021,08,07)),
new AnalogyChangeLog("V4.7.5 - [DevExpress] Upgrade version to V21.1.5 #1091",AnalogChangeLogType.Improvement,"Lior Banai",new DateTime(2021,08,07)),
new AnalogyChangeLog("V4.7.5 - [Plotting] Add Generic column plotter #1053",AnalogChangeLogType.Improvement,"Lior Banai",new DateTime(2021,08,07)),
Expand Down
32 changes: 8 additions & 24 deletions Analogy/FilterCriteriaObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,12 @@ public string GetSqlExpression(bool orLogLevel)
var split = text.Split(new[] { '&', '+' }, StringSplitOptions.RemoveEmptyEntries).ToList();
excludedTexts = split.Select(itm => itm.Trim()).ToList();
}
if (UserSettingsManager.UserSettings.SearchAlsoInSourceAndModule)
{
sqlString.Append("((");
}
else
{
sqlString.Append("(");
}

if (orOperationInInclude)
{
sqlString.Append(string.Join(" Or ", includeTexts.Select(t => $" Text like '%{t}%'")));
}
else
{
sqlString.Append(string.Join(" and ", includeTexts.Select(t => $" Text like '%{t}%'")));
}
sqlString.Append(UserSettingsManager.UserSettings.SearchAlsoInSourceAndModule ? "((" : "(");

sqlString.Append(orOperationInInclude
? string.Join(" Or ", includeTexts.Select(t => $" Text like '%{t}%'"))
: string.Join(" and ", includeTexts.Select(t => $" Text like '%{t}%'")));

sqlString.Append(")");

Expand Down Expand Up @@ -191,14 +180,9 @@ public string GetSqlExpression(bool orLogLevel)
if (excludedTexts.Any())
{
sqlString.Append(" and (");
if (orOperationInexclude)
{
sqlString.Append(string.Join(" and ", excludedTexts.Select(t => $" NOT Text like '%{t}%'")));
}
else
{
sqlString.Append(string.Join(" Or ", excludedTexts.Select(t => $" NOT Text like '%{t}%'")));
}
sqlString.Append(orOperationInexclude
? string.Join(" and ", excludedTexts.Select(t => $" NOT Text like '%{t}%'"))
: string.Join(" Or ", excludedTexts.Select(t => $" NOT Text like '%{t}%'")));

sqlString.Append(")");
}
Expand Down
2 changes: 1 addition & 1 deletion Analogy/UserControls/UCLogs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ private void FilterResults()
_filterCriteria.OlderThan = ceOlderThanFilter.Checked ? deOlderThanFilter.DateTime : DateTime.MaxValue;
_filterCriteria.TextInclude = ceIncludeText.Checked ? (txtbInclude.Text == null ? string.Empty : txtbInclude.Text.Trim()) : string.Empty;
_filterCriteria.TextExclude = ceExcludeText.Checked
? (txtbExclude.Text == null ? string.Empty : txtbExclude.Text.Trim()) + "|" + string.Join("|", _excludeMostCommon)
? (txtbExclude.Text == null ? string.Empty : txtbExclude.Text.Trim()) + string.Join("|", _excludeMostCommon)
: string.Empty;

Settings.IncludeText = Settings.SaveSearchFilters && txtbInclude.Text != null ? txtbInclude.Text : string.Empty;
Expand Down

0 comments on commit b08475a

Please sign in to comment.