资源简介


上课讲师讲的IO案例,自己敲完后改了改加了点代码做成了看小说用的文本阅读器;

很简单的文本阅读器,鼠标滚动翻页,单击翻页。添加书签

不被老师发现,偷偷看会儿小说,足够了^_^

坐在最后一排的大二狗分享

资源截图

代码片段和文件信息

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;
using System.Collections;

namespace BookRead
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click_1(object sender EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                textBox1.Text = openFileDialog1.FileName;
                //创建文件流
                FileStream fs = new FileStream(openFileDialog1.FileName FileMode.Open FileAccess.Read);
                //创建读写器
                StreamReader sr = new StreamReader(fs)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-10-29 01:45  只想偷偷看会小说\
     目录           0  2019-10-29 01:45  只想偷偷看会小说\.vs\
     目录           0  2019-10-29 01:45  只想偷偷看会小说\.vs\BookRead\
     目录           0  2019-10-29 01:46  只想偷偷看会小说\.vs\BookRead\v15\
     文件       36352  2019-10-29 01:46  只想偷偷看会小说\.vs\BookRead\v15\.suo
     目录           0  2019-10-29 01:45  只想偷偷看会小说\.vs\BookRead\v15\Server\
     目录           0  2019-10-29 01:45  只想偷偷看会小说\.vs\BookRead\v15\Server\sqlite3\
     文件           0  2019-10-29 01:45  只想偷偷看会小说\.vs\BookRead\v15\Server\sqlite3\db.lock
     文件        4096  2019-10-29 01:45  只想偷偷看会小说\.vs\BookRead\v15\Server\sqlite3\storage.ide
     文件       32768  2019-10-29 01:46  只想偷偷看会小说\.vs\BookRead\v15\Server\sqlite3\storage.ide-shm
     文件      634512  2019-10-29 01:46  只想偷偷看会小说\.vs\BookRead\v15\Server\sqlite3\storage.ide-wal
     目录           0  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\
     目录           0  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\
     文件       40960  2019-10-29 01:45  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\.suo
     目录           0  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\
     目录           0  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\sqlite3\
     文件           0  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\sqlite3\db.lock
     文件        4096  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide
     文件       32768  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-shm
     文件      659232  2019-10-29 01:43  只想偷偷看会小说\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-wal
     文件        1122  2019-10-29 01:34  只想偷偷看会小说\BookRead.sln
     目录           0  2019-10-29 01:46  只想偷偷看会小说\BookRead\
     目录           0  2019-10-29 01:39  只想偷偷看会小说\BookRead\bin\
     目录           0  2019-10-29 01:39  只想偷偷看会小说\BookRead\bin\Debug\
     文件       35328  2019-10-29 01:38  只想偷偷看会小说\BookRead\bin\Debug\BookRead.exe
     文件       24064  2019-10-29 01:38  只想偷偷看会小说\BookRead\bin\Debug\BookRead.pdb
     文件        5632  2005-11-11 22:25  只想偷偷看会小说\BookRead\bin\Debug\BookRead.vshost.exe
     文件       35328  2019-10-29 01:26  只想偷偷看会小说\BookRead\bin\Debug\txtread.exe
     文件       22016  2019-10-29 01:26  只想偷偷看会小说\BookRead\bin\Debug\txtread.pdb
     目录           0  2019-10-29 01:22  只想偷偷看会小说\BookRead\bin\Release\
     文件        3868  2019-10-29 01:46  只想偷偷看会小说\BookRead\BookRead.csproj
............此处省略38个文件信息

评论

共有 条评论