using System.Windows;

namespace XLAB2
{
    public partial class PrsnEditWindow : Window
    {
        internal PrsnEditWindow(PrsnEditWindowViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;
            viewModel.CloseRequested += ViewModelOnCloseRequested;
        }

        private void ViewModelOnCloseRequested(object sender, bool? dialogResult)
        {
            DialogResult = dialogResult;
            Close();
        }
    }
}
