资源简介
C#记事本(实现了向上,向下查找,替换和全部替换,保存,另存为等功能)。基本模拟了windows的记事本功能。

代码片段和文件信息
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;
namespace NotePad
{
public partial class CustCheck : Form
{
int p;
public CustCheck()
{
InitializeComponent();
}
private void button2_Click(object sender EventArgs e)
{
this.Close();
}
private void button1_Click(object sender EventArgs e)
{
Form1 fm = (Form1)this.Owner;
string text;
string findtext;
if (checkBox1.Checked)
{
findtext = textBox1.Text;
text = fm.richTextBox1.Text;
}
else
{
findtext = textBox1.Text.ToLower();
text = fm.richTextBox1.Text.ToLower();
} if (radioButton1.Checked)
{
int index = fm.richTextBox1.Find(findtext 0 fm.richTextBox1.Selectionstart RichTextBoxFinds.Reverse);
if (index > -1)
{
fm.richTextBox1.Selectionstart = index;
fm.richTextBox1.SelectionLength = findtext.Length;
fm.richTextBox1.Focus();
}
else
{
MessageBox.Show(“已到文章开头,没有找到匹配项“ “记事本“ MessageBoxButtons.OKCancel MessageBoxIcon.Exclamation);
}
} if (radioButton2.Checked)
{
p = text.IndexOf(findtext p);
if (p >= 0)
{
fm.richTextBox1.Select(p findtext.Length);
fm.richTextBox1.Focus();
p = p + findtext.Length;
}
else
{
MessageBox.Show(“已到文章末尾,没有找到匹配项“ “记事本“ MessageBoxButtons.OKCancel MessageBoxIcon.Exclamation);
p = 0;
}
}
}
private void CustCheck_Load(object sender EventArgs e)
{
if (textBox1.Text == string.Empty)
{
button1.Enabled = false;
}
else {
button1.Enabled = true;
}
}
private void textBox1_TextChanged(object sender EventArgs e)
{
if (textBox1.Text != string.Empty)
{
button1.Enabled = true ;
}
else
{
button1.Enabled = false;
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-03-07 16:12 NotePad\
目录 0 2017-03-07 16:12 NotePad\NotePad\
文件 6760 2017-03-06 15:26 NotePad\NotePad\Check.Designer.cs
文件 2859 2017-03-06 15:26 NotePad\NotePad\Check.cs
文件 5814 2017-03-06 15:26 NotePad\NotePad\Check.resx
文件 4873 2017-03-06 15:49 NotePad\NotePad\CustDialog.Designer.cs
文件 482 2017-03-06 15:49 NotePad\NotePad\CustDialog.cs
文件 43035 2017-03-06 15:49 NotePad\NotePad\CustDialog.resx
文件 38321 2017-02-28 16:56 NotePad\NotePad\Form1.Designer.cs
文件 10285 2017-03-06 15:29 NotePad\NotePad\Form1.cs
文件 7217 2017-02-28 16:56 NotePad\NotePad\Form1.resx
文件 4779 2017-02-28 16:56 NotePad\NotePad\NotePad.csproj
文件 488 2017-02-27 14:36 NotePad\NotePad\Program.cs
目录 0 2017-03-07 16:12 NotePad\NotePad\Properties\
文件 1370 2017-02-27 14:36 NotePad\NotePad\Properties\AssemblyInfo.cs
文件 3085 2017-02-28 14:45 NotePad\NotePad\Properties\Resources.Designer.cs
文件 6196 2017-02-28 14:45 NotePad\NotePad\Properties\Resources.resx
文件 1092 2017-02-27 14:36 NotePad\NotePad\Properties\Settings.Designer.cs
文件 249 2017-02-27 14:36 NotePad\NotePad\Properties\Settings.settings
目录 0 2017-03-07 16:12 NotePad\NotePad\Resources\
文件 7325 2017-02-28 14:45 NotePad\NotePad\Resources\timg.jpeg
文件 6691 2017-03-06 15:42 NotePad\NotePad\TiHuan.Designer.cs
文件 3293 2017-03-06 15:45 NotePad\NotePad\TiHuan.cs
文件 5814 2017-03-06 15:42 NotePad\NotePad\TiHuan.resx
目录 0 2017-03-07 16:12 NotePad\NotePad\bin\
目录 0 2017-03-07 16:12 NotePad\NotePad\bin\Debug\
文件 66048 2017-03-06 15:45 NotePad\NotePad\bin\Debug\NotePad.exe
文件 65024 2017-03-06 15:45 NotePad\NotePad\bin\Debug\NotePad.pdb
文件 14328 2017-03-06 15:48 NotePad\NotePad\bin\Debug\NotePad.vshost.exe
文件 490 2007-07-21 01:33 NotePad\NotePad\bin\Debug\NotePad.vshost.exe.manifest
目录 0 2017-03-07 16:12 NotePad\NotePad\obj\
............此处省略15个文件信息
- 上一篇:C#连接mysql数据库与简单操作
- 下一篇:ASPNETCoreAngular7
相关资源
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
评论
共有 条评论