Enable the Create Script button even if there are already items in the listview. In addition, the user is now prompted if he's sure he wants to overwrite the current script or not
When using the Create Script button on an entryorguid that already has SAI, add an option to load the script
When attemtping to create a script on an entryorguid that does not have its AIName set properly but DOES have one or more entries in the smart_scripts table, we now also prompt the user if he'd like to load the scripts
Set the first value of `id` to 0 instead of -1 if the id is locked
If a new script is created, select the first item instead of some id; there's no point to use the `id` value as an indicator as it's always the first (and only) item in the listview
Enable the Create Script button after using it
When loading a script instantly after selecting an entry from the SearchForEntryForm and this entry turning out to not have any SAI to load, we now also prompt the user if he wants to create a new script for the given source. This depends, of course, on the setting whether or not the user wants to automatically load selected scripts on selection.
Fix an issue where columns of the tables we are touching would be replaced by @ENTRY/@GUID pre-fixes. For example if you're scripting entry 1, event_param1 would become event_param@ENTRY
Fix an issue where an exception was thrown when opening the Generate Sql option while GetSmartScriptsForEntryAndSourceType returned null on initialization
The Generate Sql button and menu item are no longer enabled by default after loading a script, even if there were no scripts returned
Don't reset the static information (entryorguid and source_type) when the last row is deleted from the listview unless 'Change Static Information' is turned on
Use the FastColoredTextBox dll in the SQL output form. Looks like this: http://i.imgur.com/LLe3bVC.png
Add an item to the TODO.txt
When executing a query which has errors, we now abort/rollback to the previous state. Fixes an issue where the AIName of the source would be set while the smart_scripts lines would contain an error-causing line which resulted in an AIName without actual smart_scripts.
Fix a minor logic flaw and an useless conversion between datatypes. Thanks to @Laniax for the datatype part of this commit.
When using the Create Script button we now also update the original entryorguid and source_type to the new values
Merge remote-tracking branch 'upstream/master'