📄 filechangeinfo.cs
字号:
using System;
using System.IO;
namespace CodeTemplate
{
internal class FileChangeInfo
{
public FileChangeInfo(String filePath)
{
m_filePath = filePath;
m_timestamp = DateTime.MinValue;
}
public String FilePath
{
get { return m_filePath; }
}
public Boolean Changed
{
get { return m_timestamp < this.LastWriteTime; }
}
private DateTime LastWriteTime
{
get
{
try
{
FileInfo fi = new FileInfo(this.FilePath);
return fi.LastWriteTime;
}
catch(Exception)
{
return DateTime.MinValue;
}
}
}
public void Refresh()
{
m_timestamp = this.LastWriteTime;
}
private String m_filePath;
private DateTime m_timestamp;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -