from
http://samples.gotdotnet.com/QuickStart/howto/default.aspx?url=/quickstart/howto/doc/Watcher.aspxusing System;
using System.IO;public class Watcher {
public static void Main(String[] args) {
if(args.Length < 1) {
Console.WriteLine("Usage: Watcher.exe <directory>");
} else {
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path= args[0];
watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.Attributes | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size; watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnChanged);
watcher.Renamed += new RenamedEventHandler(OnRenamed); watcher.EnableRaisingEvents = true;
} Console.WriteLine("Press Enter to quit the sample\r\n");
Console.ReadLine();
} public static void OnChanged(object source, FileSystemEventArgs e) {
Console.WriteLine("File: {0} {1}", e.FullPath, e.ChangeType.ToString("G"));
} public static void OnRenamed(Object source, RenamedEventArgs e) {
Console.WriteLine("File: {0} Renamed to {1}", e.OldFullPath, e.FullPath);
}
}
http://samples.gotdotnet.com/QuickStart/howto/default.aspx?url=/quickstart/howto/doc/Watcher.aspxusing System;
using System.IO;public class Watcher {
public static void Main(String[] args) {
if(args.Length < 1) {
Console.WriteLine("Usage: Watcher.exe <directory>");
} else {
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path= args[0];
watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.Attributes | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size; watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnChanged);
watcher.Renamed += new RenamedEventHandler(OnRenamed); watcher.EnableRaisingEvents = true;
} Console.WriteLine("Press Enter to quit the sample\r\n");
Console.ReadLine();
} public static void OnChanged(object source, FileSystemEventArgs e) {
Console.WriteLine("File: {0} {1}", e.FullPath, e.ChangeType.ToString("G"));
} public static void OnRenamed(Object source, RenamedEventArgs e) {
Console.WriteLine("File: {0} Renamed to {1}", e.OldFullPath, e.FullPath);
}
}
积分分为:可用分、专家分、参与分。
可用分:每个用户注册时自动拥有200分,以后每天加5分。
用户在论坛上提问需要给分的情况下使用,一次给分的最高分有限制,最高为300分,如果是初来论坛,最高分为20分,以后逐日递增,直到300。
专家分:当你解决了某个帖子的问题,帖子的主人会给你分数表示奖励,对方给多少得多少。最新制度规定只有软件开发和Web开发类的得分才计入专家分,其他类别问题的得分转换成可用分。
专家分用来恒量用户水平和对人帮助程度的高低,每月论坛按专家分的高低排位,同时设置总专家分最高50排行榜,欢迎大家榜上有名。
参与分:每发表一个帖子得5分,浏览一个帖子得1分。
参与分用来恒量用户参与CSDN的程度,同样设月排行榜和TOP50排行榜。
4、为什么我提问时给的分数有限?
答:每个用户提问的时候分数受三个限制,一是可用分(解释如上),每次给分不能超过可用分,另外一个就是参与分,参与分少的人不能提高分问题,这就是为什么用户可用分很多而每次给分很有限的原因,三是问题最高给分限制在300分。