资源简介
c#的文本编译器代码,用vs2013编译完成

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;
using System.IO;
namespace TextReader
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Form2 f2 = new Form2();
private void menuFileNew_Click(object sender EventArgs e)
{
Form2 f2 = new Form2();
f2.MdiParent = this;
f2.Show();
}
private void menuFileOpen_Click(object sender EventArgs e)
{
this.openFileDialog.InitialDirectory = @“D:\“;
this.openFileDialog.title = “打开文本文件“;
this.openFileDialog.Multiselect = false;
this.openFileDialog.Filter = “文本文件(*.txt)|*.txt“ + “|所有文件(*.*)|*.*“;
DialogResult get = this.openFileDialog.ShowDialog();
if (get == DialogResult.Cancel)
{
return;
}
if (get == DialogResult.OK)
{
Form2 son;
if (this.MdiChildren.Length == 0)
{
son = new Form2();
son.richTextBox1.LoadFile(openFileDialog.FileName RichTextBoxStreamType.PlainText);
}
else
{
son = (Form2)this.ActiveMdiChild;
son.richTextBox1.LoadFile(openFileDialog.FileName RichTextBoxStreamType.PlainText);
}
son.Text = this.openFileDialog.FileName;
son.MdiParent = this;
son.Show();
}
}
private void menuFileSave_Click(object sender EventArgs e)
{
if (this.MdiChildren.Length == 0)
{
return;
}
saveFileDialog.Filter = “文本文件(*.txt)|*.txt“ + “|所有文件|*.*“;
saveFileDialog.InitialDirectory = @“d:\“;
DialogResult result = saveFileDialog.ShowDialog();
if (result == DialogResult.Cancel)
{
return;
}
if (result == DialogResult.OK)
{
Form2 f2 = (Form2)this.ActiveMdiChild;
f2.richTextBox1.SaveFile(saveFileDialog.FileName RichTextBoxStreamType.PlainText);
MessageBox.Show(“保存成功“);
}
}
private void tsbFontBackColor_Click(object sender EventArgs e)
{
Form2 f2 = (Form2)this.ActiveMdiChild;
if (f2 != null)
{
DialogResult result = this.colorDialog1.ShowDialog();
if (result == DialogResult.OK)
{
f2.richTextBox1.SelectionBackColor = this.colorDialog1.Color;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 163 2014-05-31 20:52 text reader\app.config
文件 42496 2014-06-01 11:38 text reader\bin\Release\Text Reader.exe
文件 163 2014-05-31 20:52 text reader\bin\Release\Text Reader.exe.config
文件 44544 2014-06-01 11:38 text reader\bin\Release\Text Reader.pdb
文件 24224 2014-06-01 11:38 text reader\bin\Release\Text Reader.vshost.exe
文件 163 2014-05-31 20:52 text reader\bin\Release\Text Reader.vshost.exe.config
文件 490 2013-06-18 20:28 text reader\bin\Release\Text Reader.vshost.exe.manifest
文件 22879 2014-06-01 11:41 text reader\Form1.cs
文件 38500 2014-06-01 11:31 text reader\Form1.Designer.cs
文件 28894 2014-06-01 11:31 text reader\Form1.resx
文件 356 2014-05-31 19:09 text reader\Form2.cs
文件 2242 2014-05-31 19:09 text reader\Form2.Designer.cs
文件 5814 2014-05-31 18:48 text reader\Form2.resx
文件 900 2009-06-18 12:53 text reader\obj\Debug\RichTextBox.csproj.GenerateResource.Cache
文件 20504 2009-06-18 12:53 text reader\obj\Debug\RichTextBox.Form1.resources
文件 1332 2009-06-18 10:34 text reader\obj\Debug\RichTextBox.Form2.resources
文件 180 2009-06-15 10:45 text reader\obj\Debug\RichTextBox.Properties.Resources.resources
文件 4608 2009-06-15 11:12 text reader\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 2085 2014-05-31 21:37 text reader\obj\Release\DesignTimeResolveAssemblyReferences.cache
文件 6566 2014-05-31 20:52 text reader\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache
文件 879 2014-05-31 19:02 text reader\obj\Release\RichTextBox.csproj.FileListAbsolute.txt
文件 905 2014-05-31 18:48 text reader\obj\Release\RichTextBox.csproj.GenerateResource.Cache
文件 1341 2014-05-31 17:55 text reader\obj\Release\RichTextBox.csprojResolveAssemblyReference.cache
文件 0 2014-05-31 19:07 text reader\obj\Release\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2014-05-31 19:07 text reader\obj\Release\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2014-05-31 19:07 text reader\obj\Release\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
文件 4608 2014-05-31 20:52 text reader\obj\Release\TempPE\Properties.Resources.Designer.cs.dll
文件 1708 2014-06-01 11:38 text reader\obj\Release\Text Reader.csproj.FileListAbsolute.txt
文件 1035 2014-06-01 11:31 text reader\obj\Release\Text Reader.csproj.GenerateResource.Cache
文件 2843 2014-05-31 20:52 text reader\obj\Release\Text Reader.csprojResolveAssemblyReference.cache
............此处省略73个文件信息
相关资源
- 简单文本编辑器
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- 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# 实现的最大最小距离方法对鸢尾花
评论
共有 条评论