Ejemplo n.º 1
0
        void ShowViolationWindow(object param)
        {
            _violationWindow         = new ProtocolViolationView(SelectedViolation);
            _violationWindow.Closed += OnViolationWindow_Closed;
            EventHandler violCloseHandler = null;

            violCloseHandler = delegate
            {
                _violationWindow.Close();
                SelectedViolation.RequestClose -= violCloseHandler;
            };

            SelectedViolation.RequestClose += violCloseHandler;
            _violationWindow.Show();
        }
Ejemplo n.º 2
0
        void ShowProtocolViolation(object param)
        {
            var viol = new ProtocolViolationModel
            {
                Participant = SelectedParticipant.ParticipantModel
            };
            var violVM   = new ProtocolViolationViewModel(_repository, viol);
            var violView = new ProtocolViolationView(violVM);

            EventHandler violCloseHandler = null;

            violCloseHandler = delegate
            {
                violView.Close();
                violVM.RequestClose -= violCloseHandler;
            };

            violVM.RequestClose += violCloseHandler;
            violView.ShowDialog();
        }