Skip to content

Commit

Permalink
Update column names with latest Analogy Interface fix #138
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed May 20, 2023
1 parent 7ebecb8 commit fcc7a38
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<Description>Plain text parser for Analogy Log Viewer</Description>
<PackageReleaseNotes>Align with changes in interface API</PackageReleaseNotes>
<Company>Analogy.LogViewer</Company>
<Version>3.8.3</Version>
<Version>3.8.3.1</Version>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
230 changes: 104 additions & 126 deletions Analogy.LogViewer.PlainTextParser/AnalogyColumnsMatcherUC.Designer.cs

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

9 changes: 4 additions & 5 deletions Analogy.LogViewer.PlainTextParser/AnalogyColumnsMatcherUC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ private void BtnMoveDown_Click(object sender, EventArgs e)
return;
}
var selectedIndex = lstBAnalogyColumns.SelectedIndex;
var currentValue = lstBAnalogyColumns.Items[selectedIndex + 1];
lstBAnalogyColumns.Items[selectedIndex + 1] = lstBAnalogyColumns.Items[selectedIndex];
lstBAnalogyColumns.Items[selectedIndex] = currentValue;
(lstBAnalogyColumns.Items[selectedIndex + 1], lstBAnalogyColumns.Items[selectedIndex]) =
(lstBAnalogyColumns.Items[selectedIndex], lstBAnalogyColumns.Items[selectedIndex + 1]);
lstBAnalogyColumns.SelectedIndex = lstBAnalogyColumns.SelectedIndex + 1;
}

Expand All @@ -64,9 +63,9 @@ public void LoadMapping(ISplitterLogParserSettings parser)
lstBAnalogyColumns.Items.Clear();
for (int i = 0; i < 21; i++)
{
if (parser.Maps.ContainsKey(i))
if (parser.Maps.TryGetValue(i, out var map))
{
lstBAnalogyColumns.Items.Add(parser.Maps[i]);
lstBAnalogyColumns.Items.Add(map);
}
else
{
Expand Down
Loading

0 comments on commit fcc7a38

Please sign in to comment.