private void EditAdditionalObject_OnClick(object sender, RoutedEventArgs e)
        {
            // get the selected eventobject from the additional objects list box
            var selectedObject = AdditionalObjectsListBox.SelectedItem as EventObject;

            if (selectedObject == null)
            {
                return;
            }

            var requirementDialog = new RequirementDialog(selectedObject.Requirements)
            {
                Owner = this
            };

            if (requirementDialog.ShowDialog() != true)
            {
                return;
            }

            selectedObject.Requirements = requirementDialog.Requirement;
            selectedObject.Scope        = requirementDialog.Requirement.Scope;

            AdditionalObjectsListBox.Items.Refresh();
        }
        // Requirements
        private void AddRequirement_OnClick(object sender, RoutedEventArgs e)
        {
            var requirementDialog = new RequirementDialog {
                Owner = this
            };

            if (requirementDialog.ShowDialog() != true)
            {
                return;
            }

            _openEvent.EditorRequirements.Add(requirementDialog.Requirement);
            RequirementListBox.SelectedItem = requirementDialog.Requirement;
        }
        // Additional Objects
        private void AddAdditionalObject_OnClick(object sender, RoutedEventArgs e)
        {
            var requirementDialog = new RequirementDialog {
                Owner = this
            };

            if (requirementDialog.ShowDialog() != true)
            {
                return;
            }

            var newObject = new EventObject
            {
                Scope        = requirementDialog.Requirement.Scope,
                Requirements = requirementDialog.Requirement
            };

            _openEvent.AdditionalObjects.Add(newObject);
            AdditionalObjectsListBox.SelectedItem = newObject;
        }
        private void EditRequirement_OnClick(object sender, RoutedEventArgs e)
        {
            if (!(RequirementListBox.SelectedItem is RequirementDef selectedObject))
            {
                return;
            }

            var requirementDialog = new RequirementDialog(selectedObject)
            {
                Owner = this
            };

            if (requirementDialog.ShowDialog() != true)
            {
                return;
            }

            selectedObject.Scope                  = requirementDialog.Requirement.Scope;
            selectedObject.RequirementTags        = requirementDialog.Requirement.RequirementTags;
            selectedObject.ExclusionTags          = requirementDialog.Requirement.ExclusionTags;
            selectedObject.RequirementComparisons = requirementDialog.Requirement.RequirementComparisons;

            RequirementListBox.Items.Refresh();
        }