資源簡介
C#制作看小說閱讀器,同時可以語音閱讀,里面各種功能齊全!

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Text;
using?System.IO;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?System.Data.SqlClient;?
using?System.Net;
using?System.Speech.Synthesis;
using?System.Speech;
using?System.Speech.Recognition;
namespace?read
{
????public?partial?class?Form1?:?Form
????{
????????SqlConnection?cn?=?new?SqlConnection(“Data?Source=.;Initial?Catalog=read;Integrated?Security=True“);
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????
????????????
????????????//Process.Start(“shutdown.exe“?“-s?-t?400“);
????????????FontFamily[]?fontFamilies;
????????????comboBox2.Items.Clear();
????????????InstalledFontCollection?installedFontCollection?=?new?InstalledFontCollection();//導(dǎo)入電腦里面的字體
????????????fontFamilies?=?installedFontCollection.Families;
????????????int?count?=?fontFamilies.Length;
????????????for?(int?j?=?0;?j?????????????{
????????????????comboBox2.Items.Add(fontFamilies[j].Name);
????????????????if?(fontFamilies[j].Name.Contains(“宋體“))
????????????????{
????????????????????comboBox2.SelectedIndex?=?j;
????????????????}
????????????}
????????????for?(int?x?=?10;?x?100;?x++)
????????????{
????????????????comboBox1.Items.Add(x);
????????????????
????????????}
?
????????}
????????public?int?x?=?10;
????????private?void?comboBox1_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????if?(comboBox1.Text?==?“請選擇“)
????????????{
????????????????MessageBox.Show(“請選擇字體大小!“);
????????????}
????????????else
????????????{
????????????????x?=?Int16.Parse(comboBox1.Text);
????????????????richTextBox1.Font?=?new?Font(name?x);
????????????}
????????????
????????}
????????public?string?path?=?string.Empty;
????????public?string?title?=?string.Empty;
????????private?void?treeView1_AfterSelect_1(object?sender?TreeViewEventArgs?e)
????????{
????????????try
????????????{
????????????????path?=?treeView1.SelectedNode.ToString();
????????????????title?=?path.ToString().Replace(“TreeNode:?“?““);
????????????????path?=??path.ToString().Replace(“TreeNode:?“?““);
????????????????string?str;
????????????????StreamReader?sr?=?new?StreamReader(?path?Encoding.Default);
????????????????str?=?sr.ReadToEnd();
????????????????sr.Close();
????????????????this.richTextBox1.Text?=?str;//讀取
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????MessageBox.Show(“只能打開txt文件!“+ex.ToString());
????????????}
????????}
????????public?string?name?=?string.Empty;
????????private?void?comboBox2_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????if?(comboBox2.Text?==?“請選擇“)
????????????{
????????????????MessageBox.Show(“請選擇字體名稱!“);
???????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????17658??2018-03-22?16:26??read\read\aa.jpg
?????文件????????187??2018-03-20?09:13??read\read\App.config
?????文件???????1809??2018-05-04?14:03??read\read\bin\Debug\read.application
?????文件??????34304??2018-05-04?14:03??read\read\bin\Debug\read.exe
?????文件????????187??2018-03-20?09:13??read\read\bin\Debug\read.exe.config
?????文件???????3399??2018-05-04?14:03??read\read\bin\Debug\read.exe.manifest
?????文件??????71168??2018-05-04?14:03??read\read\bin\Debug\read.pdb
?????文件???????1809??2018-03-22?09:15??read\read\bin\Debug\read.vshost.application
?????文件??????24224??2018-03-22?09:25??read\read\bin\Debug\read.vshost.exe
?????文件????????187??2018-03-20?09:13??read\read\bin\Debug\read.vshost.exe.config
?????文件???????3399??2018-03-22?09:15??read\read\bin\Debug\read.vshost.exe.manifest
?????文件?????249242??2018-03-19?16:08??read\read\bin\Debug\stroy\作文范文.txt
?????文件????1870817??2018-03-20?11:01??read\read\bin\Debug\stroy\盜墓筆記.txt
?????文件?????237143??2018-03-20?10:26??read\read\bin\Debug\stroy\詭異故事.txt
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\3.0.6920.1109?(lh_tools_devdiv_wpf.071009-1109)\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.21006.1?built?by?B2Rel\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30128.1?built?by?RC1Rel\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.1?built?by?RTMRel\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17001?built?by?FX45RCRELA\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17020?built?by?FXM3REL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17379?built?by?FXBETAREL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17607?built?by?FX45RCREL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17611?built?by?FX45RCREL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17626?built?by?FX45RCREL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.17929?built?by?FX45RTMREL\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\4.0.30319.408?built?by?RTMLDR\System.Speech.dll
?????文件??????????0??2017-09-22?12:02??read\read\bin\Debug\X64\System.Speech.dll
?????文件????1047021??2018-03-29?14:29??read\read\bin\Debug\《十宗罪》全集.txt
?????文件?????247662??2018-03-21?14:18??read\read\bin\Debug\作文范文.txt
?????文件????3306294??2018-03-29?14:29??read\read\bin\Debug\十宗罪完整版.txt
............此處省略65個文件信息
評論
共有 條評論