This target was deleted from the project file as it is no longer necessary. The build process remains unaffected since the referenced NuGet package is already handled elsewhere. This change simplifies the csproj file and eliminates redundant checks.
Note: \packages\ directory is irrelevant for packagereference
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Moved version numbers from individual csproj files to Directory.Packages.props to enable centralized management of package versions. This simplifies version control and ensures consistency across the project.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Refactor project files to use Directory.Packages.props for centralized NuGet package management, making dependency updates easier and more consistent across projects. Removed explicit version specifications from individual project files.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Replaced tabs with spaces and adjusted XML formatting in Test.csproj to enhance readability and maintain consistency. No functional changes were made to the project configuration.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Removed the empty TargetFrameworkProfile and NuGetPackageImportStamp elements and added the RuntimeIdentifier property set to 'win'. This change specifies the runtime environment for the project, ensuring it targets the Windows platform explicitly.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Replaced `packages.config` with `PackageReference` in `Test.csproj` for streamlined package management. Also updated the `System.Net.Http` binding redirect in `app.config` from version `4.2.0.0` to `4.1.2.0`.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Changed the character check from '<' to '>' in the tag detection logic to properly toggle the tagOn variable. This corrects the behavior for closing tags, improving markup parsing accuracy.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Removed GetCharactersPerSecond method from the Utilities class and refactored all its references to use the equivalent method newly added in the Paragraph class. This refactoring resulted in cleaner, more object-oriented code and consolidated related logic in the Paragraph class. Ensured all unit tests are passing after this significant change.
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
Updated the variable 'ChapterDisplay' to 'chapterDisplay' in the 'GetChapterName' method of the 'MatroskaFile.cs' file. This change adheres to the standard naming convention increasing code readability and maintainability.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This update changes the 'CopyToOutputDirectory' setting for all language files from 'Always' to 'PreserveNewest'. This change ensures that only the latest versions of these language files will be copied during the build process, preventing unnecessary duplication.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Streamlined the loading of dictionaries in the GetTesseract302Dictionaries file by using XmlReader directly on the decompressed stream. This change simplifies the processing flow and reduces the overall amount of coding needed.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The dictionaries 'TesseractDictionaries.xml', 'HunspellBackupDictionaries.xml', and 'HunspellDictionaries.xml' were removed from the SubtitleEdit.csproj as they are no longer used. This helps to keep the project clean and uncluttered.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The commits replace all instances of `new EventArgs()` with `EventArgs.Empty` in different video player classes. This change improves performance by reducing unnecessary object instantiation and aligns with the best practices of C# coding.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Reorganized the way various graphics disposal were handled in the LayoutPicker form. Instead of individual dispose calls, the disposing logic has been consolidated into a new method named DisposeGraphics(). This makes our disposal logic more modular, maintainable, and easier to read.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The Dispose method has been added to LayoutPicker.cs for properly disposing the managed resources. As part of the changes, the existing Dispose method from LayoutPicker.Designer.cs was removed and integrated into the new method, ensuring more optimized disposal of resources.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This update adds a null-conditional operator before disposing the http client in AutoTranslate form. This ensures that _httpClient.Dispose() only gets called if _httpClient is not null, preventing potential NullReferenceException.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The AutoTranslate download functionality has been refactored to improve error handling. An optional parameter has been added to the DownloadOllamaModelsAsync method to control whether or not to show error notifications. Also, the GetOllamaClient method has been simplified for readability and maintainability.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The HttpClient instances are now wrapped in a using statement to properly dispose them after use. This practice prevents potential memory leaks and ensures that system resources are returned back to the system once the HttpClient instances are no longer needed, improving the system's overall efficiency and performance.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The main change in this commit is relocating several settings related classes from `Nikse.SubtitleEdit.Core.Common` to a new namespace `Nikse.SubtitleEdit.Core.Settings`. This improves the project organization by grouping all settings-related functionality and data together, making it easier to find and maintain. This refactoring required updates across numerous files to import the new namespace.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit adds new classes for settings including 'MultipleSearchAndReplaceGroup', 'MultipleSearchAndReplaceSetting', 'NetworkSettings', 'AssaStorageCategory', and 'GeneralSettings'. Each class represents different groups of settings. These classes will be utilized to manage the settings in a more organized way.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
In a wrap catch of the AutoTranslate.cs file, a conditional directive was added to display different error messages for DEBUG and RELEASE modes. This ensures that detailed exception information is shown during debugging for better troubleshooting, while a more user-friendly message is used in the release build.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
An unnecessary whitespace line was removed from the AutoTranslate.cs file to improve code readability. Additionally, the HttpClient in the AutoTranslate.Designer.cs file was disposed to free up system resources and prevent potential memory leaks.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
HttpClient is optimized, now a single instance is shared instead of creating new for each request. The 'ConfigureAwait' statements have been adjusted in the async calls to improve asynchronous handling. Reorganized the downloading of Ollama models which simplifies and increases program efficiency.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The process for downloading Ollama Models has been refactored for brevity and clarity. A private async method, 'GetModelsAsync', was introduced by extracting code from 'DownloadOllamaModelsAsync'. This change enhances code readability and makes possible errors easier to trace.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Removed the BackgroundWorker in the `nikseComboBoxEngine_SelectedIndexChanged` method, replacing it with async/await for better readability and performance. Extracted a `DownloadOllamaModelsAsync` method to download models, which also replaced the synchronous approach in `UpdateLocalModelsToolStripMenuItem_Click`.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>