Chit-Chat
Chit-Chat copied to clipboard
Social chatting application with MySQL database features
Chit-Chat
Social chatting application with MySQL database features for windows.
Login | Register |
---|---|
![]() |
![]() |
Password Recovery 1 | Password Recovery 2 |
---|---|
![]() |
![]() |
Public Chat
Private Chat
Light Theme
Image Sending
Contains usages of:
- Makes use of Task based asynchronity through System.Threading
- Socket Programming through Microsoft.AspNetCore.SignalR.Client
- JSON serialization through Newtonsoft.Json
- Web API project to handle HTTP & database requests. https://github.com/Sound932/WebAPI-ChatHub.git
Core functionality:
- Login / Register options
- Saving login info locally for faster logins.
- Password Recovery
- List of connected users, automatically updating when one joins/leaves
- Returning to home view automatically when server is down
- Messages get saved automatically in database
- Message control and loading old messages
- Message deletion
- Private chatting
- Colored Emojis
- Profile Pictures
- Image Sending
- Light and Dark themes
- Character Limit
- Logging out manually.
Memory Performance Features:
- Loading only up to 100 messages at a time.
- Only 100 messages are shown at a time to preserve memory. This feature comes with the ability to load previous messages, however, this works differently for private chats. You are able to have multiple stacks of (up to 100) messages for each individual you're private chatting to. It doesn't count the messages globally.
Framework:
- Made in WPF
- MVVM Design Pattern
Third-Party Libraries:
- SignalR
- Newtonsoft JSON
- MaterialDesignThemes
How were Colored Emojis achieved in WPF
WPF does not support unicode colored emojis. It only supports them in black and white. Question is, how do you go around this? and the answer would be Images.
By using a RichTextBox, you can insert images & rich content which internally uses FlowDocuments and Paragraphs. You can then take the FlowDocument, write it into a MemoryStream formatted as RTF, read the bytes out and send it to an API which then sends it to every socket that needs the data. Users who get the RTF data can now procced to use MemoryStream to Load back the data into a FlowDocument, which can then be inserted into a few controls:
- FlowDocumentPageViewer
- FlowDocumentScrollViewer
- FlowDocumentReader
For a more detailed overview, refer to these links:
- Converting FlowDocument to RTF bytes https://github.com/Sound932/Chit-Chat/blob/f57c50605586eed9eb14ca51218cbac9ffc8830f/Chit%20Chat/Helper/Extensions/DocumentExtensions.cs#L20
- Converting RTF bytes to FlowDocument https://github.com/Sound932/Chit-Chat/blob/46916d8ee7d1ac94174136b4b8e843dc99fd407f/Chit%20Chat/Helper/Extensions/MessageModelExtension.cs#L15
Application State
This application is not finished, and there are a lot of things planned.