private void StartButtonClick(object sender, RoutedEventArgs e) { LogMessage("Setting up FTP Parameters"); bool ready = false; try { int uploadFrequency = int.Parse(UploadFrequency.Text); XMLParser.SetUploadFrequency(uploadFrequency); WebManager.SetupFTP(Username.Text, Password.Password, FTPServer.Text + "/" + RemotePath.Text + "/"); ready = true; } catch (Exception ex) { LogError("Unable to set up the FTP parameters", ex); } if (ready) { LogMessage("Starting directory monitor"); try { string jpegDirectory = ""; if (Directory.Exists(JPEGLabel.Text)) { jpegDirectory = JPEGLabel.Text; } DirectoryMonitor.Start(XMLLabel.Text, jpegDirectory, this); } catch (Exception ex) { LogError("Unable to start directory monitor", ex); } } }
private void StopButtonClick(object sender, RoutedEventArgs e) { DirectoryMonitor.Stop(); }