ControllerReturnCode Start() { var applicationName = string.Empty; var version = string.Empty; _controller.Timeout = _timeout; if (_controller.IsStarted) { _controller.Shutdown(); } ControllerReturnCode ret = _controller.InitApplication(out applicationName, out version, _port); Logger.LogControllerResult("InitApplication", ret); if (ret == ControllerReturnCode.Success) { Logger.LogMessage( string.Empty, string.Format("ApplicationName: {0}", applicationName), string.Format("Version: {0} ", version), string.Format("Timeout: {0} ", _timeout.ToString()), string.Format("Port: {0} ", _port.ToString()) ); } return(ret); }
void Stop() { if (_controller.IsStarted) { ControllerReturnCode ret = _controller.Shutdown(); Logger.LogControllerResult("Shutdown", ret); } UpdateUI(); }