Skip to content

Commit

Permalink
Merge pull request #3 from carfup/v1.2023.1.3
Browse files Browse the repository at this point in the history
v1.2023.1.3
  • Loading branch information
carfup authored Jan 17, 2023
2 parents 9a2fbed + 7088f35 commit 114a319
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
4 changes: 2 additions & 2 deletions ViewRenamer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2023.1.2")]
[assembly: AssemblyFileVersion("1.2023.1.2")]
[assembly: AssemblyVersion("1.2023.1.3")]
[assembly: AssemblyFileVersion("1.2023.1.3")]
42 changes: 21 additions & 21 deletions ViewRenamer/ViewRenamer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ private void LoadEntities()
log.LogData(EventType.Exception, LogAction.LoadEntities, args.Error);
}

lvEntities.BeginUpdate();
foreach(var entity in entities)
lvEntities.ItemChecked -= lvEntities_ItemChecked;
List<ListViewItem> cbItems = new List<ListViewItem>();
cbItems.AddRange(entities.Select(entity => new ListViewItem()
{
lvEntities.Items.Add(new ListViewItem()
{
Text = entity.displayName,
Tag = entity.logicalName
});
}
lvEntities.EndUpdate();
Text = entity.displayName,
Tag = entity.logicalName
}));

lvEntities.Items.AddRange(cbItems.ToArray());
lvEntities.ItemChecked += lvEntities_ItemChecked;

foreach (var language in languages.OrderBy(x => x))
{
Expand Down Expand Up @@ -284,28 +284,28 @@ private void tsbSaveViews_Click(object sender, EventArgs e)

private void tbFilter_TextChanged(object sender, EventArgs e)
{
if (tbFilter.Text != "" && tbFilter.Text.Length < 3)
if (tbFilter.Text == "" )
return;

lvEntities.Items.Clear();
var newList = entities.Where(x => x.displayName.ToLower().Contains(tbFilter.Text.ToLower()));

lvEntities.BeginUpdate();
foreach (var entity in newList)
lvEntities.ItemChecked -= lvEntities_ItemChecked;
List<ListViewItem> cbItems = new List<ListViewItem>();
cbItems.AddRange(newList.Select(entity => new ListViewItem()
{
lvEntities.Items.Add(new ListViewItem()
{
Text = entity.displayName,
Tag = entity.logicalName
});
}
lvEntities.EndUpdate();
Text = entity.displayName,
Tag = entity.logicalName
}).ToArray());

lvEntities.Items.AddRange(cbItems.ToArray());
lvEntities.ItemChecked += lvEntities_ItemChecked;
}

private void tbFilter_Click(object sender, EventArgs e)
{
/* if (tbFilter.Text.ToLower() == "search in tables ...")
tbFilter.Text = "";*/
if (tbFilter.Text.ToLower() == "search in tables ...")
tbFilter.Text = "";
}

private void SortListView(ListView listView, int columnIndex, SortOrder? sort = null)
Expand Down
1 change: 1 addition & 0 deletions ViewRenamer/ViewRenamer.designer.cs

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

5 changes: 4 additions & 1 deletion ViewRenamer/ViewRenamer.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package>
<metadata>
<id>Carfup.XTBPlugins.ViewRenamer</id>
<version>1.2023.1.2</version>
<version>1.2023.1.3</version>
<title>View Renamer</title>
<authors>Clement Olivier</authors>
<owners>Clement Olivier</owners>
Expand All @@ -11,6 +11,9 @@
<description>If you want to rename your views in several languages in few clicks, this is the tool you are looking for !</description>
<summary>Rename your views in few clicks.</summary>
<releaseNotes>
1.2023.1.3
Loading of tables is now almost instant along with the search.

1.2023.1.2
Fix the search in tables
Fix the view loading for the correct table while 2 tables had the same display name
Expand Down

0 comments on commit 114a319

Please sign in to comment.