资源简介
还行,可以用,C#的,本来是自己用的,分不够了,换分,就是一个简单的对比工具,代码没多少,适合初学的
代码片段和文件信息
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender EventArgs e)
{
label1.Text = ““;
char[] text1 = new char[textBox1.Text.ToString().Length];
char[] text2 = new char[textBox2.Text.ToString().Length];
text1 = textBox1.Text.ToCharArray();
text2 = textBox2.Text.ToCharArray();
List textlist1 = new List();
List textlist2 = new List();
int n = 0;
int i = 0;
int length = textBox1.Text.ToString().Length;
for (i = 0; i < length; i++)
{
if (text1[i] == ‘\n‘)
{
textlist1.Add(textBox1.Text.Substring(n i - n + 1));
n = i + 1;
}
progressBar1.Value = (30 * (i + 1)) / length;
}
textlist1.Add(textBox1.Text.Substring(n i - n));
n = 0;
length = textBox2.Text.ToString().Length;
for (i = 0; i {
if (text2[i] == ‘\n‘)
{
textlist2.Add(textBox2.Text.Substring(n i - n + 1));
n = i + 1;
}
progressBar1.Value = (30 * (i + 1)) / length + 30;
}
textlist2.Add(textBox2.Text.Substring(n i - n));
length = textlist1.Count < textlist2.Count ? textlist1.Count : textlist2.Count;
for (i = 0; i {
if (!textlist1.ElementAt(i).Equals(textlist2.ElementAt(i)))
{
label1.Text += “第“ + i + “行有不相同!\n“;
}
progressBar1.Value = (40 * (i + 1)) / length + 60;
}
if (textBox1.Text.ToString().Equals(textBox2.Text.ToString()))
MessageBox.Show(“不用比了,完全一样!“);
else if (label1.Text != ““)
{
MessageBox.Show(“有不同!“);
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
.CA.... 10240 2010-07-29 14:06 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
.CA.... 26112 2010-07-29 14:06 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
.CA.... 4594 2010-07-29 14:26 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.rar
.CA.... 14328 2010-07-29 14:07 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
.CA.... 490 2009-06-11 05:14 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
.CA.... 2493 2010-07-29 14:09 WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
.CA.... 4047 2010-07-29 13:57 WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
.CA.... 5814 2010-07-29 13:57 WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
.CA.... 1035 2010-07-29 14:07 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
.CA.... 847 2010-07-29 13:57 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
.CA.... 10240 2010-07-29 14:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
.CA.... 180 2010-07-29 13:57 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
.CA.... 26112 2010-07-29 14:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
.CA.... 180 2010-07-29 12:01 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources
.CA.... 505 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
.CA.... 1380 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
.CA.... 2898 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
.CA.... 5612 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
.CA.... 1109 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs
.CA.... 249 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings
.CA.... 3794 2010-07-29 11:32 WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
.CA.... 962 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1.sln
.CA..H. 19456 2010-07-29 14:09 WindowsFormsApplication1\WindowsFormsApplication1.suo
.C.D... 0 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TempPE
.C.D... 0 2010-07-29 14:26 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug
.C.D... 0 2010-07-29 14:06 WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug
.C.D... 0 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\bin
.C.D... 0 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\obj
.C.D... 0 2010-07-29 11:22 WindowsFormsApplication1\WindowsFormsApplication1\Properties
.C.D... 0 2010-07-29 14:09 WindowsFormsApplication1\WindowsFormsApplication1
............此处省略4个文件信息
- 上一篇:WPF分页控件
- 下一篇:C#圆形按钮,非常漂亮动态
相关资源
- C#圆形按钮,非常漂亮动态
- Apriori算法——c#版
- C# ArcEngine加载打开Las点云数据
- C#+ArcEngine:txt坐标数据转Shp矢量点
- C#+ArcEngine:矢量点转栅格-1VS2010窗体
- C# Winform,FX3U-32M,FX3u-ENET-ADP,MC协议
- C#五子棋源代码wuziqi
- AES加密解密算法程序和源代码 C#实现
- RDLC动态生成官方
- C# HttpHelper.cs
- 教务管理系统asp.net+c#+sql server2005
- 用c#编写的温度采集上位机程序
- C#中GDI+实现简单二维矢量图编辑器教
- C#简易图片编辑器 vs2010
- c#datagridview小票打印单据存储
- C# 程序自动远程更新
- C#单链表图形界面
- KNN算法C#例程
- C#调用matlab 源代码 csdn
- C#WPF 右键菜单 显示 事件触发 测试
- SevenZipSharp.dll和7z.dll
- C# Json转换DataTable源文件
- C# 动态链接机制 插件平台AppDomain对
- 利用C#打开EXCEL并将数据更新保
- C# 异步Socket 多人聊天室完整源码
- C#中读取Excel表格数据
- Winform 画多边形
- 中兴华为C#编码规范
- C# winform Socket 即时通讯
- C#textbox下拉提示 textbox智能提示 te
评论
共有 条评论