• 大小: 4.19MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-17
  • 语言: C#
  • 标签: C#阅读器  

资源简介

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();//导入电脑里面的字体
            fontFamilies = installedFontCollection.Families;
            int count = fontFamilies.Length;
            for (int j = 0; j < count; ++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个文件信息

评论

共有 条评论

相关资源