private void OpenAddUserWindow(UserDto newUser)
        {
            AddUserWindow window = new AddUserWindow();

            window.Owner = this;
            AddUserWindowViewModel viewModel = (AddUserWindowViewModel)window.DataContext;

            viewModel.User = newUser;
            window.ShowDialog();
        }
예제 #2
0
        public AddUserWindowView()
        {
            InitializeComponent();

            AddUserWindowViewModel viewModel = new AddUserWindowViewModel();

            DataContext = viewModel;

            Closing += viewModel.OnWindowClosing;

            Messenger.Default.Register <NotificationMessage>(this, m =>
            {
                if (m.Notification == "Close")
                {
                    this.Close();
                }
            });
        }