using System.Windows;

namespace XLAB
{
    public partial class TpvdklEditWindow : Window
    {
        internal TpvdklEditWindow(TpvdklEditWindowViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;
            viewModel.CloseRequested += ViewModelOnCloseRequested;
        }

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