Sorry for the delay in getting this out everyone. A lot of the work in this patch is under the hood stuff, but it has been a lot of work (a vast majority of which comes from Stefaf, so major thanks to him for that

). This patch should bring a lot of bugfixes and optimization, two things that are forever a work in progress but I'll keep doing what I go to do to keep moving forward
Patch 53
Here -
https://mega.nz/#!bY0jVAjb!SY34s7_eTWUX ... wiD4FNPMzc
Patch Notes:
Improvements -
Overhauled the way Tease AI filters out invalid lines from List scripts - The old process was one of the first things I programmed, and it was very clunky and has probably led to its fair share of errors when running Tease AI. The new process is an interim solution that is much more streamlined, faster and less likely to produce the kind of errors the original system was capable of. If you do notice any strange behavior in this department, please let me know and I'll get it fixed.
Bugfixes -
@Goto() style Commands have been tweaked to fix potential bugs
Commands -
Added Command
@ShowLocalImage() - Since genre image Commands such as
@ShowLesbianImage,
@ShowFemdomImage etc can now reference Local or URL Files,
@ShowLocalImage() has been created to allow you to specify genre images in Local files only. You can use a comma to create a list to randomly choose from, or use "not" to show any Local image but the genres specified. For example:
@ShowLocalImage(lesbian) - Show a local lesbian image
@ShowLocalImage(hentai, captions) - Show either a local hentai or captions image
@ShowLocalImage(not, captions) - Show any local image that is not a captions image
@ShowLocalImage(gay, maledom, not) - Show any local image that is not a gay or maledom image
Fixes added from Community Members:
Stefaf: Addon: Logging
- Spoiler: show
- Added new Class Log. this Class provides static Members to Write Logfiles.
These have been added to Function txt2list(String). Now most of the script loading will log it's IO-Access with StackTrace. This file is located in Tease-AI-Folder and has a maximum Size of 2MB. If it gets bigger, the file will be flushed. To easily remove the Stacktrace on top of the file a Regex Matchpattern is included.
Added Error-Loggging to all Catch Blocks containing : "Tease-AI did....". These logs will be saved in Application StartupPath & /ErrorLogs/. Each day a new file will be created.
All Times are converted to UniversalTime and Printed in Format "yyyy-MM-dd HH:mm:ss"
Log.Write() supports now StackTraceTrimming. This way the LogFile can contain more useful Information before it's flushed. Now it's even possible to skip the StackTrace, if you want to show unique and meaningful Messages.
Log.Write() and Log.WriteError() use now only for BuildDate and FileCreation UTC-Time. All other Messages are Local Time in fixed format "yyyy-MM-dd HH:mm:ss".
Added Log.Write() to Sections as marked in VS-TaskList.
Improvement: If PoundClean() was loading an empty Textfile it displayed only the Message: "ERROR: Tease AI did not return a valid line while parsing Command Filters". Added Log.WriteError(), with detailed information, which file was causing the error. It's loading files now via txt2List(String). This way the file loading is tracked. There was a check for empty lines. This is now part of txt2list(String) and applies to all loaded Files, loaded with txt2List(String).
Stefaf: App Shutdown - Added Call to BaseClass.OnClosing(e), for proper closing of application. Now the Notify-Icon should be removed properly.
Stefaf: BugFix SaveSettingsimage, MuteMedia
- Spoiler: show
- Function SaveSettingsImage(Image) didn't check if the global "ImageLocation" contains Local PAth or a remote. Added this Check.
Created DataBinding between CBMuteMedia and My.Seetings.MuteMedia. There is no chance this Setting isn't loading or saving anymore. And the Binding is set on InitializeComponent. Afterwards each change of MySetting.MuteMedia will Update CBmutMedia.checked and vice versa.
Stefaf: Improvement ImageLoading
- Spoiler: show
- Added Class BackgroundWorkerSyncable, basically a Wrapper around System.ComponentModel.BackgroundWorker.Addes members to wait for the Backgroundworker to complete in a Application.DoEvents Loop and for delayed triggering the RunWorkerCompleted-Event.
Description
Now Images can be loaded on a BackgroundThread, while the calling procedure stops, until the the image has been loaded. Even manually syncing is possible. Simply Call ShowImage(ImageUrl, False). This way the Calling procedure is not blocked until the Backgroundworker is finished. In this case the BackgroundWorker wont trigger the RunWorkerCompleted-Event until BWimageFetcher.WaitToFinish() is called. This way the calling procedure can work while the Backgroundworker loads and saves the File.
Added Partial Class of Form1 which contains ImageRelated Functions and Classes
Added Class ImageDataContainer Which contains everything to Evaluate and get images. Use The Function GetRandomImage() + 3 Overloads to get an single Image-URl from all Files.
Improvement: CustomSlidshow is now able to use URL-Files. Works pretty good...
BugFix: ShowImage(STring, Boolean) SaveSessionImageFolder contained an Error. No Session Image was saved.
Modified BackgroundWorkerSyncable: Added a Timer to force a delyed Trigger after 10 sek, when an External Trigger is Required. This Event is triggered with an TimeoutException and EmptyResilt. This way the BGW can "heal" itself if the Trigger was forgotten. Otherwise the BGW is blocked for the Rest of the Session.
Renamed SyncRequired to TriggerRequired
Renamed CancelSync to CancelTrigger.
Added Feature: If A Time-out while waiting for the Backgroundwork has occurred the RunWorkerCompleted Event will triggered with all Data and Cancelled = true.
CancelTrigger will trigger now an RunWorkerCompled-Event, where cancelled = True.
Fix: Modified position to Trigger the manual ImageFetcher.RunWorkerCompleted-Event. WaitToFinish was executed after the Text was written to Chatbox. Now it will wait to finish before writing the Text - I think at least.
Added SUGGESTION: All Writing to the Chatbox should be in a separate Function.
This Function should decide, if writing is necessary or not and get preloaded Images.
Modified CustomSlideshowTimer.Tick: The Timer stops itself on start and starts again when exiting the Function. This way each image is at least shown the same amount of time.
Stefaf: BugFix: CustomSlideshow ThreadException
- Spoiler: show
- The Custom Slideshow randomly caused an IllegalCrossThreadCall, when the Slideshow was still running while the Domme is writing a Response.
Neseccary Changes: Removed Thread "Thr", Removed Image-Variable "original", Removed Sub LoadSlideshowImage(), which was the AddressOf "Thr", Modified Sub CustomSlideshowTimer_Tick() , to call ShowImage() what is loading the Image Async., Removed Object BWSlideshow, Added Invoke to set the LBLImageInfo.Text in DisplayImage().
Stefaf: BugFix DomTagApp
pepsifreak: SplitterDistance setting now resets if too big
Stefaf: Bugfix: The Custom Slideshow randomly caused an IllegalCrossThreadCall, when the Slideshow was still running while the Domme is writing a Response.
Stefaf: Bugfix: UI-didn't resize on maximizing the window.
Stefaf: Bugfix: Hold the Edge Taunts returned "TeaseAI did not return a Hold the Edge Taunt" <--- Sorry guys and gals, that was my fault. (stefaf)
Stefaf: BugFix: @DommeTag() Didn't return the right picture, if the Task-Line contained a Keyword.
Stefaf: Bugfix/Addon: Only CH-Videos did load .flv Files. Now all Video-genres can load .flv-Files.
Stefaf: Bugfix: @ShowBoobsImage Local Images
- Spoiler: show
- GetTnAList() Local branch wrote to wrong List.
Stefaf: Added Class myDirectory
- Spoiler: show
- Changed all critical System.IO.Directory-References to myDirectory. Now no DirectoryNotFoundException can occur, as long as the Directory is a subdirectory of Application.StartupPath.
Description:
This Class is an Extension for the Class IO.Directory based on the needs of Tease-AI.
Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.
Implemeted this far:
- GetFiles() + 2 Overloads.
IO.Directory.GetFiles throws a Directory not FoundException, if the Directory of the file cannot be found. This Functions create the Directory, as long as it is in die Application.StartupPath.
- GetDirectories() +2 Overloads.
IO.Directory.GetDirectories throws a Directory not FoundException, if the Directory of the file cannot be found. This Functions create the Directory, as long as it is in die Application.StartupPath.
myDirectory:
Added Public Shared Function: GetFilesExtension() to Search Files in the given directory with multiple extensions.
Added Public Shared Function: GetFilesVideo() to retrieve all video-files in a given directory.
Added Public Shared Function: GetFilesImages() to retrieve all Image-Files in a given directory.
Form1.vb:
Moved PlayRandomJOI() and PlayRandomCH() to Video-Region
Removed Function GetVideosInDirectory() for it's replaced by myDirectory.GetFilesVideo().
Sorry again for how long it took to get this patch out. Any bugs that come up now can be fixed in a timelier manner than this patch took, most of the delay was due to me having to crash course on a lot of complicated code. If you have any bugs or comments or questions please let me know and I'll take care of it as soon as I can