实施金块

时间:2020-07-25 09:40:42

标签: c# forms nuget file-watcher

我不明白如何使用此块代码:Myoddweb.Directorywatcher。安装块之后,我像示例中所述尝试了它:

// at the top:
using myoddweb.directorywatcher;


    private void Form1_Load(object sender, EventArgs e)
    {
        using (var watch = new Watcher())
        {
            watch.Add(new Request(@"D:\Visual Studio\pictures", true));
            watch.OnAddedAsync += async (f, t) =>
            {
                MessageBox.Show("added");
            };
            watch.Start();
        }
    }

添加文件没有任何反应。我想念什么吗?

0 个答案:

没有答案
相关问题