Skip to content

Commit

Permalink
NET8
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Nov 16, 2023
1 parent 58e1447 commit f6fea3d
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 96 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ dotnet_diagnostic.SA1122.severity = suggestion
dotnet_diagnostic.SA1108.severity = silent
dotnet_diagnostic.SA1012.severity = error
dotnet_diagnostic.SA1500.severity = error
dotnet_diagnostic.SA1316.severity = error

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v1.3.1

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
Expand Down
8 changes: 8 additions & 0 deletions Analogy.LogViewer.WordsSearch.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ VisualStudioVersion = 17.3.32922.545
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analogy.LogViewer.WordsSearch", "Analogy.LogViewer.WordsSearch\Analogy.LogViewer.WordsSearch.csproj", "{2AD9E10E-0033-4889-B484-EA32C3ADBE18}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FBBBBACB-5528-4B9D-90DE-B2E930445A97}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet-core-desktop.yml = .github\workflows\dotnet-core-desktop.yml
nuget.config = nuget.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
46 changes: 8 additions & 38 deletions Analogy.LogViewer.WordsSearch/Analogy.LogViewer.WordsSearch.csproj
Original file line number Diff line number Diff line change
@@ -1,57 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<VersionPrefix>6.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Authors>Lior Banai</Authors>
<Company>Analogy.LogViewer</Company>
<Product>Analogy.LogViewer.WordsSearch</Product>
<PackageId>Analogy.LogViewer.WordsSearch</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>Lior Banai © 2022-2023</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>Lior Banai © 2022-2024</Copyright>
<PackageProjectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.WordsSearch</PackageProjectUrl>
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.WordsSearch</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>icon.png</PackageIcon>
<PackageIconUrl />
<Description>Worlds Search for Analogy Log Viewer</Description>
<PackageReleaseNotes>Worlds Search for Analogy Log Viewer</PackageReleaseNotes>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<VersionPrefix>5.0.3.1</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Analogy.CommonUtilities" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Template" Version="5.0.3" />
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' or '$(TargetFramework)' == 'net471' ">
<PackageReference Include="PolySharp" Version="1.12.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Analogy.CommonUtilities" Version="6.0.0" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="6.0.0.1" />
<PackageReference Include="Analogy.LogViewer.Template" Version="6.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<None Include="..\icon.png">
Expand Down
6 changes: 2 additions & 4 deletions Analogy.LogViewer.WordsSearch/CharPosition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ namespace Analogy.LogViewer.WordsSearch
{
public class CharPosition
{

public int Position { get; set; }
public char Char { get; set; }

public CharPosition()
{

}
public CharPosition(char c, int p)
{
Expand All @@ -23,7 +21,7 @@ public CharPosition(char c, int p)
}
public override string ToString()
{
return $"[{Position+1}]:{Char}";
return $"[{Position + 1}]:{Char}";
}
}
}
}
12 changes: 6 additions & 6 deletions Analogy.LogViewer.WordsSearch/IAnalogy/PrimaryFactory.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using Analogy.Interfaces;
using Analogy.LogViewer.WordsSearch.Properties;
using System;
using System.Collections.Generic;
using System.Drawing;
using Analogy.Interfaces;
using Analogy.LogViewer.WordsSearch.Properties;

namespace Analogy.LogViewer.WordsSearch.IAnalogy
{
Expand All @@ -17,9 +17,9 @@ public class PrimaryFactory : Analogy.LogViewer.Template.PrimaryFactory

public override IEnumerable<IAnalogyChangeLog> ChangeLog { get; set; } = new List<AnalogyChangeLog>
{
new AnalogyChangeLog("Initial Version",AnalogChangeLogType.None, "Lior Banai",new DateTime(2022, 10, 01), ""),
};
new AnalogyChangeLog("Initial Version", AnalogChangeLogType.None, "Lior Banai", new DateTime(2022, 10, 01), ""),
};
public override IEnumerable<string> Contributors { get; set; } = new List<string> { "Lior Banai" };
public override string About { get; set; } = "Analogy Words Search";
}
}
}
32 changes: 14 additions & 18 deletions Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System;
using Analogy.Interfaces;
using Analogy.Interfaces.DataTypes;
using Analogy.LogViewer.WordsSearch.Managers;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Analogy.Interfaces;
using Analogy.Interfaces.DataTypes;
using Analogy.LogViewer.WordsSearch.Managers;
using Microsoft.Extensions.Logging;

