public MainWindow() { InitializeComponent(); FileWatchInterop.Init(); FileWatchInterop.Window = this; this.Closing += HandleClosing; }
private void HandleClosing(object sender, EventArgs e) { FileWatchInterop.Kill(); }
private void AddMonitoredFolderButton_Click(object sender, EventArgs e) { FolderBrowserDialog.ShowDialog(); MonitoredFoldersListBox.Items.Add(FolderBrowserDialog.SelectedPath); FileWatchInterop.AddWatchedPath(FolderBrowserDialog.SelectedPath); }