91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.03MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-13
  • 語言: C#
  • 標簽: C#??聊天機??器人??

資源簡介

C#聊天機器人

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Net;
using?System.IO;
using?Newtonsoft.Json;//程序需引用Newtonsoft.Json?
using?System.Speech.Synthesis;
//下載地址http://json.codeplex.com/或者:http://pan.baidu.com/s/1pJszMDd

namespace?聊天機器人
{
????public?partial?class?Form1?:?Form
????{
????????HttpWebResponse?Response?=?null;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????//
????????///?
????????///?對話圖靈機器人
????????///?

????????///?
????????///?
????????public?string?ConnectTuLing(string?p_strMessage)
????????{
????????????string?result?=?null;
????????????try
????????????{
????????????????//注冊碼自己到網上注冊去
????????????????String?APIKEY?=?“c32ccaa805b6441be76bc18074f12e51“;
????????????????String?_strMessage?=?p_strMessage;
????????????????String?INFO?=?Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(_strMessage));
????????????????String?getURL?=?“http://www.tuling123.com/openapi/api?key=“?+?APIKEY?+?“&info=“?+?INFO;
????????????????HttpWebRequest?MyRequest?=?(HttpWebRequest)HttpWebRequest.Create(getURL);
????????????????HttpWebResponse?MyResponse?=?(HttpWebResponse)MyRequest.GetResponse();
????????????????Response?=?MyResponse;
????????????????using?(Stream?MyStream?=?MyResponse.GetResponseStream())
????????????????{
????????????????????long?ProgMaximum?=?MyResponse.ContentLength;
????????????????????long?totalDownloadedByte?=?0;
????????????????????byte[]?by?=?new?byte[1024];
????????????????????int?osize?=?MyStream.Read(by?0?by.Length);
????????????????????Encoding?encoding?=?Encoding.UTF8;
????????????????????while?(osize?>?0)
????????????????????{
????????????????????????totalDownloadedByte?=?osize?+?totalDownloadedByte;
????????????????????????result?+=?encoding.GetString(by?0?osize);
????????????????????????long?ProgValue?=?totalDownloadedByte;
????????????????????????osize?=?MyStream.Read(by?0?by.Length);
????????????????????}
????????????????}
????????????????//解析json
????????????????JsonReader?reader?=?new?JsonTextReader(new?StringReader(result));
????????????????while?(reader.Read())
????????????????{
????????????????????//text中的內容才是你需要的
????????????????????if?(reader.Path?==?“text“)
????????????????????{
????????????????????????//結果賦值
????????????????????????result?=?reader.Value.ToString();
????????????????????}
????????????????????Console.WriteLine(reader.TokenType?+?“\t\t“?+?reader.ValueType?+?“\t\t“?+?reader.Value);
????????????????}
????????????}
????????????catch?(Exception)
????????????{
????????????????throw;
????????????}
????????????return?result;
????????}
????????private?void?btn_close_Click(object?sender?EventArgs?e)
????????{
????????????this.FindForm().Close();//關閉按鈕事件代碼
????????}

????????pri

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????10366??2016-10-05?21:16??聊天機器人\1.ico

?????文件????1219305??2017-03-30?23:30??聊天機器人\源碼+視頻.pdf

?????文件??????10366??2016-10-05?21:17??聊天機器人\聊天機器人\1.ico

?????文件????????184??2016-10-05?20:32??聊天機器人\聊天機器人\App.config

?????文件?????407776??2013-10-02?12:10??聊天機器人\聊天機器人\bin\Debug\Newtonsoft.Json.dll

?????文件????1299968??2015-06-22?11:04??聊天機器人\聊天機器人\bin\Debug\Newtonsoft.Json.pdb

?????文件?????501178??2015-06-22?11:04??聊天機器人\聊天機器人\bin\Debug\Newtonsoft.Json.xml

?????文件??????22528??2016-10-05?21:17??聊天機器人\聊天機器人\bin\Debug\聊天機器人.exe

?????文件????????184??2016-10-05?20:32??聊天機器人\聊天機器人\bin\Debug\聊天機器人.exe.config

?????文件??????36352??2016-10-05?21:17??聊天機器人\聊天機器人\bin\Debug\聊天機器人.pdb

?????文件??????24224??2016-10-05?21:17??聊天機器人\聊天機器人\bin\Debug\聊天機器人.vshost.exe

?????文件????????184??2016-10-05?20:32??聊天機器人\聊天機器人\bin\Debug\聊天機器人.vshost.exe.config

?????文件????????490??2016-07-16?19:44??聊天機器人\聊天機器人\bin\Debug\聊天機器人.vshost.exe.manifest

?????文件???????4126??2016-10-05?21:05??聊天機器人\聊天機器人\Form1.cs

?????文件???????4973??2016-10-05?21:05??聊天機器人\聊天機器人\Form1.Designer.cs

?????文件???????5817??2016-10-05?21:05??聊天機器人\聊天機器人\Form1.resx

?????文件???????1453??2016-10-05?20:58??聊天機器人\聊天機器人\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????7400??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件??????????0??2015-11-07?16:49??聊天機器人\聊天機器人\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

?????文件??????????0??2015-11-07?16:49??聊天機器人\聊天機器人\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

?????文件??????????0??2015-11-07?16:49??聊天機器人\聊天機器人\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

?????文件???????4608??2016-10-05?20:32??聊天機器人\聊天機器人\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件???????3315??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.csproj.FileListAbsolute.txt

?????文件????????977??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.csproj.GenerateResource.Cache

?????文件??????10024??2016-10-05?21:03??聊天機器人\聊天機器人\obj\Debug\聊天機器人.csprojResolveAssemblyReference.cache

?????文件??????22528??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.exe

?????文件????????180??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.Form1.resources

?????文件??????36352??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.pdb

?????文件????????180??2016-10-05?21:17??聊天機器人\聊天機器人\obj\Debug\聊天機器人.Properties.Resources.resources

?????文件????????527??2015-11-07?16:49??聊天機器人\聊天機器人\Program.cs

............此處省略21個文件信息

評論

共有 條評論