예제 #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();
        }
예제 #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();
        }
예제 #3
0
 void OnViolationWindow_Closed(object sender, EventArgs e)
 {
     _violationWindow.Closed -= OnViolationWindow_Closed;
     _violationWindow         = null;
 }