editorconfig
This commit is contained in:
2023-10-20 19:37:19 -07:00
parent b54ea97c67
commit a4a92aacd2
68 changed files with 703 additions and 553 deletions

View File

@ -27,7 +27,7 @@ public partial class DragDropSearch : Form
public DragDropSearch()
{
InitializeComponent();
_IdToItem = new();
_IdToItem = [];
AppSettings appSettings;
string workingDirectory;
IsEnvironment isEnvironment;
@ -124,7 +124,7 @@ public partial class DragDropSearch : Form
public static string? GetFaceEncoding(string file)
{
string? result;
List<string> results = new();
List<string> results = [];
const string comment = "Comment: ";
if (File.Exists(file))
{
@ -143,7 +143,7 @@ public partial class DragDropSearch : Form
}
}
}
result = results.Any() ? results[0][comment.Length..] : null;
result = results.Count != 0 ? results[0][comment.Length..] : null;
return result;
}
@ -156,7 +156,7 @@ public partial class DragDropSearch : Form
name = Path.GetFileNameWithoutExtension(path);
Text = name;
segments = name.Split('.');
if (!_IdToItem.Any())
if (_IdToItem.Count == 0)
LoadData();
if (int.TryParse(segments[0], out int id) && _IdToItem.TryGetValue(id, out Item? item))
{