namespace Analogy.LogViewer.WordsSearch.IAnalogy
{
Expand All @@ -26,10 +26,10 @@ public sealed class WordSearchDataProvider : IAnalogySingleFileDataProvider
public string OptionalTitle { get; set; }

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).

Check warning on line 26 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Nullability of reference types in type of parameter 'value' of 'void WordSearchDataProvider.OptionalTitle.set' doesn't match implicitly implemented member 'void IAnalogyDataProvider.OptionalTitle.set' (possibly because of nullability attributes).
public bool UseCustomColors { get; set; }
public AnalogyToolTip? ToolTip { get; set; }
private readonly char[] ignored = new []{'[',']','{','}','(',')',',','"',':','.','0','1','2','3','4','5','6','7','8','9', '\'', '“' };
public IEnumerable<(string originalHeader, string replacementHeader)> GetReplacementHeaders()
private readonly char[] ignored = new[] { '[', ']', '{', '}', '(', ')', ',', '"', ':', ';', '`', '.', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '\'', '“' };
public IEnumerable<(string OriginalHeader, string ReplacementHeader)> GetReplacementHeaders()
=> Array.Empty<(string, string)>();
public (Color backgroundColor, Color foregroundColor) GetColorForMessage(IAnalogyLogMessage logMessage)
public (Color BackgroundColor, Color ForegroundColor) GetColorForMessage(IAnalogyLogMessage logMessage)
=> (Color.Empty, Color.Empty);

public WordSearchDataProvider()
Expand Down Expand Up @@ -65,7 +65,7 @@ public async Task<IEnumerable<IAnalogyLogMessage>> Process(CancellationToken tok
AnalogyLogLevel.Critical, AnalogyLogClass.General, "Analogy", "None")
{
Source = "Analogy",
Module = System.Diagnostics.Process.GetCurrentProcess().ProcessName
Module = System.Diagnostics.Process.GetCurrentProcess().ProcessName,
};
messagesHandler.AppendMessage(empty, FileNamePath);
return new List<AnalogyLogMessage> { empty };
Expand Down Expand Up @@ -97,15 +97,14 @@ public async Task<IEnumerable<IAnalogyLogMessage>> Process(CancellationToken tok
}
catch (Exception e)
{

AnalogyLogMessage empty = new AnalogyLogMessage($"Error occurred processing file {FileNamePath}. Reason: {e.Message}",
AnalogyLogLevel.Critical, AnalogyLogClass.General, "Analogy", "None")
{
Source = "Analogy",
Module = System.Diagnostics.Process.GetCurrentProcess().ProcessName
Module = System.Diagnostics.Process.GetCurrentProcess().ProcessName,
};
messagesHandler.AppendMessage(empty, FileNamePath);
};
}
}

