public MainWindow(MessageBoxFacade messageBoxFacade, IKernel kernel, MainViewModel viewModel, DepartmentMoverFactory departmentMoverFactory) { if (messageBoxFacade == null) { throw new ArgumentNullException(nameof(messageBoxFacade)); } if (kernel == null) { throw new ArgumentNullException(nameof(kernel)); } if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } if (departmentMoverFactory == null) { throw new ArgumentNullException(nameof(departmentMoverFactory)); } DataContext = viewModel; InitializeComponent(); _messageBoxFacade = messageBoxFacade; _kernel = kernel; _viewModel = viewModel; _departmentMoverFactory = departmentMoverFactory; }
public InputControl(MessageBoxFacade messageBoxFacade) { InitializeComponent(); Background = Brushes.LightGray; _messageBoxFacade = messageBoxFacade ?? throw new ArgumentNullException(nameof(messageBoxFacade)); Loaded += (sender, args) => { InputTextBox.Focus(); }; }
public AdminWindow(AdminViewModel viewModel, MessageBoxFacade messageBoxFacade) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } if (messageBoxFacade == null) { throw new ArgumentNullException(nameof(messageBoxFacade)); } InitializeComponent(); DataContext = viewModel; _viewModel = viewModel; _messageBoxFacade = messageBoxFacade; }
public AddUserWindow(AddUserViewModel viewModel, MessageBoxFacade messageBoxFacade) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } if (messageBoxFacade == null) { throw new ArgumentNullException(nameof(messageBoxFacade)); } if (!viewModel.Departments.Any()) { throw new ArgumentNullException(nameof(viewModel.Departments)); } InitializeComponent(); DataContext = viewModel; _viewModel = viewModel; _messageBoxFacade = messageBoxFacade; }