資源簡介
基于websocket技術實現的語音叫號功能!!!!!!!!!

代碼片段和文件信息
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.Configuration;
using?SuperSocket.Common;
using?SuperSocket.Socketbase;
using?SuperSocket.Socketbase.Config;
using?SuperSocket.SocketEngine;
using?SuperSocket.Socketbase.Logging;
using?SuperWebSocket;
using?log4net;
using?System.Speech.Synthesis;
using?System.Threading;
using?System.IO;
using?System.Collections.Specialized;
using?Server.Common;
using?System.Collections;
using?SuperWebSocket.Protocol;
namespace?Server
{
????public?partial?class?FrmMain?:?Form
????{
????????#region?屬性
????????private?SpeechSynthesizer?speech;
????????private?ContextMenu?notifyiconMnu;
????????//音量
????????private?int?volume?=?Server.Properties.Settings.Default.volume;
????????//語速
????????private?int?rate?=?Server.Properties.Settings.Default.rate;
????????//語音
????????private?string?voice?=?Server.Properties.Settings.Default.voice;
????????//頻次
????????private?int?frequency?=?Server.Properties.Settings.Default.frequency;
????????//頻次間隔
????????private?int?frequencyInterval?=?Server.Properties.Settings.Default.frequencyInterval;
????????//自動播放標識(0?不自動?1?自動)
????????private?int?autoPlayFlag?=?Server.Properties.Settings.Default.autoPlayFlag;
????????//是否使用默認播放(0?不使用?1?使用)
????????private?int?openDefaultAudio?=?Server.Properties.Settings.Default.openDefaultAudio;
????????//提示音
????????private?string?promptPath?=?“Notify.wav“;//.wav音頻文件路徑
????????private?System.Media.SoundPlayer?player;
????????private?Thread?t;
????????WebSocketServer?appServer?=?new?WebSocketServer();
????????ServerConfig?serverConfig?=?new?ServerConfig
????????{
????????????Port?=?Server.Properties.Settings.Default.port//set?the?listening?port
????????????MaxConnectionNumber?=?10000
????????};
????????#endregion
????????#region?初始化
????????public?FrmMain()
????????{
????????????try
????????????{
????????????????InitializeComponent();
????????????????Control.CheckForIllegalCrossThreadCalls?=?false;
????????????????setFrequencyCombo();
????????????????setRateCombo();
????????????????setVolumeCombo();
????????????????setVoiceCombo();
????????????????if?(this.autoPlayFlag?==?1)
????????????????{
????????????????????checkBox1.Checked?=?true;
????????????????}
????????????????else?{
????????????????????checkBox1.Checked?=?false;
????????????????}
????????????????checkBox1_CheckedChanged(nullnull);
????????????????
????????????????foreach?(myComItem?t?in?this.comboBox1.Items)
????????????????{
????????????????????if?(t.text.ToString()?==?this.rate.ToString())
????????????????????{
????????????????????????this.comboBox1.SelectedItem?=?t;
????????????????????????break;
????????????????????}
????????????????}
????????????????
????????????????foreach?(myComItem?t?in?this.comboBox3.Items)
????????????????{
?????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-31?17:13??Server\
?????目錄???????????0??2018-07-31?17:13??Server\Common\
?????文件????????5679??2018-07-31?17:13??Server\Common\funTools.cs
?????文件????????4219??2018-07-31?17:13??Server\Common\logTools.cs
?????文件?????????402??2018-07-31?17:13??Server\Common\myComItem.cs
?????目錄???????????0??2018-07-31?17:13??Server\Config\
?????文件????????3002??2018-07-31?17:13??Server\Config\log4net.config
?????文件????????3007??2018-07-31?17:13??Server\Config\log4net.unix.config
?????文件???????15660??2018-07-31?17:13??Server\FrmMain.Designer.cs
?????文件???????31428??2018-07-31?17:13??Server\FrmMain.cs
?????文件???????19553??2018-07-31?17:13??Server\FrmMain.resx
?????文件????????1090??2018-07-31?17:13??Server\Program.cs
?????目錄???????????0??2018-07-31?17:13??Server\Properties\
?????文件????????1354??2018-07-31?17:13??Server\Properties\AssemblyInfo.cs
?????文件????????2864??2018-07-31?17:13??Server\Properties\Resources.Designer.cs
?????文件????????5612??2018-07-31?17:13??Server\Properties\Resources.resx
?????文件????????4009??2018-07-31?17:13??Server\Properties\Settings.Designer.cs
?????文件????????1376??2018-07-31?17:13??Server\Properties\Settings.settings
?????文件????????6032??2018-07-31?17:13??Server\Server.csproj
?????目錄???????????0??2018-07-31?17:13??Server\UsingDll\
?????文件??????397312??2018-07-31?17:13??Server\UsingDll\Newtonsoft.Json.dll
?????文件???????37888??2018-07-31?17:13??Server\UsingDll\SuperSocket.Common.dll
?????文件??????111104??2018-07-31?17:13??Server\UsingDll\SuperSocket.Socketba
?????文件??????103424??2018-07-31?17:13??Server\UsingDll\SuperSocket.SocketEngine.dll
?????文件???????71168??2018-07-31?17:13??Server\UsingDll\SuperWebSocket.dll
?????文件??????393216??2018-07-31?17:13??Server\UsingDll\System.Threading.dll
?????文件??????290816??2018-07-31?17:13??Server\UsingDll\log4net.dll
?????文件????????1653??2018-07-31?17:13??Server\app.config
?????目錄???????????0??2018-07-31?17:31??Server\bin\
?????目錄???????????0??2018-07-31?17:31??Server\bin\Debug\
?????文件??????397312??2018-07-31?17:13??Server\bin\Debug\Newtonsoft.Json.dll
............此處省略41個文件信息
- 上一篇:紋理合成的圖像修復程序
- 下一篇:DEP開發平臺api
評論
共有 條評論