資源簡(jiǎn)介
可以進(jìn)入08韋清松圖片管家\PictureManage\bin\Debug下尋找.exe執(zhí)行文件執(zhí)行查看。也可以部署在vs環(huán)境下修改運(yùn)行。
實(shí)現(xiàn)功能:圖片的分類(lèi),增刪查及自動(dòng)播放等等。界面優(yōu)美,簡(jiǎn)單大方。

代碼片段和文件信息
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?PictureManage
{
????public?partial?class?Form1?:?Form
????{
???????
??????public?ArrayList?myArrayList?=?new?ArrayList();
??????public?ArrayList?myArrayListCur?=?new?ArrayList();
????????public?Form1()
????????{
????????????InitializeComponent();
????????????this.skinEngine1.SkinFile?=?“WaveColor2.ssk“;
????????}
???????
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????//判斷類(lèi)別文件是不是存在,如果存在就讀取數(shù)據(jù)
????????????if?(System.IO.File.Exists(Application.StartupPath?+?“\\class.dat“))
????????????{
????????????????//創(chuàng)建StreamReader實(shí)例,路徑是在當(dāng)前運(yùn)行程序的目錄下
????????????????System.IO.StreamReader?myReadClass?=?new
????????????????System.IO.StreamReader(Application.StartupPath?+?“\\class.dat“);
????????????????string?infoclass?=““;
????????????????//判斷是不是到文件的末尾
????????????????while((infoclass=myReadClass.ReadLine())!=“end“)
????????????????{
????????????????????this.treeViewShow.Nodes.Add(infoclass);
????????????????}
????????????????//關(guān)閉文件的讀寫(xiě)
????????????????myReadClass.Close();
????????????}
????????????//判斷圖片信息文件是不是存在,如果存在就讀取數(shù)據(jù)。
????????????if?(System.IO.File.Exists(Application.StartupPath?+?“\\picdata.dat“))
????????????{
????????????????//創(chuàng)建StreamReader實(shí)例,路徑是在當(dāng)前運(yùn)行程序的目錄下
????????????????System.IO.StreamReader?myReadPicture?=?new
????????????????System.IO.StreamReader(Application.StartupPath?+?“\\class.dat“);
????????????????string?infoPic?=?““;
????????????????//判斷是不是到文件的末尾
????????????????while?((infoPic?=?myReadPicture.ReadLine())?!=?“end“)
????????????????{
????????????????????string[]?myPictureMessage?=?infoPic.Split(‘‘);
????????????????????//以“,”分開(kāi)讀取的信息,并存到數(shù)組中。
????????????????????//判斷數(shù)組是不是等于3.
????????????????????if?(myPictureMessage.Length?>=?3)
????????????????????{
????????????????????????//向動(dòng)態(tài)數(shù)組中加入Picture類(lèi)的實(shí)例。
????????????????????????this.myArrayList.Add(new?Picture(myPictureMessage[2]?myPictureMessage[0]?myPictureMessage[1]));
????????????????????}
????????????????}
????????????????for?(int?i?=?0;?i?????????????????{
????????????????????for?(int?j?=?0;?j?????????????????????{
????????????????????????if?(((Picture)myArrayList[j]).picClass?==?this.treeViewShow.Nodes[i].ToString())
????????????????????????{
????????????????????????????this.treeViewShow.SelectedNode?=?this.treeViewShow.Nodes[i];
????????????????????????????this.treeViewShow.SelectedNode.Nodes.Add(((Picture)myArrayList[j]).picName);
????????????????????????}
????????????????????}
????????????????}
????????????????//關(guān)閉文件
????????????????myReadPicture.Close();
????????????}
????????}
????????//存儲(chǔ)函數(shù),在程序關(guān)閉前把動(dòng)態(tài)數(shù)組中存放的信息寫(xiě)到文件中也把分類(lèi)信息寫(xiě)到文件中。
????????private?void?save()
????????{
????????????System.IO.StreamWri
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????516096??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\IrisSkin2.dll
?????文件??????18988??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\Longhorn.ssk
?????文件??????62572??2006-03-22?06:35??08韋清松圖片管家\PictureManage\bin\Debug\mdb_spring.ssk
?????文件??????15899??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\MP10.SSK
?????文件??????32768??2011-05-09?16:02??08韋清松圖片管家\PictureManage\bin\Debug\PictureManage.exe
?????文件??????46592??2011-05-09?16:02??08韋清松圖片管家\PictureManage\bin\Debug\PictureManage.pdb
?????文件???????5632??2005-12-08?14:51??08韋清松圖片管家\PictureManage\bin\Debug\PictureManage.vshost.exe
?????文件??????29210??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\SteelBlack.ssk
?????文件??????12416??2006-03-22?06:31??08韋清松圖片管家\PictureManage\bin\Debug\WarmColor3.ssk
?????文件??????43378??2006-03-22?06:33??08韋清松圖片管家\PictureManage\bin\Debug\WaveColor1.ssk
?????文件??????45510??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\WaveColor2.ssk
?????文件??????13189??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\XPBlue.ssk
?????文件??????16133??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\XPGreen.ssk
?????文件??????13180??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\XPOrange.ssk
?????文件??????12600??2009-04-03?14:37??08韋清松圖片管家\PictureManage\bin\Debug\XPSilver.ssk
?????文件??????26440??2011-05-11?11:54??08韋清松圖片管家\PictureManage\Form1.cs
?????文件??????19367??2011-05-09?16:02??08韋清松圖片管家\PictureManage\Form1.Designer.cs
?????文件???????6817??2011-05-09?16:02??08韋清松圖片管家\PictureManage\Form1.resx
?????文件????????842??2011-05-09?16:02??08韋清松圖片管家\PictureManage\obj\Debug\PictureManage.csproj.GenerateResource.Cache
?????文件??????32768??2011-05-09?16:02??08韋清松圖片管家\PictureManage\obj\Debug\PictureManage.exe
?????文件????????180??2011-05-09?16:02??08韋清松圖片管家\PictureManage\obj\Debug\PictureManage.Form1.resources
?????文件??????46592??2011-05-09?16:02??08韋清松圖片管家\PictureManage\obj\Debug\PictureManage.pdb
?????文件????????180??2011-05-09?13:21??08韋清松圖片管家\PictureManage\obj\Debug\PictureManage.Properties.Resources.resources
?????文件???????5643??2011-05-09?13:38??08韋清松圖片管家\PictureManage\obj\Debug\ResolveAssemblyReference.cache
?????文件???????4448??2011-05-31?17:53??08韋清松圖片管家\PictureManage\obj\PictureManage.csproj.FileListAbsolute.txt
?????文件????????876??2011-04-25?14:45??08韋清松圖片管家\PictureManage\Picture.cs
?????文件???????3420??2011-05-09?14:59??08韋清松圖片管家\PictureManage\PictureManage.csproj
?????文件????????914??2011-05-09?14:59??08韋清松圖片管家\PictureManage\PictureManage.sln
????..A..H.?????16384??2011-05-31?17:53??08韋清松圖片管家\PictureManage\PictureManage.suo
?????文件????????472??2011-04-25?14:04??08韋清松圖片管家\PictureManage\Program.cs
............此處省略29個(gè)文件信息
評(píng)論
共有 條評(píng)論