private void _addRuleButton_Click(object sender, EventArgs e)
        {
            var pathRule = new PathRule();

            using (var pathRuleForm = new PathRuleForm(pathRule))
            {
                if (pathRuleForm.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                _rulesListView.Items.Add(new PathRuleListViewItem(pathRule));

                UpdateEnabledState();
            }
        }
        private void _editRuleButton_Click(object sender, EventArgs e)
        {
            foreach (PathRuleListViewItem ruleListViewItem in _rulesListView.SelectedItems)
            {
                if (ruleListViewItem == null)
                {
                    continue;
                }

                var pathRule = ruleListViewItem.PathRule;

                using (var pathRuleForm = new PathRuleForm(pathRule))
                {
                    if (pathRuleForm.ShowDialog(this) == DialogResult.OK)
                    {
                        ruleListViewItem.PathRule = pathRule;
                    }
                }
            }
        }