예제 #1
0
 private void discard_Click(object sender, EventArgs e) // Сбросить
 {
     lim.Abort();
     textBox2.Text = "";
     response.Items.Clear();
     richTextBox1.Clear();
     richTextBox2.Clear();
     discard.Enabled = false;
     EnabledControls(true);
     inferenceMachine = null;
     knowledgeBase.Clear();
     knowledgeBase.LoadOut(textBox1.Text);
 }
예제 #2
0
        private void begin_Click(object sender, EventArgs e) // Начать
        {
            discard.Enabled = true;
            EnabledControls(false);

            inferenceMachine = new LogicalInferenceMachine(knowledgeBase)
            {
                question  = textBox2,
                answer    = response,
                dialog    = richTextBox1,
                reasoning = richTextBox2
            };

            if (checkBox1.Checked == false)
            {
                lim = new Thread(inferenceMachine.LogicalInferenceStart);
            }
            else
            {
                lim = new Thread(inferenceMachine.LogicalInverseInferenceStart);
            }

            lim.Start();
        }