return FilterWords(messagesHandler);
Expand All @@ -117,13 +116,11 @@ private IEnumerable<IAnalogyLogMessage> FilterWords(ILogMessageCreatedHandler me
List<IAnalogyLogMessage> messages = new List<IAnalogyLogMessage>();
WordsSearchSettingsForm form = new WordsSearchSettingsForm();
form.ShowDialog();


foreach (var word in Settings.AllLoadedWords)
{
var lower = word.Text.ToLower();

Check warning on line 121 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Dereference of a possibly null reference.

Check warning on line 121 in Analogy.LogViewer.WordsSearch/IAnalogy/WordSearchDataProvider.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Dereference of a possibly null reference.
bool add = word.Text.Length == Settings.Length && ignored.All(c => !word.Text.Contains(c));

foreach (var wp in Settings.CharsPositions)
{
if (!add)
Expand All @@ -141,7 +138,6 @@ private IEnumerable<IAnalogyLogMessage> FilterWords(ILogMessageCreatedHandler me
{
words.Add(word);
}

}

int count = 0;
Expand All @@ -160,7 +156,7 @@ private IEnumerable<IAnalogyLogMessage> FilterWords(ILogMessageCreatedHandler me
CompareProcessId = false,
CompareSource = false,
CompareThread = false,
CompareUser = false
CompareUser = false,
};
foreach (var word in words.Distinct(comparer)
.OrderBy(m => m.Text))
Expand All @@ -176,4 +172,4 @@ private IEnumerable<IAnalogyLogMessage> FilterWords(ILogMessageCreatedHandler me
return messages;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.LogViewer.Template;
using System;
using System.Collections.Generic;

namespace Analogy.LogViewer.WordsSearch.IAnalogy
{
Expand All @@ -15,4 +15,4 @@ public class WordsSearchDataProviderFactory : DataProvidersFactory
new WordSearchDataProvider(),
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ public override string InstalledVersionNumber
public override string? LatestVersionNumber { get; set; }
public override TargetFrameworkAttribute CurrentFrameworkAttribute { get; set; } = (TargetFrameworkAttribute)Assembly.GetExecutingAssembly().GetCustomAttribute(typeof(TargetFrameworkAttribute));

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Converting null literal or possible null value to non-nullable type.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Converting null literal or possible null value to non-nullable type.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Converting null literal or possible null value to non-nullable type.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Possible null reference assignment.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Converting null literal or possible null value to non-nullable type.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Possible null reference assignment.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Converting null literal or possible null value to non-nullable type.

Check warning on line 33 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchDownloadInformation.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Possible null reference assignment.
protected override string RepositoryURL { get; set; } = "https://api.github.com/repos/LiorBanai/Analogy.LogViewer.WordsSearch";

}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using Analogy.LogViewer.Template;
using Analogy.Interfaces;
using Analogy.LogViewer.Template;
using Analogy.LogViewer.WordsSearch.Managers;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.Interfaces;
using Analogy.LogViewer.WordsSearch.Managers;
using Microsoft.Extensions.Logging;

namespace Analogy.LogViewer.WordsSearch.IAnalogy
{
public class WordsSearchUserSettingsFactory: TemplateUserSettingsFactory
public class WordsSearchUserSettingsFactory : TemplateUserSettingsFactory
{
public override string Title { get; set; } = "Words Search settings";
public override UserControl DataProviderSettings { get; set; }

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 17 in Analogy.LogViewer.WordsSearch/IAnalogy/WordsSearchUserSettingsFactory.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Non-nullable property 'DataProviderSettings' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
Expand All @@ -29,4 +29,4 @@ public override Task SaveSettingsAsync()
return Task.CompletedTask;
}
}
}
}
9 changes: 4 additions & 5 deletions Analogy.LogViewer.WordsSearch/Managers/UserSettingsManager.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using Analogy.Interfaces;
using Analogy.LogViewer.WordsSearch.Properties;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Analogy.Interfaces;
using Analogy.LogViewer.WordsSearch.Properties;

namespace Analogy.LogViewer.WordsSearch.Managers
{
Expand Down Expand Up @@ -69,12 +69,11 @@ public void Save()
Settings.Default.UpgradeRequired = false;
Settings.Default.FilesLocation = FilesLocation;
Settings.Default.Save();

}

public void ClearAllPositions()
{
CharsPositions.Clear();
}
}
}
}
11 changes: 4 additions & 7 deletions Analogy.LogViewer.WordsSearch/WordsSearchSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ private void btnDeleteSelection_Click(object sender, EventArgs e)
Settings.RemovePosition(p);
RefreshList();
}

}

private void btnAddOrReplace_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtbChr.Text))
{
CharPosition p = new CharPosition(txtbChr.Text[0], decimal.ToInt32(nudPosition.Value-1));
CharPosition p = new CharPosition(txtbChr.Text[0], decimal.ToInt32(nudPosition.Value - 1));
Settings.AddOrReplacePosition(p);
RefreshList();
}
Expand All @@ -66,10 +65,8 @@ private void btnFolderSelection_Click(object sender, EventArgs e)

private void btnClearAll_Click(object sender, EventArgs e)
{

Settings.ClearAllPositions();
RefreshList();

Settings.ClearAllPositions();
RefreshList();
}
}
}
}
6 changes: 3 additions & 3 deletions Analogy.LogViewer.WordsSearch/WordsSearchSettingsForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Analogy.LogViewer.WordsSearch.Managers;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
Expand All @@ -7,7 +8,6 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.LogViewer.WordsSearch.Managers;

namespace Analogy.LogViewer.WordsSearch
{
Expand All @@ -30,4 +30,4 @@ private void WordsSearchSettingsForm_FormClosing(object sender, FormClosingEvent
UserSettingsManager.UserSettings.Save();
}
}
}
}
Loading

0 comments on commit f6fea3d

Please sign in to comment.