资源简介
c实现软件系统监控.zip
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.IO; //for fileSystemWatcher
namespace FileEventWatcher
{
public partial class fileSystemWatcherFrm : Form
{
public fileSystemWatcherFrm()
{
InitializeComponent();
}
private delegate void setLogTextDelegate(FileSystemEventArgs e);
private delegate void renamedDelegate(RenamedEventArgs e);
FileSystemWatcher[] fswArr;
private void fileSystemWatcherFrm_Load(object sender EventArgs e)
{
ListViewGroup hardDisk_lvg = new ListViewGroup();
hardDisk_lvg.Header = “可监控硬盘“;
hardDisk_lvg.Name = “hardDisk“;
ListViewGroup removableDisk_lvg = new ListViewGroup();
removableDisk_lvg.Header = “可监控移动硬盘“;
removableDisk_lvg.Name = “removableDisk“;
ListViewGroup other_lvg = new ListViewGroup();
other_lvg.Header = “其它“;
other_lvg.Name = “other“;
this.dir_lvw.Groups.Add(hardDisk_lvg);
this.dir_lvw.Groups.Add(removableDisk_lvg);
this.dir_lvw.Groups.Add(other_lvg);
this.dir_lvw.ShowGroups = true;
this.dir_lvw.LargeImageList = this.file_ilst;
foreach (string driverName in Directory.GetLogicalDrives())
{
DriveInfo driverInfo = new DriveInfo(driverName);
if (driverInfo.IsReady == true)
{
if (driverInfo.DriveType == DriveType.Fixed)
{
ListViewItem lvi = new ListViewItem();
lvi.ImageIndex = 0;
lvi.Text = driverInfo.Name;
lvi.Group = hardDisk_lvg;
this.dir_lvw.Items.Add(lvi);
}
else if (driverInfo.DriveType == DriveType.Removable)
{
ListViewItem lvi = new ListViewItem();
lvi.ImageIndex = 1;
lvi.Text = driverInfo.Name;
lvi.Group = removableDisk_lvg;
this.dir_lvw.Items.Add(lvi);
}
}
}
this.dir_lvw.Items.Add(new ListViewItem(“系统盘“2other_lvg));
}
private void setLogText(FileSystemEventArgs e)
{
string[] strArr = e.FullPath.Split(new char[] { ‘\\‘ });
if (!strArr[1].Equals(“$RECYCLE.BIN“)) //回收站
{
this.fileEventLog_lvw.BeginUpdate();
ListViewItem lvi = new ListViewItem();
lvi.SubItems.Add(DateTime.Now.ToString());
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-09-23 23:18 c#系统监控软件\
目录 0 2015-09-23 23:18 c#系统监控软件\Backup\
目录 0 2015-09-23 23:18 c#系统监控软件\Backup\FileEventWatcher\
文件 3314 2012-08-26 23:38 c#系统监控软件\Backup\FileEventWatcher\FileEventWatcher.csproj
文件 490 2012-08-24 09:15 c#系统监控软件\Backup\FileEventWatcher\Program.cs
目录 0 2015-09-23 23:18 c#系统监控软件\Backup\FileEventWatcher\Properties\
文件 1180 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher\Properties\AssemblyInfo.cs
文件 2888 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher\Properties\Resources.Designer.cs
文件 5612 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher\Properties\Resources.resx
文件 1101 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher\Properties\Settings.Designer.cs
文件 249 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher\Properties\Settings.settings
文件 21557 2012-08-28 13:45 c#系统监控软件\Backup\FileEventWatcher\fileSystemWatcherFrm.Designer.cs
文件 12913 2012-08-28 16:40 c#系统监控软件\Backup\FileEventWatcher\fileSystemWatcherFrm.cs
文件 35965 2012-08-28 13:45 c#系统监控软件\Backup\FileEventWatcher\fileSystemWatcherFrm.resx
文件 937 2012-08-23 23:16 c#系统监控软件\Backup\FileEventWatcher.sln
文件 20480 2012-09-05 18:08 c#系统监控软件\Backup\FileEventWatcher.suo
目录 0 2015-09-23 23:18 c#系统监控软件\FileEventWatcher\
文件 3751 2015-05-02 14:12 c#系统监控软件\FileEventWatcher\FileEventWatcher.csproj
文件 490 2012-08-24 09:15 c#系统监控软件\FileEventWatcher\Program.cs
目录 0 2015-09-23 23:18 c#系统监控软件\FileEventWatcher\Properties\
文件 1180 2012-08-23 23:16 c#系统监控软件\FileEventWatcher\Properties\AssemblyInfo.cs
文件 2872 2015-05-02 14:12 c#系统监控软件\FileEventWatcher\Properties\Resources.Designer.cs
文件 5612 2012-08-23 23:16 c#系统监控软件\FileEventWatcher\Properties\Resources.resx
文件 1116 2015-05-02 14:12 c#系统监控软件\FileEventWatcher\Properties\Settings.Designer.cs
文件 249 2012-08-23 23:16 c#系统监控软件\FileEventWatcher\Properties\Settings.settings
目录 0 2015-09-23 23:18 c#系统监控软件\FileEventWatcher\bin\
目录 0 2015-09-23 23:18 c#系统监控软件\FileEventWatcher\bin\Debug\
文件 43008 2015-09-23 23:16 c#系统监控软件\FileEventWatcher\bin\Debug\FileEventWatcher.exe
文件 40448 2015-09-23 23:16 c#系统监控软件\FileEventWatcher\bin\Debug\FileEventWatcher.pdb
文件 11608 2015-09-23 23:16 c#系统监控软件\FileEventWatcher\bin\Debug\FileEventWatcher.vshost.exe
文件 490 2010-03-17 22:39 c#系统监控软件\FileEventWatcher\bin\Debug\FileEventWatcher.vshost.exe.manifest
............此处省略38个文件信息
- 上一篇:中国象棋源码UCCI协议
- 下一篇:web告白神器
相关资源
- Spire.XLS免费版.zip
- IEC62351-5-2013(TS)电力系统数据和通信
- zjjxjsyzy_9675367.zip
- VisualC数字图像模式识别技术及工程实
- 漏洞管理-GBT33561-2017信息安全技术安全
- HDF5查看工具.rar
- 一天搞懂深度学习高清版2(李宏毅)
- FeiQ发布版源代码修复版(QT5).zip
- book.rar85742
- 模式识别第二版.rar
- 博客项目.rar
- GBT14213-2008.pdf
- 打飞机_修正版.zip
- openswan-2.6.50.tar.gz
- JSBSim运行文件仿真结果画图脚本.zip
-
ob
jective-C编程全解(第3版).pdf - NDwww.net
- 6.55开发和运行无限点破解.rar
- liaoning.zip
- 精准扶贫大数据平台建设方案V1.0.do
- 起点设备管理软件单机版7.35Reg注册版
- 校园跑腿.zip
- wenku_GUI.exe
- 书签第2版阳宪惠2008[1].10x.pdf
- 11506176电子电气设备的电磁兼容设计、
- 软件测试的艺术原书第3版.pdf
- 新书《无线传感器网络技术》.rar
- BaiduYun3.9.11.rar
- PRML中文版.zip
- 321browser.zip
评论
共有 条评论