This commit is contained in:
Курнат Андрей
2026-04-03 21:06:10 +03:00
parent 1b20b39aca
commit a2b4762702
16 changed files with 1170 additions and 33 deletions

View File

@@ -0,0 +1,35 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace XLAB2
{
public partial class AccountingBookDirectoryWindow : Window
{
private readonly AccountingBookDirectoryWindowViewModel _viewModel;
internal AccountingBookDirectoryWindow(DocumentNumberDirectoryService documentNumberDirectoryService)
{
InitializeComponent();
_viewModel = new AccountingBookDirectoryWindowViewModel(
documentNumberDirectoryService,
new DialogService(this, documentNumberDirectoryService));
DataContext = _viewModel;
}
private void DataGridRow_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
var row = sender as DataGridRow;
if (row != null)
{
row.IsSelected = true;
row.Focus();
}
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
_viewModel.Initialize();
}
}
}