Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature and code improvement (v0.9.050) #87

Merged
merged 2 commits into from
Nov 16, 2024
Merged

New feature and code improvement (v0.9.050) #87

merged 2 commits into from
Nov 16, 2024

Conversation

BoiHanny
Copy link
Owner

PR Classification

New feature and code improvement.

PR Summary

This PR introduces a custom prefix icon shuffle feature and improves error handling, logging, and default value management in the settings management process.

  • DataController.cs: Refactored ConvertToType method and added support for ObservableCollection<string>.
  • PulsoidOAuthHandler: Implemented IDisposable and added thread safety.
  • ViewModel: Added properties and methods to manage the emoji collection and shuffle functionality.
  • MainWindow.xaml.cs: Updated to handle new button click and key press events for adding emojis.
  • UI: Added new checkboxes and text boxes for custom emoji shuffle, and updated visual elements for consistency.

Refactored `ConvertToType` in `DataController.cs` for better error handling and added support for `ObservableCollection<string>`. Introduced a new `EmojiCollection` setting and enhanced `LoadSettingFromXML` to retain existing values if missing or empty. Added `SetDefaultValue` method for default property values. Updated `SaveSettingToXML` to handle `ObservableCollection<string>` by serializing to JSON. Added extensive logging to settings management.

In `OSCController.cs`, `GetNextEmoji` is now called with a `true` argument. Updated `PulsoidModule.cs` to check `Application.Current` before invoking `ProcessData` and refactored monitoring conditions into `CheckMonitoringConditions`. `PulsoidOAuthHandler` now implements `IDisposable` with proper resource disposal and improved error handling.

Updated `MagicChatbox.csproj` to reference newer versions of `LibreHardwareMonitorLib` and `OpenAI-DotNet`.

Added a new feature for custom prefix icon shuffle in personal status and chat messages. Introduced `EnableEmojiShuffle_checkbox` and related UI elements for emoji input and management. Updated `ViewModel` with properties and methods to handle emoji collection and shuffling logic. Removed outdated Halloween-themed UI elements and updated URLs in specific methods.

Refactor settings and add custom emoji shuffle feature

Refactored `ConvertToType` method for better error handling and added support for `ObservableCollection<string>`. Introduced a new `EmojiCollection` setting and updated `LoadSettingFromXML` and `SaveSettingToXML` methods to handle it. Added `SetDefaultValue` method and enhanced logging throughout settings management.

Updated `GetNextEmoji` method to accept a boolean parameter. Refactored timer's elapsed event handler in `PulsoidModule.cs` and implemented `IDisposable` in `PulsoidOAuthHandler` with improved error handling and logging. Bumped versions of `LibreHardwareMonitorLib` and `OpenAI-DotNet` packages.

Added custom prefix icon shuffle feature with new UI elements including a `CheckBox`, `TextBox`, and button for managing emoji list. Updated `ViewModel` to support new emoji shuffle settings and removed old Halloween-themed emojis. Updated UI and URLs in specific methods to reflect new features and changes.
Updated the version number in MagicChatbox.csproj from 0.9.047 to 0.9.050, indicating a new release or update with potential new features, bug fixes, or improvements.
@BoiHanny BoiHanny merged commit 98974d7 into master Nov 16, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant