Java
using Systemusing System.Collections.Generic
using System.ComponentModel
using System.Data
using System.Drawing
using System.Text
using System.Windows.Forms
namespace FileSystemWatcher
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent()
}
private void btnSetPath_Click(object sender, EventArgs e)
{
fileSystemWatcher1.Path = txtDir.Text
}
private void fileSystemWatcher1_Changed(object sender, System.IO.FileSystemEventArgs e)
{
txtInfo.Text += "ChangeType :: " + e.ChangeType.ToString() + "\nFullPath :: " + e.FullPath.ToString() + "\n\n "
}
protected void fileSystemWatcher1_Created(object sender, System.IO.FileSystemEventArgs e)
{
txtInfo.Text += "ChangeType :: " + e.ChangeType.ToString() + "\nFullPath :: " + e.FullPath.ToString() + "\n\n "
}
protected void fileSystemWatcher1_Deleted(object sender, System.IO.FileSystemEventArgs e)
{
txtInfo.Text += "ChangeType :: " + e.ChangeType.ToString() + "\nFullPath :: " + e.FullPath.ToString() + "\n\n "
}
protected void fileSystemWatcher1_Renamed(object sender, System.IO.RenamedEventArgs e)
{
txtInfo.Text += "ChangeType :: " + e.ChangeType.ToString() + "\nFullPath :: " + e.FullPath.ToString() + "\nOld FileName :: " + e.OldName.ToString() + "\n\n "
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
如果这个不行就试试现成的吧。
华军软件园下载地址:
thunder://QUFodHRwOi8vcDJzLm5ld2h1YS5jb20vZG93bi9IQV9GaWxlbW9uNzA0X1dHTC5leGVaWg==
广数数控系统报警硬件出现数据异常,可能原因是设备本身出现问题,如硬件老化、电路板损坏等,或者是由于软件故障、 *** 作不当等造成的。建议先检查设备硬件有无异常情况,若无,则应该更换系统软件。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)