public frmScriptEngine(string pathToFile, frmScriptBuilder builderForm) { filePath = pathToFile; callBackForm = builderForm; InitializeComponent(); //get engine settings engineSettings = new Core.ApplicationSettings().GetOrCreateApplicationSettings().EngineSettings; //setup logging taskt.Core.Logging.Setup("Script Execution Log"); //define log appender var appenders = log.Logger.Repository.GetAppenders().OfType <FileAppender>().FirstOrDefault(); //set log mode if (engineSettings.EnableDiagnosticLogging) { appenders.Threshold = log4net.Core.Level.Debug; } else { appenders.Threshold = log4net.Core.Level.Off; } createMissingVariables = engineSettings.CreateMissingVariablesDuringExecution; LogInfo("taskt Engine Loaded"); LogInfo("Selected Script: " + pathToFile); advancedDebug = engineSettings.ShowAdvancedDebugOutput; if (advancedDebug) { lstSteppingCommands.Show(); lblMainLogo.Show(); pbBotIcon.Hide(); lblAction.Hide(); } else { lstSteppingCommands.Hide(); lblMainLogo.Hide(); pbBotIcon.Show(); lblAction.Show(); } //apply debug window setting if (!engineSettings.ShowDebugWindow) { this.Visible = false; this.Opacity = 0; } }
//events and methods #region Form Events/Methods public frmScriptEngine(string pathToFile, frmScriptBuilder builderForm, List <Core.Script.ScriptVariable> variables = null, bool blnCloseWhenDone = false) { InitializeComponent(); if (variables != null) { Variables = variables; } CloseWhenDone = blnCloseWhenDone; //set callback form callBackForm = builderForm; //set file this.filePath = pathToFile; //get engine settings engineSettings = new Core.ApplicationSettings().GetOrCreateApplicationSettings().EngineSettings; //determine whether to show listbox or not advancedDebug = engineSettings.ShowAdvancedDebugOutput; //if listbox should be shown if (advancedDebug) { lstSteppingCommands.Show(); lblMainLogo.Show(); pbBotIcon.Hide(); lblAction.Hide(); } else { lstSteppingCommands.Hide(); lblMainLogo.Hide(); pbBotIcon.Show(); lblAction.Show(); } //apply debug window setting if (!engineSettings.ShowDebugWindow) { this.Visible = false; this.Opacity = 0; } //add hooks for hot key cancellation GlobalHook.HookStopped += new EventHandler(OnHookStopped); GlobalHook.StartEngineCancellationHook(engineSettings.CancellationKey); }
public frmScriptEngine(string pathToFile, frmScriptBuilder builderForm) { Core.Client.EngineBusy = true; filePath = pathToFile; callBackForm = builderForm; InitializeComponent(); //get engine settings engineSettings = new Core.ApplicationSettings().GetOrCreateApplicationSettings().EngineSettings; createMissingVariables = engineSettings.CreateMissingVariablesDuringExecution; LogInfo("taskt Engine Loaded"); LogInfo("Selected Script: " + pathToFile); advancedDebug = engineSettings.ShowAdvancedDebugOutput; if (advancedDebug) { lstSteppingCommands.Show(); lblMainLogo.Show(); pbBotIcon.Hide(); lblAction.Hide(); } else { lstSteppingCommands.Hide(); lblMainLogo.Hide(); pbBotIcon.Show(); lblAction.Show(); } //apply debug window setting if (!engineSettings.ShowDebugWindow) { this.Visible = false; this.Opacity = 0; } }
public frmScriptEngine() { InitializeComponent(); //set file this.filePath = null; //get engine settings engineSettings = new Core.ApplicationSettings().GetOrCreateApplicationSettings().EngineSettings; //determine whether to show listbox or not advancedDebug = engineSettings.ShowAdvancedDebugOutput; //if listbox should be shown if (advancedDebug) { lstSteppingCommands.Show(); lblMainLogo.Show(); pbBotIcon.Hide(); lblAction.Hide(); } else { lstSteppingCommands.Hide(); lblMainLogo.Hide(); pbBotIcon.Show(); lblAction.Show(); } //apply debug window setting if (!engineSettings.ShowDebugWindow) { this.Visible = false; this.Opacity = 0; } //add hooks for hot key cancellation GlobalHook.HookStopped += new EventHandler(OnHookStopped); GlobalHook.StartEngineCancellationHook(engineSettings.CancellationKey); }
public frmScriptEngine(string pathToFile, frmScriptBuilder builderForm) { filePath = pathToFile; callBackForm = builderForm; InitializeComponent(); //get engine settings engineSettings = new Core.ApplicationSettings().GetOrCreateApplicationSettings().EngineSettings; //setup logging taskt.Core.Logging.Setup("Script Execution Log"); //define log appender var appenders = log.Logger.Repository.GetAppenders().OfType <FileAppender>().FirstOrDefault(); //set log mode if (engineSettings.EnableDiagnosticLogging) { appenders.Threshold = log4net.Core.Level.Debug; } else { appenders.Threshold = log4net.Core.Level.Off; } LogInfo("taskt Engine Loaded"); LogInfo("Selected Script: " + pathToFile); //apply debug window setting if (!engineSettings.ShowDebugWindow) { this.Visible = false; this.Opacity = 0; } }