• 大小: 70KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-06
  • 语言: C#
  • 标签: 说阅读器  

资源简介

可以方便的阅读小说!!保存书签 以及进行一些基本的设置操作!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace BookRead
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
    
        private void toolStripButton1_Click(object sender EventArgs e)
        {
            try
            {
                openFileDialog1.ShowDialog();
                this.openFileDialog1.ShowDialog();
                this.richTextBox1.LoadFile(this.openFileDialog1.FileName RichTextBoxStreamType.PlainText);
            }
            catch (Exception ex)
            {
                MessageBox.Show(“请选择一本小说!!!“);
            }
        }

        private void 字体ToolStripMenuItem_Click(object sender EventArgs e)
        {
            fontDialog1.ShowDialog();
            richTextBox1.Font = fontDialog1.Font;
        }

        private void 颜色ToolStripMenuItem_Click(object sender EventArgs e)
        {
            colorDialog1.ShowDialog();
            richTextBox1.ForeColor = colorDialog1.Color;
        }

        private void 背景颜色ToolStripMenuItem_Click(object sender EventArgs e)
        {
            colorDialog1.ShowDialog();
            richTextBox1.BackColor = colorDialog1.Color;
        }

        String shu = ““;
        private void 存为书签ToolStripMenuItem_Click(object sender EventArgs e)
        {
            if (richTextBox1.SelectedText!=““)
            {
                shu = richTextBox1.SelectedText;
                FileStream fs = new FileStream(@“d:/shu“FileMode.Create);
                StreamWriter sw = new StreamWriter(fs);
                sw.Write(shu);
                sw.Close();
                fs.Close();
                MessageBox.Show(“书签已经存储!!“);
                toolStripSplitButton2.DropDownItems.Clear();
                ToolStripItem fd = toolStripSplitButton2.DropDownItems.Add(shu);

                fd.Click += new System.EventHandler(dsToolStripMenuItem_Click);
                //toolStripSplitButton2.DropDownItems.Add();
            }
        }

        private void Form1_Load(object sender EventArgs e)
        {
           
            if (File.Exists(“d:/shu“))
            {
                FileStream fs = new FileStream(“d:/shu“ FileMode.Open);
                StreamReader sr = new StreamReader(fs);
               String name= sr.ReadToEnd();
               toolStripSplitButton2.DropDownItems.Clear();
              ToolStripItem fd= toolStripSplitButton2.DropDownItems.Add(name);

              fd.Click += new System.EventHandler(dsToolStripMenuItem_Click);

              sr.Close();
              fs.Close();
            }
            if (File.Exists(“d:/shezhi“))
            {
                ToolStripItem item = toolStrip1.Items.Add(“我最喜爱的阅读环境“);
                item.Click += new System.Even

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      10134  2010-04-01 16:11  txt小说阅读器\BookRead\App.ico

     文件      49152  2010-04-01 17:42  txt小说阅读器\BookRead\bin\Debug\BookRead.exe

     文件      30208  2010-04-01 17:42  txt小说阅读器\BookRead\bin\Debug\BookRead.pdb

     文件       5632  2005-11-11 22:25  txt小说阅读器\BookRead\bin\Debug\BookRead.vshost.exe

     文件       3667  2010-04-01 16:13  txt小说阅读器\BookRead\BookRead.csproj

     文件        168  2010-04-01 16:07  txt小说阅读器\BookRead\BookRead.csproj.user

     文件       7109  2010-04-01 17:42  txt小说阅读器\BookRead\Form1.cs

     文件      12420  2010-04-01 17:16  txt小说阅读器\BookRead\Form1.designer.cs

     文件      26023  2010-04-01 17:16  txt小说阅读器\BookRead\Form1.resx

     文件        275  2010-04-01 17:42  txt小说阅读器\BookRead\obj\BookRead.csproj.FileList.txt

     文件        842  2010-04-01 17:18  txt小说阅读器\BookRead\obj\Debug\BookRead.csproj.GenerateResource.Cache

     文件      49152  2010-04-01 17:42  txt小说阅读器\BookRead\obj\Debug\BookRead.exe

     文件      13454  2010-04-01 17:18  txt小说阅读器\BookRead\obj\Debug\BookRead.Form1.resources

     文件      30208  2010-04-01 17:42  txt小说阅读器\BookRead\obj\Debug\BookRead.pdb

     文件        180  2010-04-01 17:18  txt小说阅读器\BookRead\obj\Debug\BookRead.Properties.Resources.resources

     文件        467  2010-04-01 16:04  txt小说阅读器\BookRead\Program.cs

     文件       1164  2010-04-01 16:04  txt小说阅读器\BookRead\Properties\AssemblyInfo.cs

     文件       2870  2010-04-01 16:04  txt小说阅读器\BookRead\Properties\Resources.Designer.cs

     文件       5612  2010-04-01 16:04  txt小说阅读器\BookRead\Properties\Resources.resx

     文件       1091  2010-04-01 16:04  txt小说阅读器\BookRead\Properties\Settings.Designer.cs

     文件        249  2010-04-01 16:04  txt小说阅读器\BookRead\Properties\Settings.settings

     文件        913  2010-04-01 16:04  txt小说阅读器\BookRead.sln

    ..A..H.     15360  2010-04-01 17:44  txt小说阅读器\BookRead.suo

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\obj\Debug\TempPE

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\bin\Debug

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\obj\Debug

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\bin

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\obj

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead\Properties

     目录          0  2010-04-01 21:12  txt小说阅读器\BookRead

............此处省略4个文件信息

评论

共有 条评论

相关资源