资源简介
学习C#所编写的一个应用
仿照我的电脑对文件进行简单的操作
注意:对文件的操作会真的执行!比如删掉一个文件就真的删了!

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
namespace FileManage
{
public partial class FileManager : Form
{
#region 通用数据
private VisitedPath visitedPath;
private FileProperty fileProperty;
private ListViewItemDealer fileDealer;//单例模式
private ListViewItem item;
#endregion
#region 初始化
///
/// 初始化
///
public FileManager()
{
InitializeComponent();
InitTreeView();
comboBoxCurAddress.Text = “我的电脑“;
InitListView();
visitedPath = new VisitedPath(buttonGoBack buttonGoFront);
fileProperty = new FileProperty(string.Empty);
fileDealer = ListViewItemDealer.CreateDealer();
}
///
/// 初始化树图
///
void InitTreeView()
{
string[] Pans = Directory.GetLogicalDrives();//盘符
foreach (string pan in Pans)
{
TreeNode node = treeViewDirectory.Nodes.Add(pan);
node.ImageIndex = 0;
}
}
///
/// 初始化浏览窗口
///
void InitListView()
{
ResetListViewColumn();//列标题
ImageList bigimagelist = new ImageList();//大图标
bigimagelist.ColorDepth = ColorDepth.Depth32Bit;
bigimagelist.ImageSize = new System.Drawing.Size(64 64);
bigimagelist.Images.Add(Properties.Resources.disk);
bigimagelist.Images.Add(Properties.Resources.folder);
bigimagelist.Images.Add(Properties.Resources.txt);
bigimagelist.Images.Add(Properties.Resources.picture);
bigimagelist.Images.Add(Properties.Resources.video);
bigimagelist.Images.Add(Properties.Resources.exe);
bigimagelist.Images.Add(Properties.Resources.zip);
bigimagelist.Images.Add(Properties.Resources.file);
listViewFileAndDirectory.LargeImageList = bigimagelist;
ImageList smallimagelist = new ImageList();//小图标
smallimagelist.ColorDepth = ColorDepth.Depth32Bit;
smallimagelist.Images.Add(Properties.Resources.disk);
smallimagelist.Images.Add(Properties.Resources.folder);
smallimagelist.Images.Add(Properties.Resources.txt);
smallimagelist.Images.Add(Properties.Resources.picture);
smallimagelist.Images.Add(Properties.Resources.video);
smallimagelist.Images.Add(Properties.Resources.exe);
smallimagelist.Images.Add(Properties.Resources.zip);
smallimagelist.Images.Add(Propert
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 60928 2016-01-02 22:51 FileManage\.vs\FileManage\v14\.suo
文件 187 2015-11-16 17:54 FileManage\FileManage\App.config
文件 2048 2015-11-25 15:41 FileManage\FileManage\bin\Debug\bugs(3).txt
文件 2048 2015-11-25 15:41 FileManage\FileManage\bin\Debug\data(3).txt
文件 392192 2015-11-26 09:22 FileManage\FileManage\bin\Debug\FileManage.exe
文件 187 2015-11-16 17:54 FileManage\FileManage\bin\Debug\FileManage.exe.config
文件 140800 2015-11-26 09:22 FileManage\FileManage\bin\Debug\FileManage.pdb
文件 22696 2016-01-02 22:14 FileManage\FileManage\bin\Debug\FileManage.vshost.exe
文件 187 2015-11-16 17:54 FileManage\FileManage\bin\Debug\FileManage.vshost.exe.config
文件 490 2015-10-30 15:19 FileManage\FileManage\bin\Debug\FileManage.vshost.exe.manifest
文件 225280 2015-11-12 08:55 FileManage\FileManage\bin\Debug\ICSharpCode.SharpZipLib.dll
文件 6034 2015-11-22 10:21 FileManage\FileManage\FileManage.csproj
文件 47354 2015-12-02 21:15 FileManage\FileManage\FileManager.cs
文件 56998 2015-11-26 08:32 FileManage\FileManage\FileManager.Designer.cs
文件 48079 2015-11-26 08:32 FileManage\FileManage\FileManager.resx
文件 4878 2015-11-26 09:05 FileManage\FileManage\FileProperty.cs
文件 846 2015-11-25 14:17 FileManage\FileManage\FilePropertyCollection.cs
文件 2604 2015-11-25 14:55 FileManage\FileManage\FilePropertyWindow.cs
文件 8074 2015-11-25 13:34 FileManage\FileManage\FilePropertyWindow.Designer.cs
文件 5817 2015-11-25 13:34 FileManage\FileManage\FilePropertyWindow.resx
文件 4173 2015-11-22 10:01 FileManage\FileManage\ForeAndBackColorWindow.cs
文件 8849 2015-11-22 09:54 FileManage\FileManage\ForeAndBackColorWindow.Designer.cs
文件 6016 2015-11-22 09:54 FileManage\FileManage\ForeAndBackColorWindow.resx
文件 225280 2015-11-12 08:55 FileManage\FileManage\ICSharpCode.SharpZipLib.dll
文件 16839 2015-11-26 08:50 FileManage\FileManage\ListViewItemDealer.cs
文件 1452 2016-01-02 22:14 FileManage\FileManage\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 8337 2016-01-01 14:51 FileManage\FileManage\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 1888 2016-01-02 22:14 FileManage\FileManage\obj\Debug\FileManage.csproj.FileListAbsolute.txt
文件 1488 2015-11-26 08:32 FileManage\FileManage\obj\Debug\FileManage.csproj.GenerateResource.Cache
文件 6366 2015-11-21 19:40 FileManage\FileManage\obj\Debug\FileManage.csprojResolveAssemblyReference.cache
............此处省略48个文件信息
- 上一篇:C#+Access实现小型CRM系统
- 下一篇:基于C#的网上购物系统
相关资源
- 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# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
评论
共有 条评论