Exemplo n.º 1
0
        public PresenterChat()
        {
            MaterialForm = new CFormChat();
            View         = (IFormChat)MaterialForm;
            FormControl  = View.FormControl;
            QueryParser  = new Model.QueryParser();

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed      += view_Closed;
            View.ProcessMessage  += View_ProcessMessage;

            workerProcessMessage = new OverlayBackgroundWorker();
            workerProcessMessage.DisplayControl      = View.FormControl;
            workerProcessMessage.DoWork             += ProcessQuery;
            workerProcessMessage.RunWorkerCompleted += DisplayQuery;
        }
Exemplo n.º 2
0
        public PresenterChat()
        {
            MaterialForm = new CFormChat();
            View         = (IFormChat)MaterialForm;
            FormControl  = View.FormControl;
            QueryParser  = new Query.QueryParser();
            this.QueryParser.UpdateAIMLKnowledge();
            responseHistory = new List <string>();
            responseHistory.Add("");
            responseHistoryIndex = 0;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed      += view_Closed;
            View.ProcessMessage  += View_ProcessMessage;
            View.KeyUpPressed    += View_KeyUpPressed;
            View.KeyDownPressed  += View_KeyDownPressed;

            workerProcessMessage = new OverlayBackgroundWorker();
            workerProcessMessage.DisplayControl      = View.FormControl;
            workerProcessMessage.DoWork             += ProcessQuery;
            workerProcessMessage.RunWorkerCompleted += DisplayQuery;
        }