private void but_StartWatch_Click(object sender, EventArgs e) { fw = new FolderWatcher(Set.WchRoot, this); if (but_StartWatch.Text == "Start Watch") { fw.StartWatching(); but_StartWatch.Text = "Stop Watch"; addToLog(1, "Folder watch started"); } else { fw.StopWatching(); but_StartWatch.Text = "Start Watch"; addToLog(1, "Folder watch stopped"); } }
public Form1() { InitializeComponent(); fw = new FolderWatcher(); }