public bool converse(string squery) { try { eduGRID_Thread thread = new eduGRID_Thread(squery); ga.StartThread(thread); return(true); } catch (Exception ex) { return(false); } }
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); } }
public bool converse(string squery) { try { eduGRID_Thread thread = new eduGRID_Thread(squery); ga.StartThread(thread); return true; } catch(Exception ex) { return false; } }
public void ThreadFinished(GThread th) { // cast GThread back to eduGRID_Thread eduGRID_Thread thread = (eduGRID_Thread)th; }