/****************/
 /* AttachRouter */
 /****************/
 public void AttachRouter(
     CLIPSNET.Environment theEnv,
     int priority)
 {
     attachedEnv = theEnv;
     theEnv.AddRouter(m_TextBoxRouter.routerName, priority, m_TextBoxRouter);
 }
Beispiel #2
0
 public MainWindow()
 {
     Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => { OnLoad(); }));
     InitializeComponent();
     clips = new CLIPSNET.Environment();
     clips.LoadFromResource("VMatch", "VMatch.volunteer.clp");
 }
Beispiel #3
0
 /****************/
 /* AttachRouter */
 /****************/
 public void AttachRouter(
     CLIPSNET.Environment theEnv,
     int priority)
 {
     attachedEnv = theEnv;
      theEnv.AddRouter(m_TextBoxRouter.routerName,priority,m_TextBoxRouter);
 }
Beispiel #4
0
 public MainWindow()
 {
     Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() => { OnLoad(); }));
     InitializeComponent();
     clips = new CLIPSNET.Environment();
     clips.LoadFromResource("WineWPFExample", "WineWPFExample.wine.clp");
 }
Beispiel #5
0
        public Clips(string[] args)
        {
            env = new CLIPSNET.Environment();

            Parser.Default.ParseArguments <Options>(args)
            .WithParsed(Init);
        }
Beispiel #6
0
        public TCMmyWellness()
        {
            InitializeComponent();

            heartConditionsComboBox.DataSource       = heartConditions;
            smokeDrinkComboBox.DataSource            = smokeDrinkConditions;
            sleepComboBox.DataSource                 = sleepConditions;
            overweightConditionsComboBox.DataSource  = overweightConditions;
            diabetesConditionComboBox.DataSource     = diabetesConditions;
            hypertensionConditionComboBox.DataSource = hypertensionConditions;
            stressConditionComboBox.DataSource       = stressConditions;

            clips = new CLIPSNET.Environment();
            clips.LoadFromResource("TCMmyWellness", "TCMmyWellness.TCMmyWellness.clp");
        }
 public void RunExample(
     BackgroundWorker worker,
     DoWorkEventArgs e,
     CLIPSNET.Environment theEnv)
 {
     theEnv.Reset();
     while (theEnv.Run(1) > 0)
     {
         if (worker.CancellationPending == true)
         {
             e.Cancel = true;
             return;
         }
     }
 }
Beispiel #8
0
        /************************/
        /* CommandPromptTextBox */
        /************************/
        public CommandPromptTextBox(
            CLIPSNET.Environment theEnv)
        {
            clips = theEnv;
            InitializeComponent();
            AttachRouter(clips, 10);
            clips.PrintBanner();
            clips.PrintPrompt();

            maxCommandCount     = DEFAULT_COMMAND_MAX;
            currentCommandCount = 1;
            currentCommand      = 0;

            commandHistory = new List <String>(DEFAULT_COMMAND_MAX);
            commandHistory.Add("");
        }
Beispiel #9
0
        /********************/
        /* WatchNoneClicked */
        /********************/
        private void WatchNoneClicked(object sender, RoutedEventArgs e)
        {
            CLIPSNET.Environment theEnv = this.dialog.GetEnvironment();

            theEnv.Unwatch("activations");
            theEnv.Unwatch("compilations");
            theEnv.Unwatch("deffunctions");
            theEnv.Unwatch("facts");
            theEnv.Unwatch("focus");
            theEnv.Unwatch("generic-functions");
            theEnv.Unwatch("globals");
            theEnv.Unwatch("instances");
            theEnv.Unwatch("message-handlers");
            theEnv.Unwatch("messages");
            theEnv.Unwatch("methods");
            theEnv.Unwatch("rules");
            theEnv.Unwatch("slots");
            theEnv.Unwatch("statistics");
        }
        static void Main(string[] args)
        {
            CLIPSNET.Environment clips = new CLIPSNET.Environment();
            clips.Build("(deftemplate person (slot name) (slot age))");
            clips.AssertString("(person (name \"Fred Jones\") (age 17))");
            clips.AssertString("(person (name \"Sally Smith\") (age 23))");
            clips.AssertString("(person (name \"Wally North\") (age 35))");
            clips.AssertString("(person (name \"Jenny Wallis\") (age 11))");
            Console.WriteLine("All people:");
            List <FactAddressValue> people = clips.FindAllFacts("person");

            foreach (FactAddressValue p in people)
            {
                Console.WriteLine(" " + p["name"]);
            }
            Console.WriteLine("All adults:");
            people = clips.FindAllFacts("?f", "person", "(>= ?f:age 18)");
            foreach (FactAddressValue p in people)
            {
                Console.WriteLine(" " + p["name"]);
            }
        }
        public WineFormsExample()
        {
            InitializeComponent();

            preferredColorChoices     = GenerateChoices(preferredColorNames);
            preferredBodyChoices      = GenerateChoices(preferredBodyNames);
            preferredSweetnessChoices = GenerateChoices(preferredSweetnessNames);

            mainCourseChoices = GenerateChoices(mainCourseNames);
            sauceChoices      = GenerateChoices(sauceNames);
            flavorChoices     = GenerateChoices(flavorNames);

            colorComboBox.DataSource     = preferredColorChoices;
            bodyComboBox.DataSource      = preferredBodyChoices;
            sweetnessComboBox.DataSource = preferredSweetnessChoices;

            mainCourseComboBox.DataSource = mainCourseChoices;
            sauceComboBox.DataSource      = sauceChoices;
            flavorComboBox.DataSource     = flavorChoices;

            clips = new CLIPSNET.Environment();
            clips.LoadFromResource("WineFormsExample", "WineFormsExample.wine.clp");
        }
Beispiel #12
0
        public WineFormsExample()
        {
            InitializeComponent();

             preferredColorChoices = GenerateChoices(preferredColorNames);
             preferredBodyChoices = GenerateChoices(preferredBodyNames);
             preferredSweetnessChoices = GenerateChoices(preferredSweetnessNames);

             mainCourseChoices = GenerateChoices(mainCourseNames);
             sauceChoices = GenerateChoices(sauceNames);
             flavorChoices = GenerateChoices(flavorNames);

             colorComboBox.DataSource = preferredColorChoices;
             bodyComboBox.DataSource = preferredBodyChoices;
             sweetnessComboBox.DataSource = preferredSweetnessChoices;

             mainCourseComboBox.DataSource = mainCourseChoices;
             sauceComboBox.DataSource = sauceChoices;
             flavorComboBox.DataSource = flavorChoices;

             clips = new CLIPSNET.Environment();
             clips.LoadFromResource("WineFormsExample","WineFormsExample.wine.clp");
        }
 /****************/
 /* AttachRouter */
 /****************/
 public void AttachRouter(
     CLIPSNET.Environment theEnv)
 {
     attachedEnv = theEnv;
     attachedEnv.AddRouter(m_TextBoxRouter);
 }