資源簡介
還行,可以用,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?????????????{
????????????????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?????????????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#圓形按鈕,非常漂亮動態
評論
共有 條評論