Beispiel #1
0
        public ArrayList Start()
        {
            Console.WriteLine("Map.DialogueManager: Start");
            Console.WriteLine("contex=" + this._context);
            ArrayList respList = new ArrayList();

            this._planGraph  = new PlanGraph(this._kbase, this._exec);
            this._isRunning  = true;
            this._currDlgAct = null;

            ArrayList actionList = this._kbase.GetTopActions(this._context);

            if (actionList.Count > 0)
            {
                PlainOptionListData respContent = new PlainOptionListData();
                respContent.Opening = "What can I do for you?";
                foreach (Hashtable actionInfo in actionList)
                {
                    respContent.AddOption(new PlainOptionItemData(actionInfo["act_name"].ToString(), actionInfo["description"].ToString()));
                }
                respList.Add(new DialogueResponse(DialogueResponseType.listPlainOptions, respContent));
            }

            return(respList);
        }
Beispiel #2
0
 public bool Stop()
 {
     Console.WriteLine("Map.DialogueManager: Stop");
     if (this._planGraph != null)
     {
         this._planGraph.Close();
         this._planGraph = null;
     }
     this._isRunning  = false;
     this._currDlgAct = null;
     return(true);
 }
Beispiel #3
0
        public ArrayList Start()
        {
            ArrayList respList = new ArrayList();
            this._planGraph = new PlanGraph(this._kbase, this._exec);
            this._isRunning = true;
            this._currDlgAct = null;

            ArrayList actionList = this._kbase.GetTopActions(this._context);

            if (actionList.Count > 0)
            {
                PlainOptionListData respContent = new PlainOptionListData();
                respContent.Opening = "What can I do for you?";
                foreach (Hashtable actionInfo in actionList)
                {
                    respContent.AddOption(new PlainOptionItemData(actionInfo["act_name"].ToString(), actionInfo["description"].ToString()));
                }
                respList.Add(new DialogueResponse(DialogueResponseType.listPlainOptions, respContent));
            }
            
            return respList;
        }
Beispiel #4
0
 public bool Stop()
 {
     if (this._planGraph != null)
     {
         this._planGraph.Close();
         this._planGraph = null;
     }
     this._isRunning = false;
     this._currDlgAct = null;
     return true;
 }