private void UpdateFilePath_Click(object sender, RoutedEventArgs e) { try { ConfigurationManager.AppSettings["filePath"] = fullFilePathTB.Text; if (FileWatcher.MyFileSystemWatcher != null) { FileWatcher.ChangePath(fullFilePathTB.Text); } System.Windows.MessageBox.Show("Filepath changed."); } catch (Exception ex) { System.Windows.MessageBox.Show("Error occured; ErrorMsg: " + ex.Message); } }