Beispiel #1
0
        public LogicTestingForm()
        {
            InitializeComponent();
            form   = new FuzzyFactCreationForm();
            facts1 = new BindingList <FuzzyVariable>();
            facts2 = new BindingList <FuzzyVariable>();

            //facts.RaiseListChangedEvents = true;

            firstName.DataSource    = facts1;
            secondName.DataSource   = facts2;
            firstName.DisplayMember = secondName.DisplayMember = "Name";
            firstName.ValueMember   = secondName.ValueMember = "Name";

            firstValue.DisplayMember = secondValue.DisplayMember = "Key";
            firstValue.ValueMember   = secondValue.ValueMember = "Key";

            types = new BindingList <OperationType>();
            foreach (var value in Enum.GetValues(typeof(OperationType)))
            {
                types.Add((OperationType)value);
            }
            operationType.DataSource = types;
            operations = new BindingList <string>();
            operations.Add("И");
            operations.Add("НЕ");
            operations.Add("ИЛИ");
            operation.DataSource = operations;

            chart.ChartAreas[0].AxisY.Minimum  = -1;
            chart.ChartAreas[0].AxisY.Maximum  = 2;
            chart.ChartAreas[0].AxisY.Interval = 1;
        }
Beispiel #2
0
 private void CreateVariable(object sender, EventArgs e)
 {
     form = new FuzzyFactCreationForm();
     form.ShowDialog();
     this.facts1.Add((FuzzyVariable)form.CurrentFact.Clone());
     this.facts2.Add((FuzzyVariable)form.CurrentFact.Clone());
     this.firstName.Update();
 }