Working ver.1.2

This commit is contained in:
2026-04-02 09:59:15 +05:00
parent fc2c07e7d0
commit 87416e73ac
2 changed files with 10 additions and 7 deletions

View File

@@ -13,12 +13,8 @@
<TextBox x:Name="txtClientName" IsReadOnly="True" Background="#3D3D3D" Foreground="White" Margin="0,0,0,15"/>
<TextBlock Text="Записи:" Margin="0,5" Foreground="White"/>
<ListBox x:Name="RecordsListBox" Height="150" Background="#2D2D2D" Foreground="White" BorderBrush="White">
<ListBox.ItemTemplate>
<DataTemplate>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox x:Name="RecordsListBox" Height="150" Background="#2D2D2D" Foreground="White" BorderBrush="White" DisplayMemberPath="DateEntry">
</ListBox>
<!-- Кнопки управления -->

View File

@@ -39,7 +39,14 @@ namespace WpfApp1
if (File.Exists(FilePath))
{
string json = File.ReadAllText(FilePath);
_allEntries = JsonSerializer.Deserialize<List<Entry>>(json) ?? new List<Entry>();
// Добавляем настройки
var options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
};
_allEntries = JsonSerializer.Deserialize<List<Entry>>(json, options) ?? new List<Entry>();
}
RefreshList();
}