Ameer5121 / Chit-Chat

Social chatting application with MySQL database features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chit-Chat

Social chatting application with MySQL database features for windows.

Login Register
1 2
Password Recovery 1 Password Recovery 2
2 3

Public Chat 147118569-4d61d3ba-74b2-4a50-a01b-db7316030b7e

Private Chat 147118538-e891a89c-c644-41fb-9e97-91277a0c8d98

Light Theme 147118499-1c5878c0-c3fb-47a7-9b53-5bc2f68d4906

Image Sending 147118454-13bab06f-7b4f-4d20-b14e-65c633e4839d

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:

Application State

This application is not finished, and there are a lot of things planned.

About

Social chatting application with MySQL database features

License:Apache License 2.0


Languages

Language:C# 100.0%