protected override void OnStart(string[] args) { var version_strings = Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.'); var version_string = "DeviceServer v" + version_strings[0] + "." + version_strings[1] + " Prerelease " + version_strings[2] + "." + version_strings[3]; logger.AppendLog(DateTime.Now, version_string); logger.AppendLog(DateTime.Now, "Service - Starting"); DeviceConnectionManager.Start(); ServerAdvertiser.Start(); ServerListener.Start(); logger.AppendLog(DateTime.Now, "Service - Started"); }
public DeviceServer() { InitializeComponent(); var version_strings = Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.'); var version_string = "DeviceServer v" + version_strings[0] + "." + version_strings[1] + " Prerelease " + version_strings[2] + "." + version_strings[3]; logger.AppendLog(DateTime.Now, version_string); logger.AppendLog(DateTime.Now, "Service - Starting"); DeviceConnectionManager.Start(); ServerAdvertiser.Start(); ServerListener.Start(); logger.AppendLog(DateTime.Now, "Service - Started"); }