public static void Initialize(UI.Forms.frmScriptBuilder builder) { associatedBuilder = builder; automationLogger.Information("Automation Listener Initializing"); automationInstance = new Automation.Engine.AutomationEngineInstance(); var appSettings = new Core.ApplicationSettings(); appSettings = appSettings.GetOrCreateApplicationSettings(); listenerSettings = appSettings.ListenerSettings; if (listenerSettings.LocalListeningEnabled) { automationLogger.Information("Local Listening is Enabled"); } else { automationLogger.Information("Local Listening is Disabled"); } if ((listenerSettings.StartListenerOnStartup) && (listenerSettings.LocalListeningEnabled)) { automationLogger.Information("Automatically Starting Listening Service"); StartListening(listenerSettings.ListeningPort); } else if ((listenerSettings.StartListenerOnStartup) && (!listenerSettings.LocalListeningEnabled)) { automationLogger.Information("Listening Service is not Enabled! Unable to Automatically Start Listening!"); } automationLogger.Information("Automation Listener Finished Initializing"); }
public static void Initialize(IfrmScriptBuilder builder, IEngine automationEngine) { _associatedBuilder = builder; _automationLogger = automationEngine.EngineLogger; _automationLogger.Information("Automation Listener Initializing"); if (AutomationInstance == null) { AutomationInstance = automationEngine; } var appSettings = new ApplicationSettings(); appSettings = appSettings.GetOrCreateApplicationSettings(); _listenerSettings = appSettings.ListenerSettings; if (_listenerSettings.LocalListeningEnabled) { _automationLogger.Information("Local Listening is Enabled"); } else { _automationLogger.Information("Local Listening is Disabled"); } if (_listenerSettings.StartListenerOnStartup) { if (_listenerSettings.LocalListeningEnabled) { _automationLogger.Information("Automatically Starting Listening Service"); StartListening(_listenerSettings.ListeningPort); } else { _automationLogger.Information("Listening Service is not Enabled! Unable to Automatically Start Listening!"); } } _automationLogger.Information("Automation Listener Finished Initializing"); }