コード例 #1
0
 public bool converse(string squery)
 {
     try
     {
         eduGRID_Thread thread = new eduGRID_Thread(squery);
         ga.StartThread(thread);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
コード例 #2
0
        private void ThreadFinished(GThread th)
        {
            // cast GThread back to eduGRID_Thread
            eduGRID_Thread thread = (eduGRID_Thread)th;

            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (this.rtfDisplay.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(ThreadFinished);
                this.Invoke(d, new object[] { th });
            }
            else
            {
                rtfDisplay.AppendText(Environment.NewLine + ":: Bot: ");
                rtfDisplay.ScrollToCaret();
                rtfDisplay.AppendText(thread.Result + Environment.NewLine + "_________________________" + Environment.NewLine);
            }
        }
コード例 #3
0
 public bool converse(string squery)
 {
     try
     {
         eduGRID_Thread thread = new eduGRID_Thread(squery);
         ga.StartThread(thread);
         return true;
     }
     catch(Exception ex)
     {
         return false;
     }
 }
コード例 #4
0
 public void ThreadFinished(GThread th)
 {
     // cast GThread back to eduGRID_Thread
     eduGRID_Thread thread = (eduGRID_Thread)th;
 }