private void EditInterlockHandler(object parameter)
        {
            if (SelectedInterlock != null)
            {
                AddEditInterlockDialog dialog = new AddEditInterlockDialog(SelectedInterlock, mControlSystem.Interlocks);
                dialog.Show();

                dialog.Closed += (s1, e1) =>
                    {
                        if (dialog.DialogResult == true)
                        {
                            RaisePropertyChanged("Interlocks");
                            SelectedInterlock = dialog.Interlock;
                            Utils.OnCollectionChanged(EventAggregator, mControlSystem, PROPERTYNAME, true);
                        }
                    };
            }
        }
        private void DisplayAddInterlockDialog()
        {
            AddEditInterlockDialog dialog = new AddEditInterlockDialog(mControlSystem.Id, mControlSystem.Interlocks);
            dialog.Show();
            dialog.Closed +=
                (s1, e1) =>
                    {
                        if (dialog.Interlock != null)
                        {
                            mControlSystem.Interlocks.Add(dialog.Interlock);

                            RaiseChangeEvent();
                            OnCollectionChanged();
                            RaisePropertyChanged("Interlocks");
                        }
                    };
        }