private void deleteCondition_Click(object sender, System.EventArgs e)
        {
            var deleteConditionForm = new DeleteValueForm(_conditions.Select(c => c.FuzzyVariable.Name).ToArray());

            deleteConditionForm.OnDeleteItem += DeleteCondition;
            deleteConditionForm.ShowDialog();

            RefreshConditionsListView();
        }
Example #2
0
        private void deleteVariable_Click(object sender, EventArgs e)
        {
            var values          = _variables.Select(x => x.Name).ToArray();
            var deleteValueForm = new DeleteValueForm(values);

            deleteValueForm.OnDeleteItem += (s) =>
            {
                var variable = this._variables.FirstOrDefault(x => x.Name == s);
                if (variable != null)
                {
                    this._variables.Remove(variable);
                }
            };
            deleteValueForm.ShowDialog();

            RefreshVariablesListView();
        }
        private void deleteValue_Click(object sender, System.EventArgs e)
        {
            var values          = _terms.Select(x => x.Name).ToArray();
            var deleteValueForm = new DeleteValueForm(values);

            deleteValueForm.OnDeleteItem += (name) =>
            {
                var value = _terms.FirstOrDefault(x => x.Name == name);
                if (value != null)
                {
                    _terms.Remove(value);
                }
            };
            deleteValueForm.ShowDialog();

            RefreshFormListView();
        }
Example #4
0
        private void deleteRule_Click(object sender, EventArgs e)
        {
            var values          = _rules.Select(x => string.Join(",", x.ToStringArray())).ToArray();
            var deleteValueForm = new DeleteValueForm(values);

            deleteValueForm.OnDeleteItem += (ruleString) =>
            {
                var rule = _rules.FirstOrDefault(x => string.Join(",", x.ToStringArray()) == ruleString);
                if (rule != null)
                {
                    _rules.Remove(rule);
                }
            };
            deleteValueForm.ShowDialog();

            RefreshRulesListView();
        }