The previous implementation of the text change notifications and value change events in NikseComboBox was repetitive and cluttered. This commit streamlines that by introducing a new method, NotifyTextChanged(), that handles these events. The new approach contributes to code maintainability and readability.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The commit includes renaming variables in the OCR text correction functionality for better clarity, changing "lastLine" to "previousLine" and "lastLastLine" to "prePreviousLine". It also streamlines the handling of French apostrophes by using an array of affixes to replace repetitive if-else statements.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Mainly focused on streamlining the logic in the TypeWriterEffect class. Implemented StringBuilder for improved performance and readability, removing unneeded code and variables in the process. Additionally, transferred the GetTextWithClosedFontTag method from TypeWriterEffect to KaraokeCharTransform, improving encapsulation and code coherence.
Added a comment explaining a fix in code that prevents precision loss or fraction loss from division in the KaraokeEffect module. This is done by setting the end time of the last animation to the end time of the paragraph, ensuring correct values in milliseconds.
Moved the procedure of setting the end time of the last paragraph from the EffectKaraoke form to the KaraokeEffect class. This change ensures that the proper end time for each animation is set directly within the class where they are created, promoting better code organization.
The condition checking and increment operation in the whitespace skipping loop inside the KaraokeWordTransform file has been refactored for better readability. The increment operation (i++) is now placed inside the loop block instead of the while statement.
The changes made are minor but important. An extra update line has been added to KaraokeEffect.cs to reset the iterator, enabling a more efficient loop through closed captions for Karaoke effects.
Updated the order of tabindex in EffectKaraoke.Designer.cs to improve form navigation using tab key. Also, removed an unnecessary combobox from the form, as it was not serving any purpose in the current implementation. This enhances usability and cleanliness of the codebase.
Changed the constant value for the gap between sentences in the KaraokeEffect to 0. This adjustment aims to eliminate any flickering previously caused by a non-zero gap.
The KaraokeEffect class has been simplified and unused code related to multi-strategy text effects has been removed. This includes removing LegacyKaraokeEffect, ITextKaraokeEffect and EffectAnimationPart classes, and all associated code for handling these classes. This cleanup reduces complexity and allows for easier maintainability.
Expanded conditional statements' blocks in KaraokeEffect.cs to improve readability and maintainability. This change does not alter the overall functionality of the code but makes it easier to handle and debug.
The plugin creation and addition to the listViewGetPlugins is moved into the conditional statement that checks for a match with the search text. This optimizes the search functionality by avoiding unnecessary plugin item creation when the search text does not match any plugin property, thus improving UI performance.
The commit changes some of the test cases for text formattability in HtmlUtilTest.cs. Notably, it modifies a repeated assertion with a string "<i>!?.", replacing it with a fresh assertion testing "!?.</i>".
Added classes for karaoke effect text transformation with support for splitting by character or word. Also implemented a strategy pattern to handle the different transformations. Additionally, added UI components to let users choose the type of effect and made adjustments to existing classes for the new features.