public void executeCode()
{
try
{
isrScriptRunner.setScriptFromString(((TextBox)currentlySelectedTab.Content).Text);
if (Factory.getThreadHandlingInstance.find("ExecuteScript").threadPlaceHolder.IsAlive == true)
{
if (UIService.showMessageBox("Another program already running, please wait for it to finish\n\nWould you like to abort it and continue?", "Build", MessageBoxButton.OKCancel, MessageBoxImage.Warning) == MessageBoxResult.OK)
{
Factory.getLogInstance.log("Build thread aborted, new will be started!", eLogType.LOG_INFO);
Factory.getThreadHandlingInstance.abortAndWait("ExecuteScript");
}
else
{
return;
}
}
Factory.getThreadHandlingInstance.start("ExecuteScript");
}
catch(Exception e)
{
UIService.showMessageBox(e.Message, "ScriptRunner", MessageBoxButton.OK, MessageBoxImage.Error);
}
}