using System.Windows;

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

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