0

I have 2 applications working together:

A windows service (without a GUI) and a Windows Form (GUI).

The Windows Service runs every 10 minutes, reads a .csv file and sends email accordingly. Here I used fixed settings, like "to email address", "from email address", "smtp server", etc. However, I have now extended and added a GUI interface. From this interface, I can check the status of the windows service. If service is stopped, I can (re)start it and so on. I can also add and change settings using the built-in settings feature of VS. eg.

public string smtp_server = Properties.Settings.Default.SMTP_Server;
public string from_email = Properties.Settings.Default.SMTP_Server;
public string to_email = Properties.Settings.Default.SMTP_Server;

My question now - how do I change/add settings from the GUI interface that can then also be used by the Windows Service?

Thanks

  • Hi, I think you can add a form in GUI to add/update settings and persist them in db. Then, your windows service can read db to retrieve updated settings. – Bhupinder Singh Aug 31 '17 at 16:09
  • Have you considered using [external config files](https://stackoverflow.com/questions/505566/loading-custom-configuration-files) ? – Subbu Aug 31 '17 at 17:43

0 Answers0