├── Dorisoy.ChatServer
├── Pages
│ ├── _ViewStart.cshtml
│ ├── _ViewImports.cshtml
│ ├── Privacy.cshtml
│ ├── Shared
│ │ ├── _ValidationScriptsPartial.cshtml
│ │ ├── _Layout.cshtml
│ │ └── _Layout.cshtml.css
│ ├── Index.cshtml
│ ├── Index.cshtml.cs
│ ├── Privacy.cshtml.cs
│ ├── Error.cshtml.cs
│ └── Error.cshtml
├── appsettings.json
├── appsettings.Development.json
├── Models
│ └── ChatUser.cs
├── Dorisoy.ChatServer.csproj.user
├── Dorisoy.ChatServer.csproj
├── Hubs
│ ├── HubHelper.cs
│ └── ChatHub.cs
├── Program.cs
└── Properties
│ └── launchSettings.json
├── Dorisoy.ChatApp
├── Resources
│ ├── Images
│ │ ├── f1.png
│ │ ├── f2.png
│ │ ├── f3.png
│ │ ├── f4.png
│ │ ├── m1.png
│ │ ├── m2.png
│ │ ├── m3.png
│ │ ├── m4.png
│ │ ├── send.png
│ │ ├── user.png
│ │ ├── emoji7.png
│ │ ├── emoji8.png
│ │ ├── nodata.png
│ │ ├── back_white.png
│ │ ├── icon_send.png
│ │ ├── location.png
│ │ ├── password.png
│ │ ├── splash.svg
│ │ └── dotnet_bot.svg
│ ├── Fonts
│ │ ├── icon.ttf
│ │ ├── ionicons.ttf
│ │ ├── Poppins-Bold.otf
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-solid-900.ttf
│ │ ├── line-awesome.ttf
│ │ ├── OpenSans-Regular.ttf
│ │ ├── Poppins-Medium.otf
│ │ ├── Poppins-Regular.otf
│ │ ├── Poppins-SemiBold.otf
│ │ ├── fa-regular-400.ttf
│ │ ├── Font-Awesome-Solid.otf
│ │ ├── OpenSans-Semibold.ttf
│ │ └── material-icons-outlined-regular.otf
│ ├── AppIcon
│ │ ├── appicon.svg
│ │ └── appiconfg.svg
│ ├── Raw
│ │ └── AboutAssets.txt
│ ├── Splash
│ │ └── splash.svg
│ └── Styles
│ │ └── Colors.xaml
├── Handlers
│ ├── BorderlessPicker.cs
│ ├── BorderlessEditor.cs
│ └── BorderlessEntry.cs
├── AppShell.xaml.cs
├── Properties
│ └── launchSettings.json
├── Styles
│ ├── Colors.xaml.cs
│ ├── Icons.xaml.cs
│ ├── Labels.xaml.cs
│ ├── Styles.xaml.cs
│ ├── Buttons.xaml.cs
│ ├── Icons.xaml
│ ├── Colors.xaml
│ ├── Labels.xaml
│ └── Buttons.xaml
├── MainPage.xaml.cs
├── Views
│ ├── LoginPage.xaml.cs
│ ├── ChatListPage.xaml.cs
│ ├── RegisterPage.xaml.cs
│ ├── ChatMessagePage.xaml.cs
│ ├── FontIcons
│ │ ├── FontIconsPage.xaml.cs
│ │ ├── FaRegular.cs
│ │ └── FontIconsPage.xaml
│ ├── LoginPage.xaml
│ ├── RegisterPage.xaml
│ ├── ChatListPage.xaml
│ └── ChatMessagePage.xaml
├── Models
│ ├── Result.cs
│ ├── User.cs
│ ├── Login.cs
│ ├── FontIconGroupModel.cs
│ └── ChatModels.cs
├── Platforms
│ ├── Android
│ │ ├── Resources
│ │ │ └── values
│ │ │ │ └── colors.xml
│ │ ├── MainApplication.cs
│ │ ├── MainActivity.cs
│ │ └── AndroidManifest.xml
│ ├── iOS
│ │ ├── AppDelegate.cs
│ │ ├── Program.cs
│ │ └── Info.plist
│ ├── MacCatalyst
│ │ ├── AppDelegate.cs
│ │ ├── Program.cs
│ │ └── Info.plist
│ ├── Windows
│ │ ├── App.xaml.cs
│ │ ├── App.xaml
│ │ ├── app.manifest
│ │ └── Package.appxmanifest
│ └── Tizen
│ │ ├── Main.cs
│ │ └── tizen-manifest.xml
├── Controls
│ ├── BorderLessEntry.cs
│ └── GradientButton.cs
├── Custom
│ └── GradientHeaderNavigationPage.cs
├── ViewModels
│ ├── BaseViewModel.cs
│ ├── RegisterViewModel.cs
│ ├── LoginViewModel.cs
│ ├── FontIcons
│ │ └── FontIconsViewModel.cs
│ ├── ChatMessageViewModel.cs
│ └── ChatListViewModel.cs
├── GlobalUsings.cs
├── MainPage.xaml
├── Converters
│ ├── InverseBoolConverter.cs
│ └── OnlineStatusColorConverter.cs
├── Helpers
│ ├── Utils.cs
│ └── ChatHelper.cs
├── AppShell.xaml
├── MauiProgram.cs
├── App.xaml.cs
├── Selectors
│ └── FontIconsTemplateSelector.cs
├── Dorisoy.ChatApp.csproj.user
├── App.xaml
└── Dorisoy.ChatApp.csproj
├── .gitignore
├── Delete-BIN-OBJ-Folders.bat
├── README.md
└── Dorisoy.ChatApp.sln
/Dorisoy.ChatServer/Pages/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "_Layout";
3 | }
4 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/f1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/f1.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/f2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/f2.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/f3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/f3.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/f4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/f4.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/m1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/m1.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/m2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/m2.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/m3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/m3.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/m4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/m4.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/icon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/icon.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/send.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/user.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Handlers/BorderlessPicker.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Handlers;
2 | public class BorderlessPicker : Picker
3 | {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/ionicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/ionicons.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/emoji7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/emoji7.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/emoji8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/emoji8.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/nodata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/nodata.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/back_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/back_white.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/icon_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/icon_send.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/location.png
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Images/password.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | Dorisoy.ChatApp/bin/
3 | Dorisoy.ChatApp/obj/
4 | Dorisoy.ChatServer/obj/
5 | Dorisoy.ChatServer/bin/
6 | Dorisoy.ChatServer/wwwroot/
7 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/Poppins-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/Poppins-Bold.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/line-awesome.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/line-awesome.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/Poppins-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/Poppins-Medium.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/Poppins-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/Poppins-Regular.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/Poppins-SemiBold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/Poppins-SemiBold.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/Font-Awesome-Solid.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/Font-Awesome-Solid.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/OpenSans-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/OpenSans-Semibold.ttf
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using Dorisoy.ChatServer
2 | @namespace Dorisoy.ChatServer.Pages
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Fonts/material-icons-outlined-regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dorisoy/Dorisoy.ChatApp/HEAD/Dorisoy.ChatApp/Resources/Fonts/material-icons-outlined-regular.otf
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/AppShell.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class AppShell : Shell
4 | {
5 | public AppShell()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Colors.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class Colors : ResourceDictionary
4 | {
5 | public Colors()
6 | {
7 | InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Icons.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class Icons : ResourceDictionary
4 | {
5 | public Icons()
6 | {
7 | InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Labels.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class Labels : ResourceDictionary
4 | {
5 | public Labels()
6 | {
7 | InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Styles.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class Styles : ResourceDictionary
4 | {
5 | public Styles()
6 | {
7 | InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Buttons.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class Buttons : ResourceDictionary
4 | {
5 | public Buttons()
6 | {
7 | InitializeComponent();
8 | }
9 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class MainPage : ContentPage
4 | {
5 | public MainPage()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model PrivacyModel
3 | @{
4 | ViewData["Title"] = "Privacy Policy";
5 | }
6 |
@ViewData["Title"]
7 |
8 | Use this page to detail your site's privacy policy.
9 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/LoginPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class LoginPage : ContentPage
4 | {
5 | public LoginPage(LoginViewModel viewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = viewModel;
9 | }
10 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/ChatListPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class ChatListPage : ContentPage
4 | {
5 | public ChatListPage(ChatListViewModel viewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = viewModel;
9 | }
10 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/RegisterPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class RegisterPage : ContentPage
4 | {
5 | public RegisterPage(RegisterViewModel viewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = viewModel;
9 | }
10 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Models/Result.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Models
2 | {
3 | public class Result
4 | {
5 | public bool IsSuccess { get; set; }
6 | public string Message { get; set; }
7 | public object Data { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/AppIcon/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/ChatMessagePage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp;
2 |
3 | public partial class ChatMessagePage : ContentPage
4 | {
5 | public ChatMessagePage(ChatMessageViewModel viewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = viewModel;
9 | }
10 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Dorisoy.ChatApp;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Dorisoy.ChatApp;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Models/ChatUser.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatServer.Models
2 | {
3 | public class ChatUser
4 | {
5 | public string ConnectionId { get; set; }
6 | public string ChatUsername { get; set; }
7 | public DateTime ActionTime { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Controls/BorderLessEntry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Dorisoy.ChatApp.Controls
8 | {
9 | public class BorderLessEntry : Entry
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Handlers/BorderlessEditor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Dorisoy.ChatApp.Handlers
8 | {
9 | public class BorderlessEditor : Editor
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Handlers/BorderlessEntry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Dorisoy.ChatApp.Handlers
8 | {
9 | public class BorderlessEntry : Entry
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Custom/GradientHeaderNavigationPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Dorisoy.ChatApp.Custom
4 | {
5 | public class GradientHeaderNavigationPage : NavigationPage
6 | {
7 | public GradientHeaderNavigationPage(Page page) : base(page)
8 | {
9 | BarTextColor = Color.FromArgb("FFFFFF");
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.WinUI;
2 |
3 | public partial class App : MauiWinUIApplication
4 | {
5 | public App()
6 | {
7 | this.InitializeComponent();
8 | }
9 |
10 | protected override MauiApp CreateMauiApp()
11 | {
12 | return MauiProgram.CreateMauiApp();
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.ViewModel;
2 |
3 | public partial class BaseViewModel : ObservableObject
4 | {
5 | [ObservableProperty]
6 | [NotifyPropertyChangedFor(nameof(IsNotBusy))]
7 | bool isBusy;
8 |
9 | [ObservableProperty]
10 | string title;
11 |
12 | public bool IsNotBusy => !IsBusy;
13 | }
14 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Tizen/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Maui;
3 | using Microsoft.Maui.Hosting;
4 |
5 | namespace Dorisoy.ChatApp;
6 |
7 | class Program : MauiApplication
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 |
11 | static void Main(string[] args)
12 | {
13 | var app = new Program();
14 | app.Run(args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/GlobalUsings.cs:
--------------------------------------------------------------------------------
1 | global using CommunityToolkit.Mvvm.ComponentModel;
2 | global using CommunityToolkit.Mvvm.Input;
3 | global using Dorisoy.ChatApp.Models;
4 | global using Dorisoy.ChatApp.ViewModel;
5 | global using System.Collections.ObjectModel;
6 | global using System.ComponentModel;
7 | global using System.Diagnostics;
8 | global using System.Runtime.CompilerServices;
9 | global using System.Text.Json;
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 |
4 | namespace Dorisoy.ChatApp;
5 |
6 | [Application]
7 | public class MainApplication : MauiApplication
8 | {
9 | public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10 | : base(handle, ownership)
11 | {
12 | }
13 |
14 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15 | }
16 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Dorisoy.ChatApp;
5 |
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Dorisoy.ChatServer.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | http
5 |
6 |
7 | ProjectDebugger
8 |
9 |
--------------------------------------------------------------------------------
/Delete-BIN-OBJ-Folders.bat:
--------------------------------------------------------------------------------
1 | @ECHO off
2 | cls
3 |
4 | ECHO Deleting all BIN and OBJ folders...
5 | ECHO.
6 |
7 | FOR /d /r . %%d in (bin,obj) DO (
8 | IF EXIST "%%d" (
9 | ECHO %%d | FIND /I "\node_modules\" > Nul && (
10 | ECHO.Skipping: %%d
11 | ) || (
12 | ECHO.Deleting: %%d
13 | rd /s/q "%%d"
14 | )
15 | )
16 | )
17 |
18 | ECHO.
19 | ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit.
20 | pause > nul
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Dorisoy.ChatApp;
5 |
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Models/User.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Dorisoy.ChatApp.Models
3 | {
4 | public class User
5 | {
6 | public string Id { get; set; }
7 | public string Username { get; set; }
8 | public string Password { get; set; }
9 | public string Location { get; set; }
10 | public string ProfilePhoto { get; set; }
11 | public string Name { get; set; }
12 | public string Address { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Index.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model IndexModel
3 | @{
4 | ViewData["Title"] = "Dorisoy.Chat Client";
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace Dorisoy.ChatApp;
6 |
7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8 | public class MainActivity : MauiAppCompatActivity
9 | {
10 | }
11 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Index.cshtml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using Microsoft.AspNetCore.Mvc.RazorPages;
3 |
4 | namespace Dorisoy.ChatServer.Pages
5 | {
6 | public class IndexModel : PageModel
7 | {
8 | private readonly ILogger _logger;
9 |
10 | public IndexModel(ILogger logger)
11 | {
12 | _logger = logger;
13 | }
14 |
15 | public void OnGet()
16 | {
17 |
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Privacy.cshtml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using Microsoft.AspNetCore.Mvc.RazorPages;
3 |
4 | namespace WebApplication2.Pages
5 | {
6 | public class PrivacyModel : PageModel
7 | {
8 | private readonly ILogger _logger;
9 |
10 | public PrivacyModel(ILogger logger)
11 | {
12 | _logger = logger;
13 | }
14 |
15 | public void OnGet()
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Dorisoy.ChatServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Models/Login.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Models
2 | {
3 | public class Login
4 | {
5 | public string Username { get; set; }
6 | public string Password { get; set; }
7 | public string ReturnUrl { get; set; }
8 | public bool RememberMe { get; set; }
9 | }
10 |
11 | public class LoginReturn
12 | {
13 | public string returnUrl { get; set; }
14 | public string userId { get; set; }
15 | public string chatUserName { get; set; }
16 | public bool isSuccess { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Converters/InverseBoolConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 |
4 | namespace Dorisoy.ChatApp.Converters
5 | {
6 | public class InverseBoolConverter : IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
9 | {
10 | return !(bool)value;
11 | }
12 |
13 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | return !(bool)value;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Controls/GradientButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Dorisoy.ChatApp.Controls
6 | {
7 | public class GradientButton : Button
8 | {
9 | public enum GradientOrientation
10 | {
11 | Vertical,
12 | Horizontal
13 | }
14 |
15 | public Color StartColor
16 | {
17 | get; set;
18 | }
19 |
20 | public Color EndColor
21 | {
22 | get; set;
23 | }
24 |
25 | public GradientOrientation GradientColorOrientation
26 | {
27 | get; set;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Hubs/HubHelper.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatServer.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Collections.ObjectModel;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 |
8 | namespace Dorisoy.ChatServer.Hubs
9 | {
10 | public static class HubHelper
11 | {
12 | private static List _chatUserList = new List();
13 | public static List ChatUserList
14 | {
15 | get
16 | {
17 | return _chatUserList;
18 | }
19 | set
20 | {
21 | _chatUserList = value;
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 | @RenderBody()
16 |
17 |
18 |
19 |
20 | @await RenderSectionAsync("Scripts", required: false)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Raw/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories). Deployment of the asset to your application
3 | is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
4 |
5 |
6 |
7 | These files will be deployed with you package and will be accessible using Essentials:
8 |
9 | async Task LoadMauiAsset()
10 | {
11 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
12 | using var reader = new StreamReader(stream);
13 |
14 | var contents = reader.ReadToEnd();
15 | }
16 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Helpers/Utils.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Helpers;
2 |
3 | public static class Utils
4 | {
5 | public static string GetUserId(string chatUsername)
6 | {
7 | string[] datas = chatUsername.Split('_');
8 | foreach (string data in datas)
9 | {
10 | return data;
11 | }
12 |
13 | return null;
14 | }
15 |
16 | public static string GetName(string chatUsername)
17 | {
18 | int count = 1;
19 | string[] datas = chatUsername.Split('_');
20 | foreach (string data in datas)
21 | {
22 | if (count == 4)
23 | {
24 | return data;
25 | }
26 |
27 | count++;
28 | }
29 |
30 | return null;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Models/FontIconGroupModel.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Models;
2 |
3 | public class FontIconGroupModel : List
4 | {
5 | public string GroupName { get; set; }
6 | public List IconList { get; set; }
7 | public FontIconGroupModel(string groupName, List iconList) : base(iconList)
8 | {
9 | GroupName = groupName;
10 | IconList = iconList;
11 | }
12 |
13 | public override string ToString()
14 | {
15 | return GroupName;
16 | }
17 | }
18 |
19 | public class FontIconModel
20 | {
21 | public string Type { get; set; }
22 | public string Name { get; set; }
23 | public string Value { get; set; }
24 |
25 | public override string ToString()
26 | {
27 | return Name;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Tizen/tizen-manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | maui-application-title-placeholder
6 | maui-appicon-placeholder
7 |
8 |
9 |
10 |
11 | http://tizen.org/privilege/internet
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Error.cshtml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using Microsoft.AspNetCore.Mvc.RazorPages;
3 | using System.Diagnostics;
4 |
5 | namespace WebApplication2.Pages
6 | {
7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8 | [IgnoreAntiforgeryToken]
9 | public class ErrorModel : PageModel
10 | {
11 | public string? RequestId { get; set; }
12 |
13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14 |
15 | private readonly ILogger _logger;
16 |
17 | public ErrorModel(ILogger logger)
18 | {
19 | _logger = logger;
20 | }
21 |
22 | public void OnGet()
23 | {
24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Converters/OnlineStatusColorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Dorisoy.ChatApp.Converters
4 | {
5 | public class OnlineStatusColorConverter : IValueConverter
6 | {
7 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
8 | {
9 | switch (value.ToString().ToLower())
10 | {
11 | case "true":
12 | return Color.FromArgb("5cb26e");
13 | case "false":
14 | return Color.FromArgb("808080");
15 | }
16 |
17 | return Color.FromArgb("808080");
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Program.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatServer.Hubs;
2 |
3 | var builder = WebApplication.CreateBuilder(args);
4 |
5 | // Add services to the container.
6 | builder.Services.AddRazorPages();
7 | builder.Services.AddSignalR();
8 |
9 | var app = builder.Build();
10 |
11 | // Configure the HTTP request pipeline.
12 | if (!app.Environment.IsDevelopment())
13 | {
14 | app.UseExceptionHandler("/Error");
15 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
16 | app.UseHsts();
17 | }
18 |
19 | //app.UseHttpsRedirection();
20 | app.UseStaticFiles();
21 |
22 | app.UseRouting();
23 |
24 | app.UseAuthorization();
25 |
26 | app.MapRazorPages();
27 |
28 | app.MapControllerRoute(
29 | name: "default",
30 | pattern: "{controller=Home}/{action=Index}/{id?}");
31 |
32 | app.MapHub("/chatHub");
33 |
34 | app.Run();
35 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/AppShell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
18 |
19 |
23 |
24 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Error.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model ErrorModel
3 | @{
4 | ViewData["Title"] = "Error";
5 | }
6 |
7 | Error.
8 | An error occurred while processing your request.
9 |
10 | @if (Model.ShowRequestId)
11 | {
12 |
13 | Request ID: @Model.RequestId
14 |
15 | }
16 |
17 | Development Mode
18 |
19 | Swapping to the Development environment displays detailed information about the error that occurred.
20 |
21 |
22 | The Development environment shouldn't be enabled for deployed applications.
23 | It can result in displaying sensitive information from exceptions to end users.
24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
25 | and restarting the app.
26 |
27 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Models/ChatModels.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Dorisoy.ChatApp.Models
4 | {
5 | public class ChatMessage
6 | {
7 | public string ConnectionId { get; set; }
8 | public string Message { get; set; }
9 | public string MyPhoto { get; set; }
10 | public string PairPhoto { get; set; }
11 | public bool IsOwnMessage { get; set; }
12 | public bool IsSystemMessage { get; set; }
13 | public string ActionTime { get; set; }
14 |
15 | }
16 |
17 | public class ChatUser
18 | {
19 | public string ConnectionId { get; set; }
20 | public string ChatUsername { get; set; }
21 | public string UserId { get; set; }
22 | public string Username { get; set; }
23 | public string Name { get; set; }
24 | public string Location { get; set; }
25 | public string PhotoPath { get; set; }
26 | public bool IsOnline { get; set; }
27 | public DateTime ActionTime { get; set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Icons.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
23 |
24 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/RegisterViewModel.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Dorisoy.ChatApp.ViewModel;
3 |
4 | public partial class RegisterViewModel : BaseViewModel
5 | {
6 | public RegisterViewModel()
7 | {
8 | user = new User();
9 | }
10 |
11 | [ObservableProperty]
12 | User user;
13 |
14 | [RelayCommand]
15 | private void Login()
16 | {
17 | AppShell.Current.GoToAsync("//LoginPage");
18 | }
19 |
20 | [RelayCommand]
21 | private void Signup()
22 | {
23 | if (String.IsNullOrEmpty(User.Name))
24 | {
25 | Shell.Current.DisplayAlert("Alert!", "Please enter name!", "OK");
26 | }
27 |
28 | Preferences.Set("Name", User.Name);
29 | Preferences.Set("Location", User.Address);
30 | Preferences.Set("Username", User.Username);
31 | Preferences.Set("Password", User.Password);
32 | Preferences.Set("ProfilePhoto", "m1.png"); // Replace with your photo
33 |
34 | AppShell.Current.GoToAsync("//LoginPage");
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UIRequiredDeviceCapabilities
11 |
12 | arm64
13 |
14 | UISupportedInterfaceOrientations
15 |
16 | UIInterfaceOrientationPortrait
17 | UIInterfaceOrientationLandscapeLeft
18 | UIInterfaceOrientationLandscapeRight
19 |
20 | UISupportedInterfaceOrientations~ipad
21 |
22 | UIInterfaceOrientationPortrait
23 | UIInterfaceOrientationPortraitUpsideDown
24 | UIInterfaceOrientationLandscapeLeft
25 | UIInterfaceOrientationLandscapeRight
26 |
27 | XSAppIconAssets
28 | Assets.xcassets/appicon.appiconset
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Pages/Shared/_Layout.cshtml.css:
--------------------------------------------------------------------------------
1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
2 | for details on configuring this project to bundle and minify static web assets. */
3 |
4 | a.navbar-brand {
5 | white-space: normal;
6 | text-align: center;
7 | word-break: break-all;
8 | }
9 |
10 | a {
11 | color: #0077cc;
12 | }
13 |
14 | .btn-primary {
15 | color: #fff;
16 | background-color: #1b6ec2;
17 | border-color: #1861ac;
18 | }
19 |
20 | .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
21 | color: #fff;
22 | background-color: #1b6ec2;
23 | border-color: #1861ac;
24 | }
25 |
26 | .border-top {
27 | border-top: 1px solid #e5e5e5;
28 | }
29 | .border-bottom {
30 | border-bottom: 1px solid #e5e5e5;
31 | }
32 |
33 | .box-shadow {
34 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
35 | }
36 |
37 | button.accept-policy {
38 | font-size: 1rem;
39 | line-height: inherit;
40 | }
41 |
42 | .footer {
43 | position: absolute;
44 | bottom: 0;
45 | width: 100%;
46 | white-space: nowrap;
47 | line-height: 60px;
48 | }
49 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:20851",
7 | "sslPort": 44342
8 | }
9 | },
10 | "profiles": {
11 | "http": {
12 | "commandName": "Project",
13 | "dotnetRunMessages": true,
14 | "launchBrowser": true,
15 | "applicationUrl": "http://192.168.0.3:5067",
16 | "environmentVariables": {
17 | "ASPNETCORE_ENVIRONMENT": "Development"
18 | }
19 | },
20 | "https": {
21 | "commandName": "Project",
22 | "dotnetRunMessages": true,
23 | "launchBrowser": true,
24 | "applicationUrl": "https://localhost:7268;http://localhost:5067",
25 | "environmentVariables": {
26 | "ASPNETCORE_ENVIRONMENT": "Development"
27 | }
28 | },
29 | "IIS Express": {
30 | "commandName": "IISExpress",
31 | "launchBrowser": true,
32 | "environmentVariables": {
33 | "ASPNETCORE_ENVIRONMENT": "Development"
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/FontIcons/FontIconsPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using Dorisoy.ChatApp.ViewModels.FontIcons;
3 | using System.Collections.ObjectModel;
4 |
5 | namespace Dorisoy.ChatApp.Views;
6 |
7 | public partial class FontIconsPage : ContentPage
8 | {
9 | public FontIconsPage()
10 | {
11 | InitializeComponent();
12 | BindingContext = new FontIconsViewModel();
13 | }
14 |
15 | void Handle_TextChanged(object sender, TextChangedEventArgs e)
16 | {
17 | var _container = BindingContext as FontIconsViewModel;
18 | iconsListView.BeginRefresh();
19 |
20 | if (string.IsNullOrWhiteSpace(e.NewTextValue))
21 | iconsListView.ItemsSource = _container.FontIconGroup;
22 | else
23 | iconsListView.ItemsSource = _container.FontIconGroup.Select(x =>
24 | new FontIconGroupModel
25 | (
26 | x.GroupName,
27 | x.Where(y => y.Name.IndexOf(e.NewTextValue, StringComparison.CurrentCultureIgnoreCase) >= 0).ToList()
28 | )
29 | ).ToList();
30 |
31 | iconsListView.EndRefresh();
32 | }
33 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSRequiresIPhoneOS
6 |
7 | UIDeviceFamily
8 |
9 | 1
10 | 2
11 |
12 | UIRequiredDeviceCapabilities
13 |
14 | arm64
15 |
16 | UISupportedInterfaceOrientations
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationLandscapeLeft
20 | UIInterfaceOrientationLandscapeRight
21 |
22 | UISupportedInterfaceOrientations~ipad
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationPortraitUpsideDown
26 | UIInterfaceOrientationLandscapeLeft
27 | UIInterfaceOrientationLandscapeRight
28 |
29 | XSAppIconAssets
30 | Assets.xcassets/appicon.appiconset
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Maui;
2 | using Microsoft.Extensions.Logging;
3 |
4 | namespace Dorisoy.ChatApp;
5 |
6 | public static class MauiProgram
7 | {
8 | public static MauiApp CreateMauiApp()
9 | {
10 | var builder = MauiApp.CreateBuilder();
11 |
12 | builder.UseMauiApp()
13 | .UseMauiCommunityToolkit()
14 | .ConfigureFonts(fonts =>
15 | {
16 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
17 | fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
18 | });
19 |
20 | #if DEBUG
21 | builder.Logging.AddDebug();
22 | #endif
23 |
24 | builder.Services.AddSingleton();
25 | builder.Services.AddSingleton();
26 |
27 | builder.Services.AddSingleton();
28 | builder.Services.AddSingleton();
29 |
30 | builder.Services.AddSingleton();
31 | builder.Services.AddSingleton();
32 |
33 | builder.Services.AddSingleton();
34 | builder.Services.AddSingleton();
35 |
36 | return builder.Build();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
18 | true/PM
19 | PerMonitorV2, PerMonitor
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Helpers/ChatHelper.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.SignalR.Client;
2 |
3 | namespace Dorisoy.ChatApp.Helpers;
4 |
5 | public static class ChatHelper
6 | {
7 | public static HubConnection hubConnection;
8 |
9 | public static bool IsConnected { get; set; }
10 |
11 | public static HubConnection GetInstanse(string chatUsername)
12 | {
13 | if (hubConnection == null || hubConnection.State == HubConnectionState.Disconnected)
14 | {
15 | hubConnection = new HubConnectionBuilder()
16 | .WithUrl("http://192.168.0.3:5067/chatHub?chatUsername=" + chatUsername)
17 | .Build();
18 | }
19 |
20 | return hubConnection;
21 | }
22 |
23 | public static async Task Connect(string chatUsername = null)
24 | {
25 | if (IsConnected)
26 | {
27 | return;
28 | }
29 |
30 | try
31 | {
32 | await GetInstanse(chatUsername).StartAsync();
33 | IsConnected = true;
34 | }
35 | catch (Exception ex)
36 | {
37 |
38 | }
39 | }
40 |
41 | public static async Task Disconnect(string chatUsername = null)
42 | {
43 | if (!IsConnected)
44 | {
45 | return;
46 | }
47 |
48 | try
49 | {
50 | await GetInstanse(chatUsername).StopAsync();
51 | IsConnected = false;
52 | }
53 | catch (Exception ex)
54 | {
55 |
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatApp.Controls;
2 |
3 | #if ANDROID
4 | using Microsoft.Maui.Controls.Compatibility.Platform.Android;
5 | #endif
6 |
7 | namespace Dorisoy.ChatApp;
8 |
9 | public partial class App : Application
10 | {
11 | public App()
12 | {
13 | InitializeComponent();
14 |
15 | Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", static (h, v) =>
16 | {
17 | #if ANDROID
18 | h.PlatformView.BackgroundTintList =
19 | Android.Content.Res.ColorStateList.ValueOf(Android.Graphics.Color.Transparent);
20 | #endif
21 | });
22 |
23 |
24 | #if WINDOWS
25 | Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderlineWindows", (h, v) =>
26 | {
27 | h.PlatformView.BorderThickness = new Microsoft.UI.Xaml.Thickness()
28 | {
29 | Bottom = 0,
30 | Top = 0,
31 | Left = 0,
32 | Right = 0,
33 | };
34 | });
35 | #endif
36 |
37 | Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping(nameof(BorderLessEntry), (handler, value) =>
38 | {
39 |
40 | #if __ANDROID__
41 | handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent);
42 | #elif __IOS__
43 | handler.PlatformView.BackgroundColor = UIKit.UIColor.Clear;
44 | handler.PlatformView.BorderStyle = UIKit.UITextBorderStyle.None;
45 | #endif
46 | });
47 |
48 |
49 | MainPage = new AppShell();
50 |
51 |
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/LoginViewModel.cs:
--------------------------------------------------------------------------------
1 |
2 | using Dorisoy.ChatApp.Helpers;
3 |
4 | namespace Dorisoy.ChatApp.ViewModel;
5 |
6 | public partial class LoginViewModel : BaseViewModel
7 | {
8 | public LoginViewModel()
9 | {
10 | user = new User()
11 | {
12 | Username = "Dorisoy",
13 | Password = "Dorisoy"
14 | };
15 | }
16 |
17 | [ObservableProperty]
18 | User user;
19 |
20 | [RelayCommand]
21 | private async void Login()
22 | {
23 | var username = Preferences.Get("Username", "Dorisoy");
24 | var password = Preferences.Get("Password", "Dorisoy");
25 | var name = Preferences.Get("Name", "Dorisoy");
26 | var location = Preferences.Get("Location", "China");
27 | string imageName = Preferences.Get("ProfilePhoto", "");
28 |
29 | if (User.Username != username || User.Password != password)
30 | {
31 | await Shell.Current.DisplayAlert("Alert!", "Invalid username or password!", "OK");
32 | }
33 | else
34 | {
35 | // Connect to chat hub
36 | string chatUsername = User.Username + "_" + name + "_" + imageName + "_" + location;
37 | await ChatHelper.Connect(chatUsername);
38 |
39 | // Save to local storage
40 | Preferences.Set("ChatUserName", chatUsername);
41 |
42 | // Navigate to chat user list page
43 | await AppShell.Current.GoToAsync("//ChatListPage");
44 | }
45 | }
46 |
47 | [RelayCommand]
48 | private void Register()
49 | {
50 | AppShell.Current.GoToAsync("//RegisterPage");
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Selectors/FontIconsTemplateSelector.cs:
--------------------------------------------------------------------------------
1 | namespace Dorisoy.ChatApp.Selectors;
2 |
3 | public class FontIconsTemplateSelector : DataTemplateSelector
4 | {
5 | public DataTemplate Dorisoy { get; set; }
6 | public DataTemplate FaBrands { get; set; }
7 | public DataTemplate FaPro { get; set; }
8 | public DataTemplate FaRegular { get; set; }
9 | public DataTemplate LineAwesome { get; set; }
10 | public DataTemplate IonIcons { get; set; }
11 | public DataTemplate MaterialDesign { get; set; }
12 |
13 |
14 | protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
15 | {
16 | if (((FontIconModel)item).Type.Contains("Dorisoy"))
17 | {
18 | return Dorisoy;
19 | }
20 |
21 | if (((FontIconModel)item).Type.Contains("Brands"))
22 | {
23 | return FaBrands;
24 | }
25 |
26 | if (((FontIconModel)item).Type.Contains("Pro"))
27 | {
28 | return FaPro;
29 | }
30 |
31 | if (((FontIconModel)item).Type.Contains("Regular"))
32 | {
33 | return FaRegular;
34 | }
35 |
36 | if (((FontIconModel)item).Type.Contains("Line Awesome"))
37 | {
38 | return LineAwesome;
39 | }
40 |
41 | if (((FontIconModel)item).Type.Contains("IonIcons"))
42 | {
43 | return IonIcons;
44 | }
45 |
46 | if (((FontIconModel)item).Type.Contains("Material Designs"))
47 | {
48 | return MaterialDesign;
49 | }
50 |
51 | //return ((FontIconModel)item).Type.Contains("Brands") ? FaBrands : FaPro;
52 | return null;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Dorisoy.ChatApp
2 |
3 | 基于 .NET MAUI 开发的完整聊天应用程序。它遵循 MVVM 模式。该项目包括使用 SignalR 的 C# 服务器端 chathub 实现。您可以轻松地将此代码集成到现有或新项目中。
4 |
5 | ## 解决方案包含两个项目:
6 |
7 | ChatServer(.NET SignalR 聊天中心服务器)
8 | ChatApp(.NET MAUI 项目)
9 |
10 |
11 | ## 如何运行应用程序
12 |
13 | 步骤 1: 从 Visual Studio 运行“ChatServer”项目(它是一个 SignalR 聊天中心服务器)并获取服务器的 IP 地址。
14 |
15 | 步骤 2: 在项目 ChatApp/Helpers/ChatHelper.cs 文件下名为“GetInstance”的函数中设置 IP 地址
16 |
17 | 注意:如果您在本地主机中运行“ChatServer”,则可以通过 conveyor 插件获取 ip。[https://keyoti.com/products/conveyor/index.html] 安装此 visual studio 插件。然后运行“ChatServer”项目。现在单击 conveyor 提供的 IP 地址。
18 |
19 | ## 应用程序包包含:
20 |
21 | 适用于 Android、iOS 和 Windows 的 .NET MAUI 应用程序
22 |
23 | 采用 MVVM 模式构建
24 |
25 | 使用 SignalR 的服务器端实现
26 |
27 | 定义良好的 xaml 和 c# 代码
28 |
29 | 漂亮的 UI 设计
30 |
31 | 注册页面
32 |
33 | 登录页面
34 |
35 | 聊天用户列表页面
36 |
37 | 消息页面
38 |
39 | 打字指示器
40 |
41 | 在线/离线状态
42 |
43 | 完整的源代码
44 |
45 |
46 | ## 要求:
47 |
48 | Visual Studio 2022
49 |
50 | .NET >= 6
51 |
52 | ## 快速入门:
53 |
54 | ### Visual Studio 解决方案包含两个项目:
55 |
56 | 聊天应用程序
57 | 聊天服务器
58 |
59 | ### ChatApp项目实现了所有客户端功能:
60 |
61 | #### 登录页面
62 |
63 | 在验证用户身份后,您必须调用ChatHub 服务器的 Connect函数,然后重定向到 ChatList 页面。
64 |
65 | #### 聊天列表页面
66 |
67 | 在此页面上,您必须从 ChatServer 调用已连接用户列表。获取已连接用户列表后,您必须将其呈现到列表视图中。要发起聊天,您必须点击该项目以导航聊天页面。
68 |
69 | #### 聊天页面
70 |
71 | #### 您可以在此处向已连接的用户发送消息。此处实现了两个重要功能。
72 |
73 | . 调用“ReceiveMessage”从对方获取消息。收到消息后,您必须以良好的方式呈现到列表视图。
74 | . 调用“SendMessage”将消息发送给您的聊天用户。此处您必须传递必要的参数,如连接 ID、用户 ID、消息等。
75 |
76 | #### ChatServer项目包含ChatHub.cs文件,其中实现了以下服务器端功能:
77 |
78 | 发送消息:在这个函数中,你可以发送消息给其他人。你必须传递接收用户ID和消息。
79 |
80 | 打字:此函数返回聊天用户的输入指示。这里您必须传递连接 ID 和您的姓名。
81 |
82 | 连接异步:当两个用户之间建立连接时,将调用此函数。在这里,您可以根据需要添加自定义实现。
83 |
84 | 断开连接时异步:当两个用户之间的连接断开时,将调用此函数。在这里,您可以根据需要添加自定义实现。
85 |
86 | 获取已连接用户:在此功能中您可以获取所有已连接的用户。
87 |
88 | 断开:要断开会话,您可以调用此函数。
89 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/splash.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Splash/splash.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/AppIcon/appiconfg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31611.283
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dorisoy.ChatApp", "Dorisoy.ChatApp\Dorisoy.ChatApp.csproj", "{7304321A-5550-4FC2-B91A-28C2536201F3}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dorisoy.ChatServer", "Dorisoy.ChatServer\Dorisoy.ChatServer.csproj", "{61A774CE-C449-4D14-8191-8A87C78C7EFE}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
19 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Release|Any CPU.Build.0 = Release|Any CPU
21 | {7304321A-5550-4FC2-B91A-28C2536201F3}.Release|Any CPU.Deploy.0 = Release|Any CPU
22 | {61A774CE-C449-4D14-8191-8A87C78C7EFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {61A774CE-C449-4D14-8191-8A87C78C7EFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {61A774CE-C449-4D14-8191-8A87C78C7EFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {61A774CE-C449-4D14-8191-8A87C78C7EFE}.Release|Any CPU.Build.0 = Release|Any CPU
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | GlobalSection(ExtensibilityGlobals) = postSolution
31 | SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
32 | EndGlobalSection
33 | EndGlobal
34 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Platforms/Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | $placeholder$
15 | User Name
16 | $placeholder$.png
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | #512BD4
8 | #DFD8F7
9 | #2B0B98
10 | White
11 | Black
12 | #E1E1E1
13 | #C8C8C8
14 | #ACACAC
15 | #919191
16 | #6E6E6E
17 | #404040
18 | #212121
19 | #141414
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | #F7B548
35 | #FFD590
36 | #FFE5B9
37 | #28C2D1
38 | #7BDDEF
39 | #C3F2F4
40 | #3E8EED
41 | #72ACF1
42 | #A7CBF6
43 |
44 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Dorisoy.ChatApp.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | False
5 | net8.0-windows10.0.22621.0
6 | Sony XQ-BC72 (Android 13.0 - API 33)
7 | PhysicalDevice
8 | pixel_5_-_api_25
9 |
10 |
11 | ProjectDebugger
12 |
13 |
14 | ProjectDebugger
15 |
16 |
17 | ios-arm64
18 | arm64
19 |
20 |
21 | ProjectDebugger
22 |
23 |
24 |
25 | Designer
26 |
27 |
28 | Designer
29 |
30 |
31 | Designer
32 |
33 |
34 | Designer
35 |
36 |
37 | Designer
38 |
39 |
40 | Designer
41 |
42 |
43 | Designer
44 |
45 |
46 | Designer
47 |
48 |
49 | Designer
50 |
51 |
52 | Designer
53 |
54 |
55 |
56 |
57 | Designer
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Dorisoy.ChatServer/Hubs/ChatHub.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatServer.Models;
2 | using Microsoft.AspNetCore.SignalR;
3 |
4 | namespace Dorisoy.ChatServer.Hubs
5 | {
6 | public class ChatHub : Hub
7 | {
8 | public void SendMessage(string connectionId,
9 | string userId,
10 | string name,
11 | string photo,
12 | string message)
13 | {
14 | string unniqueId = Guid.NewGuid().ToString();
15 |
16 | Clients.Client(connectionId).SendAsync("ReceiveMessage", Context.ConnectionId, userId, name, photo, message, unniqueId, false);
17 |
18 | Clients.Caller.SendAsync("ReceiveMessage", connectionId, "", "", "", message, unniqueId, true);
19 | }
20 |
21 | public Task Typing(string connectionId, string name)
22 | {
23 | return Clients.Client(connectionId).SendAsync("TypingMessage", connectionId, name);
24 | }
25 |
26 | public void Disconnect()
27 | {
28 | Context.Abort();
29 | }
30 |
31 | public override async Task OnConnectedAsync()
32 | {
33 | await base.OnConnectedAsync();
34 |
35 | var chatUsername = Context.GetHttpContext().Request.Query["chatUsername"];
36 | if (!String.IsNullOrEmpty(chatUsername))
37 | {
38 | // Remove the user if already exists in the list
39 | HubHelper.ChatUserList.RemoveAll(x => x.ChatUsername == chatUsername);
40 |
41 | // Add the user
42 | HubHelper.ChatUserList.Add(new ChatUser { ConnectionId = Context.ConnectionId, ChatUsername = chatUsername, ActionTime = DateTime.Now });
43 |
44 | await Clients.All.SendAsync("UserConnected", Context.ConnectionId, HubHelper.ChatUserList);
45 | }
46 | }
47 |
48 | public override async Task OnDisconnectedAsync(Exception ex)
49 | {
50 | var connectionId = Context.ConnectionId;
51 |
52 | var item = HubHelper.ChatUserList.FirstOrDefault(x => x.ConnectionId == Context.ConnectionId);
53 | if (item != null)
54 | {
55 | HubHelper.ChatUserList.Remove(item);
56 | await Clients.All.SendAsync("UserDisconnected", connectionId, HubHelper.ChatUserList);
57 | }
58 |
59 | await base.OnDisconnectedAsync(ex);
60 | }
61 |
62 | public Task GetConnectedUsers()
63 | {
64 | return Clients.Caller.SendAsync("ChatUserList", HubHelper.ChatUserList);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 | #2F72E4
11 | #523ee8
12 | #06846A
13 | #F54E5E
14 | #D54008
15 |
16 | #E1E1E1
17 | #C8C8C8
18 | #ACACAC
19 | #919191
20 | #6E6E6E
21 | #404040
22 | #313131
23 | #212121
24 | #141414
25 |
26 | #F7B548
27 | #FFD590
28 | #FFE5B9
29 | #28C2D1
30 | #7BDDEF
31 | #C3F2F4
32 | #2566dc
33 | #2566dc
34 | #2566dc
35 |
36 | #0061B5
37 | #17D4FF
38 | #ff844a
39 | #1152A7
40 | #30377DFF
41 | #1A377DFF
42 | #d0d7de
43 |
44 | #af4aff
45 | #3e5aff
46 | #713d74
47 | #221e60
48 | #55acee
49 | #30FF392B
50 | #FF392B
51 | #4267B2
52 | #35c659
53 | #3b5998
54 | Transparent
55 | #567cd7
56 | #788396
57 | #fcbc0f
58 | #c04848
59 | #480048
60 | #3010CA87
61 | #FF10CA87
62 | #d483fc
63 | #5d4cf7
64 | #3cdeff
65 | #bdff27
66 | #373668
67 | #24243b
68 | #d54381
69 | #7644ad
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/FontIcons/FontIconsViewModel.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatApp.Views;
2 |
3 |
4 | namespace Dorisoy.ChatApp.ViewModels.FontIcons;
5 |
6 | public class FontIconsViewModel : BaseViewModel
7 | {
8 | public int TotalIcon { get; private set; }
9 | public int TotalFont { get; private set; }
10 |
11 | public ObservableCollection _fontIconGroup;
12 | public ObservableCollection FontIconGroup
13 | {
14 | get { return _fontIconGroup; }
15 | set
16 | {
17 | _fontIconGroup = value;
18 | OnPropertyChanged("FontIconGroup");
19 | }
20 | }
21 | public FontIconsViewModel()
22 | {
23 | CreateIconCollection();
24 | }
25 |
26 | void CreateIconCollection()
27 | {
28 | _fontIconGroup = new ObservableCollection
29 | {
30 | new FontIconGroupModel( "Dorisoy Icons", (List)mauiKit) ,
31 | new FontIconGroupModel( "IonIcons", (List)ionIcons ),
32 | new FontIconGroupModel( "Font Awesome Pro", (List)faPro ),
33 | new FontIconGroupModel( "Font Awesome Brands", (List)faBrands ),
34 | new FontIconGroupModel( "Font Awesome Regular", (List)faRegular ),
35 | new FontIconGroupModel( "Line Awesome", (List)lineAwesome ),
36 | new FontIconGroupModel( "Material Designs", (List)materialDesign )
37 | };
38 |
39 | var iconCollection = new ObservableCollection();
40 | foreach (var icon in _fontIconGroup)
41 | {
42 | iconCollection.Add(icon);
43 | TotalIcon += icon.Count();
44 | }
45 |
46 | FontIconGroup = iconCollection;
47 | TotalFont = FontIconGroup.Count();
48 | }
49 |
50 | public readonly IList mauiKit =
51 | typeof(MauiKitIcons).GetFields()
52 | .Select(x => new FontIconModel
53 | {
54 | Type = "Dorisoy Icons",
55 | Name = x.Name,
56 | Value = x.GetValue(null).ToString()
57 | })
58 | .ToList();
59 |
60 | public readonly IList faBrands =
61 | (List)typeof(FaBrands)
62 | .GetFields()
63 | .Select(x => new FontIconModel
64 | {
65 | Type = "Font Awesome Brands",
66 | Name = x.Name,
67 | Value = x.GetValue(null).ToString()
68 | })
69 | .ToList();
70 |
71 | public readonly IList faPro =
72 | typeof(FaPro)
73 | .GetFields()
74 | .Select(x => new FontIconModel
75 | {
76 | Type = "Font Awesome Pro",
77 | Name = x.Name,
78 | Value = x.GetValue(null).ToString()
79 | })
80 | .ToList();
81 |
82 | public readonly IList faRegular =
83 | typeof(FaRegular)
84 | .GetFields()
85 | .Select(x => new FontIconModel
86 | {
87 | Type = "Font Awesome Regular",
88 | Name = x.Name,
89 | Value = x.GetValue(null).ToString()
90 | })
91 | .ToList();
92 |
93 | public readonly IList lineAwesome =
94 | typeof(LineAwesome).GetFields()
95 | .Select(x => new FontIconModel
96 | {
97 | Type = "Line Awesome",
98 | Name = x.Name,
99 | Value = x.GetValue(null).ToString()
100 | })
101 | .ToList();
102 |
103 | public readonly IList ionIcons =
104 | typeof(IonIcons).GetFields()
105 | .Select(x => new FontIconModel
106 | {
107 | Type = "IonIcons",
108 | Name = x.Name,
109 | Value = x.GetValue(null).ToString()
110 | })
111 | .ToList();
112 |
113 | public readonly IList materialDesign =
114 | typeof(MaterialDesignIcons).GetFields()
115 | .Select(x => new FontIconModel
116 | {
117 | Type = "Material Designs",
118 | Name = x.Name,
119 | Value = x.GetValue(null).ToString()
120 | })
121 | .ToList();
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Labels.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
22 |
23 |
28 |
29 |
35 |
36 |
40 |
41 |
44 |
45 |
49 |
50 |
54 |
55 |
58 |
59 |
60 |
68 |
69 |
70 |
78 |
79 |
80 |
88 |
89 |
90 |
95 |
96 |
101 |
102 |
107 |
108 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/ChatMessageViewModel.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatApp.Helpers;
2 | using Microsoft.AspNetCore.SignalR.Client;
3 |
4 | namespace Dorisoy.ChatApp.ViewModel;
5 |
6 | public partial class ChatMessageViewModel : BaseViewModel, IQueryAttributable
7 | {
8 | HubConnection hubConnection;
9 |
10 | private CancellationTokenSource tokenSource;
11 |
12 | public ObservableCollection ChatMessageList { get; set; } = new();
13 |
14 | [ObservableProperty]
15 | string sendingMessage;
16 |
17 | [ObservableProperty]
18 | string typingText;
19 |
20 | [ObservableProperty]
21 | bool showTyping;
22 |
23 | [ObservableProperty]
24 | string pairPhoto;
25 |
26 | [ObservableProperty]
27 | string pairName;
28 |
29 | public string MyUserId { get; set; }
30 | public string MyName { get; set; }
31 | public string MyPhoto { get; set; }
32 | public string PairConnectionId { get; set; }
33 | public string PairUserId { get; set; }
34 |
35 | public ChatMessageViewModel()
36 | {
37 | ChatMessageList = new ObservableCollection();
38 |
39 | string chatUserName = Preferences.Get("ChatUserName", "");
40 | this.MyUserId = Utils.GetUserId(chatUserName);
41 | this.MyName = Utils.GetName(chatUserName);
42 | this.MyPhoto = Preferences.Get("ProfilePhoto", "");
43 |
44 | hubConnection = ChatHelper.GetInstanse(chatUserName);
45 | hubConnection.Closed += async (error) =>
46 | {
47 | SendLocalMessage("---Connection closed---");
48 | ChatHelper.IsConnected = false;
49 | await Task.Delay(2000);
50 | await ChatHelper.Connect(chatUserName);
51 | };
52 |
53 | hubConnection.On>("UserDisconnected", (connectionId, chatUserList) =>
54 | {
55 | SendLocalMessage("---User disconnected---");
56 | });
57 |
58 | hubConnection.On("TypingMessage", (connectionId, name) =>
59 | {
60 | TaskCancel();
61 | this.TypingText = name + " is typing...";
62 | this.ShowTyping = true;
63 | TaskDelay();
64 | });
65 |
66 | hubConnection.On("ReceiveMessage", (pairConnectionId, pairUserId, pairName, pairPhoto, message, uniqueId, isMe) =>
67 | {
68 | if (!isMe)
69 | {
70 | this.PairConnectionId = pairConnectionId;
71 | this.PairUserId = pairUserId;
72 | this.PairName = pairName;
73 | this.PairPhoto = pairPhoto;
74 | }
75 |
76 | ChatMessageList.Add(new ChatMessage() { Message = message, IsOwnMessage = isMe, MyPhoto = this.MyPhoto, PairPhoto = this.PairPhoto, IsSystemMessage = false, ActionTime = DateTime.Now.ToString("hh:mm tt") });
77 |
78 | });
79 |
80 | }
81 |
82 | public void TaskCancel()
83 | {
84 | tokenSource?.Cancel();
85 | }
86 |
87 | public async void TaskDelay()
88 | {
89 | tokenSource = new CancellationTokenSource();
90 | try
91 | {
92 | await Task.Delay(3000, tokenSource.Token);
93 | this.ShowTyping = false;
94 | }
95 | catch (TaskCanceledException ex)
96 | {
97 | Console.WriteLine(ex.Message);
98 | }
99 | finally
100 | {
101 | if (tokenSource != null)
102 | {
103 | tokenSource.Dispose();
104 | tokenSource = null;
105 | }
106 | }
107 | }
108 |
109 | [RelayCommand]
110 | private void GoToChatList()
111 | {
112 | AppShell.Current.GoToAsync("//ChatListPage");
113 | }
114 |
115 | [RelayCommand]
116 | async private void SendMessage()
117 | {
118 | try
119 | {
120 | await hubConnection.InvokeAsync("SendMessage", this.PairConnectionId, this.MyUserId, this.MyName, this.MyPhoto, this.SendingMessage);
121 | this.SendingMessage = "";
122 | }
123 | catch (Exception ex)
124 | {
125 | SendLocalMessage($"Send failed: {ex.Message}");
126 | }
127 | }
128 |
129 | async Task Typing()
130 | {
131 | await hubConnection.InvokeAsync("Typing", this.PairConnectionId, this.MyName);
132 | }
133 |
134 | private void SendLocalMessage(string message)
135 | {
136 | //ChatMessageList.Add(new ChatMessage
137 | //{
138 | // Message = message,
139 | // IsOwnMessage = false,
140 | // IsSystemMessage = true
141 | //});
142 | }
143 |
144 | void IQueryAttributable.ApplyQueryAttributes(IDictionary query)
145 | {
146 | if (query.ContainsKey("connectionId"))
147 | {
148 | this.PairConnectionId = query["connectionId"] as string;
149 | this.PairUserId = query["userId"] as string;
150 | this.PairName = query["name"] as string;
151 | this.PairPhoto = query["photo"] as string;
152 | }
153 | }
154 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/ViewModels/ChatListViewModel.cs:
--------------------------------------------------------------------------------
1 | using Dorisoy.ChatApp.Helpers;
2 | using Microsoft.AspNetCore.SignalR.Client;
3 |
4 | namespace Dorisoy.ChatApp.ViewModel;
5 |
6 | public partial class ChatListViewModel : BaseViewModel
7 | {
8 | HubConnection hubConnection;
9 | public ObservableCollection ChatUserList { get; } = new();
10 |
11 | public ChatListViewModel()
12 | {
13 | // Hook up hubConnection
14 | string chatUserName = Preferences.Get("ChatUserName", "");
15 | hubConnection = ChatHelper.GetInstanse(chatUserName);
16 | hubConnection.On>("ChatUserList", (chatUserList) =>
17 | {
18 | RenderList(chatUserName, chatUserList);
19 | });
20 |
21 | // Load list data
22 | LoadData();
23 | }
24 |
25 |
26 | [ObservableProperty]
27 | bool isRefreshing;
28 |
29 | [ObservableProperty]
30 | string title;
31 |
32 | [RelayCommand]
33 | private void Login()
34 | {
35 | AppShell.Current.GoToAsync("//LoginPage");
36 | }
37 |
38 | [RelayCommand]
39 | private void Select(ChatUser chatUser)
40 | {
41 | AppShell.Current.GoToAsync("//ChatMessagePage?",
42 | new Dictionary
43 | {
44 | ["userId"] = chatUser.Username,
45 | ["connectionId"] = chatUser.ConnectionId,
46 | ["name"] = chatUser.Name,
47 | ["photo"] = chatUser.PhotoPath
48 | }
49 | );
50 | }
51 |
52 | async private void LoadData()
53 | {
54 | await hubConnection.InvokeAsync("GetConnectedUsers");
55 | }
56 |
57 | private void RenderList(string chatUserName, List chatUserList)
58 | {
59 | ObservableCollection formatedList = new ObservableCollection();
60 | foreach (ChatUser item in chatUserList)
61 | {
62 | if (item.ChatUsername != chatUserName) // Exclude myself in chat user list
63 | {
64 | formatedList.Add(GetFormatedChatUser(item.ConnectionId, item.ChatUsername));
65 | }
66 | }
67 |
68 | foreach (var item in formatedList)
69 | {
70 | ChatUserList.Add(item);
71 | }
72 |
73 | this.Title = "Chat Members (" + this.ChatUserList.Count.ToString() + ")";
74 | }
75 |
76 | private ChatUser GetFormatedChatUser(string connectionId, string chatUsername)
77 | {
78 | ChatUser formatedChatUser = new ChatUser();
79 |
80 | string username = String.Empty;
81 | string name = String.Empty;
82 | string location = String.Empty;
83 | string photo = String.Empty;
84 |
85 | int count = 1;
86 | string[] datas = chatUsername.Split('_');
87 | foreach (string data in datas)
88 | {
89 | switch (count)
90 | {
91 | case 1:
92 | username = data;
93 | break;
94 | case 2:
95 | name = data;
96 | break;
97 | case 3:
98 | photo = data;
99 | break;
100 | case 4:
101 | location = data;
102 | break;
103 | default:
104 | break;
105 | }
106 |
107 | count++;
108 | } // End foreach
109 |
110 | formatedChatUser.ConnectionId = connectionId;
111 | formatedChatUser.ChatUsername = username;
112 | formatedChatUser.Name = name;
113 | formatedChatUser.Location = location;
114 | formatedChatUser.PhotoPath = photo;
115 | formatedChatUser.IsOnline = true;
116 |
117 | return formatedChatUser;
118 | }
119 |
120 | //public void LoadSampleData()
121 | //{
122 | // ChatUserList.Add(new ChatUser { Name = "Danieal Gonzalez", Location = "California, United States", IsOnline = true, PhotoPath = "m2.png" });
123 | // ChatUserList.Add(new ChatUser { Name = "Meaghan Sarah", Location = "Sacramento, California", IsOnline = true, PhotoPath = "f1.png" });
124 | // ChatUserList.Add(new ChatUser { Name = "Jasper Margaret", Location = "Copenhagen, Denmark", IsOnline = true, PhotoPath = "m1.png" });
125 | // ChatUserList.Add(new ChatUser { Name = "William Russel", Location = "Houston, Texas", IsOnline = true, PhotoPath = "m3.png" });
126 | // ChatUserList.Add(new ChatUser { Name = "Amelia Sophia", Location = "Northern Ireland", IsOnline = true, PhotoPath = "f2.png" });
127 | // ChatUserList.Add(new ChatUser { Name = "Janiphar Neels", Location = "Wales, United Kingdom", IsOnline = false, PhotoPath = "f4.png" });
128 | // ChatUserList.Add(new ChatUser { Name = "Miraj Sheikh", Location = "Delli, India", IsOnline = false, PhotoPath = "m4.png" });
129 | // ChatUserList.Add(new ChatUser { Name = "Emma kidman", Location = "London, United Kingdom", IsOnline = false, PhotoPath = "f3.png" });
130 | // this.Title = "Chat Members (" + this.ChatUserList.Count.ToString() + ")";
131 | //}
132 | }
133 |
134 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | #1A73E8
10 | #1567d3
11 | #135cbc
12 | #488fed
13 | #e83f94
14 | #488fed
15 | #d54381
16 | #7644ad
17 | #FFE88F1A
18 |
19 | #7ed321
20 | #ff4a4a
21 | #ff844a
22 | #4acaff
23 | #567cd7
24 |
25 | #000000
26 | #ffffff
27 | #ffffff
28 | #ffffff
29 | #ccd2d7
30 |
31 | ic_settings_light.png
32 | ic_rtl_light.png
33 | ic_menu_light.png
34 |
35 | Transparent
36 |
37 | #FFFFFF
38 | #333942
39 | #333942
40 | #22F1F3F5
41 |
42 |
43 | 4
44 | 16
45 | 126
46 | 32
47 | 5,0
48 | #CC000000
49 | #CC000000
50 | #F1F3F5
51 | #666666
52 |
53 |
54 | #4F29BC
55 | #646ABD
56 | #FFFFFF
57 | #666666
58 |
59 |
60 | #FFFFFF
61 | #1A73E8
62 | #FFFFFF
63 | #333942
64 | #505050
65 | #7B7B7B
66 | #FFFFFF
67 |
70 |
71 | #FFFFFF
72 | #FAFAFA
73 | #eef2f5
74 |
75 |
76 | #523ee8
77 | #55000000
78 | #11ffffff
79 |
80 |
81 | #22C064
82 | #FF392B
83 | #FFC107
84 | #1274d1
85 | #BBBBBB
86 |
87 |
88 | #6233ff
89 | #FF0C69
90 | #22C064
91 | #D50000
92 | #33FFFFFF
93 |
94 |
95 | #7B7B7B
96 | #CBD6E2
97 | #F5F8Fa
98 | 1
99 |
101 |
103 |
105 |
106 |
107 |
108 | 44
109 | 22
110 |
111 |
112 | 100
113 | 14
114 | 11
115 |
116 |
117 | Transparent
118 | Transparent
119 | Transparent
120 | #333942
121 | #333942
122 |
123 |
124 | #D3D3D3
125 | #eeeeee
126 |
127 | #fcfcfd
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | 14
140 | 44
141 | 12
142 | 0
143 |
144 | 17
145 | 20
146 | 24
147 | 22
148 |
149 | 30
150 | 15
151 | 10
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/FontIcons/FaRegular.cs:
--------------------------------------------------------------------------------
1 |
2 | using Microsoft.Maui;
3 |
4 | namespace Dorisoy.ChatApp.Views
5 | {
6 | static class FaRegular
7 | {
8 | public const string AddressBook = "\uf2b9";
9 | public const string AddressCard = "\uf2bb";
10 | public const string Angry = "\uf556";
11 | public const string ArrowAltCircleDown = "\uf358";
12 | public const string ArrowAltCircleLeft = "\uf359";
13 | public const string ArrowAltCircleRight = "\uf35a";
14 | public const string ArrowAltCircleUp = "\uf35b";
15 | public const string Bell = "\uf0f3";
16 | public const string BellSlash = "\uf1f6";
17 | public const string Bookmark = "\uf02e";
18 | public const string Building = "\uf1ad";
19 | public const string Calendar = "\uf133";
20 | public const string CalendarAlt = "\uf073";
21 | public const string CalendarCheck = "\uf274";
22 | public const string CalendarMinus = "\uf272";
23 | public const string CalendarPlus = "\uf271";
24 | public const string CalendarTimes = "\uf273";
25 | public const string CaretSquareDown = "\uf150";
26 | public const string CaretSquareLeft = "\uf191";
27 | public const string CaretSquareRight = "\uf152";
28 | public const string CaretSquareUp = "\uf151";
29 | public const string ChartBar = "\uf080";
30 | public const string CheckCircle = "\uf058";
31 | public const string CheckSquare = "\uf14a";
32 | public const string Circle = "\uf111";
33 | public const string Clipboard = "\uf328";
34 | public const string Clock = "\uf017";
35 | public const string Clone = "\uf24d";
36 | public const string ClosedCaptioning = "\uf20a";
37 | public const string Comment = "\uf075";
38 | public const string CommentAlt = "\uf27a";
39 | public const string CommentDots = "\uf4ad";
40 | public const string Comments = "\uf086";
41 | public const string Compass = "\uf14e";
42 | public const string Copy = "\uf0c5";
43 | public const string Copyright = "\uf1f9";
44 | public const string CreditCard = "\uf09d";
45 | public const string Dizzy = "\uf567";
46 | public const string DotCircle = "\uf192";
47 | public const string Edit = "\uf044";
48 | public const string Envelope = "\uf0e0";
49 | public const string EnvelopeOpen = "\uf2b6";
50 | public const string Eye = "\uf06e";
51 | public const string EyeSlash = "\uf070";
52 | public const string File = "\uf15b";
53 | public const string FileAlt = "\uf15c";
54 | public const string FileArchive = "\uf1c6";
55 | public const string FileAudio = "\uf1c7";
56 | public const string FileCode = "\uf1c9";
57 | public const string FileExcel = "\uf1c3";
58 | public const string FileImage = "\uf1c5";
59 | public const string FilePdf = "\uf1c1";
60 | public const string FilePowerpoint = "\uf1c4";
61 | public const string FileVideo = "\uf1c8";
62 | public const string FileWord = "\uf1c2";
63 | public const string Flag = "\uf024";
64 | public const string Flushed = "\uf579";
65 | public const string Folder = "\uf07b";
66 | public const string FolderOpen = "\uf07c";
67 | public const string FontAwesomeLogoFull = "\uf4e6";
68 | public const string Frown = "\uf119";
69 | public const string FrownOpen = "\uf57a";
70 | public const string Futbol = "\uf1e3";
71 | public const string Gem = "\uf3a5";
72 | public const string Grimace = "\uf57f";
73 | public const string Grin = "\uf580";
74 | public const string GrinAlt = "\uf581";
75 | public const string GrinBeam = "\uf582";
76 | public const string GrinBeamSweat = "\uf583";
77 | public const string GrinHearts = "\uf584";
78 | public const string GrinSquint = "\uf585";
79 | public const string GrinSquintTears = "\uf586";
80 | public const string GrinStars = "\uf587";
81 | public const string GrinTears = "\uf588";
82 | public const string GrinTongue = "\uf589";
83 | public const string GrinTongueSquint = "\uf58a";
84 | public const string GrinTongueWink = "\uf58b";
85 | public const string GrinWink = "\uf58c";
86 | public const string HandLizard = "\uf258";
87 | public const string HandPaper = "\uf256";
88 | public const string HandPeace = "\uf25b";
89 | public const string HandPointDown = "\uf0a7";
90 | public const string HandPointLeft = "\uf0a5";
91 | public const string HandPointRight = "\uf0a4";
92 | public const string HandPointUp = "\uf0a6";
93 | public const string HandPointer = "\uf25a";
94 | public const string HandRock = "\uf255";
95 | public const string HandScissors = "\uf257";
96 | public const string HandSpock = "\uf259";
97 | public const string Handshake = "\uf2b5";
98 | public const string Hdd = "\uf0a0";
99 | public const string Heart = "\uf004";
100 | public const string Hospital = "\uf0f8";
101 | public const string Hourglass = "\uf254";
102 | public const string IdBadge = "\uf2c1";
103 | public const string IdCard = "\uf2c2";
104 | public const string Image = "\uf03e";
105 | public const string Images = "\uf302";
106 | public const string Keyboard = "\uf11c";
107 | public const string Kiss = "\uf596";
108 | public const string KissBeam = "\uf597";
109 | public const string KissWinkHeart = "\uf598";
110 | public const string Laugh = "\uf599";
111 | public const string LaughBeam = "\uf59a";
112 | public const string LaughSquint = "\uf59b";
113 | public const string LaughWink = "\uf59c";
114 | public const string Lemon = "\uf094";
115 | public const string LifeRing = "\uf1cd";
116 | public const string Lightbulb = "\uf0eb";
117 | public const string ListAlt = "\uf022";
118 | public const string Map = "\uf279";
119 | public const string Meh = "\uf11a";
120 | public const string MehBlank = "\uf5a4";
121 | public const string MehRollingEyes = "\uf5a5";
122 | public const string MinusSquare = "\uf146";
123 | public const string MoneyBillAlt = "\uf3d1";
124 | public const string Moon = "\uf186";
125 | public const string Newspaper = "\uf1ea";
126 | public const string ObjectGroup = "\uf247";
127 | public const string ObjectUngroup = "\uf248";
128 | public const string PaperPlane = "\uf1d8";
129 | public const string PauseCircle = "\uf28b";
130 | public const string PlayCircle = "\uf144";
131 | public const string PlusSquare = "\uf0fe";
132 | public const string QuestionCircle = "\uf059";
133 | public const string Registered = "\uf25d";
134 | public const string SadCry = "\uf5b3";
135 | public const string SadTear = "\uf5b4";
136 | public const string Save = "\uf0c7";
137 | public const string ShareSquare = "\uf14d";
138 | public const string Smile = "\uf118";
139 | public const string SmileBeam = "\uf5b8";
140 | public const string SmileWink = "\uf4da";
141 | public const string Snowflake = "\uf2dc";
142 | public const string Square = "\uf0c8";
143 | public const string Star = "\uf005";
144 | public const string StarHalf = "\uf089";
145 | public const string StickyNote = "\uf249";
146 | public const string StopCircle = "\uf28d";
147 | public const string Sun = "\uf185";
148 | public const string Surprise = "\uf5c2";
149 | public const string ThumbsDown = "\uf165";
150 | public const string ThumbsUp = "\uf164";
151 | public const string TimesCircle = "\uf057";
152 | public const string Tired = "\uf5c8";
153 | public const string TrashAlt = "\uf2ed";
154 | public const string User = "\uf007";
155 | public const string UserCircle = "\uf2bd";
156 | public const string WindowClose = "\uf410";
157 | public const string WindowMaximize = "\uf2d0";
158 | public const string WindowMinimize = "\uf2d1";
159 | public const string WindowRestore = "\uf2d2";
160 | }
161 | }
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/LoginPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
32 |
41 |
50 |
51 |
52 |
53 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
69 |
70 |
71 |
76 |
77 |
84 |
85 |
92 |
96 |
97 |
105 |
106 |
107 |
108 |
115 |
116 |
123 |
127 |
128 |
136 |
137 |
138 |
139 |
143 |
144 |
151 |
158 |
159 |
160 |
168 |
169 |
174 |
175 |
176 |
177 |
182 |
186 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Styles/Buttons.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
27 |
28 |
33 |
34 |
35 |
41 |
42 |
48 |
49 |
56 |
57 |
64 |
65 |
72 |
73 |
80 |
81 |
82 |
83 |
91 |
92 |
100 |
101 |
109 |
110 |
118 |
119 |
128 |
129 |
130 |
140 |
141 |
151 |
152 |
162 |
163 |
172 |
173 |
182 |
183 |
192 |
193 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Dorisoy.ChatApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0-ios;net8.0-maccatalyst;net8.0-android34.0
5 |
6 | $(TargetFrameworks);net8.0-windows10.0.22621.0
7 |
8 | Exe
9 | Dorisoy.ChatApp
10 | true
11 | true
12 | enable
13 |
14 | 10.0.22621.41
15 |
16 |
17 | Dorisoy.ChatApp
18 |
19 |
20 | com.companyname.Dorisoy.ChatApp
21 | 70e6a639-158b-40a0-854d-158c376ab076
22 |
23 |
24 | 1.0
25 | 1
26 |
27 | 11.0
28 | 13.1
29 | 21.0
30 | Dorisoy.ChatApp
31 | Dorisoy.ChatApp
32 | Dorisoy
33 |
34 |
37 |
38 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 | ChatMessagePage.xaml
172 |
173 |
174 | LoginPage.xaml
175 |
176 |
177 | RegisterPage.xaml
178 |
179 |
180 |
181 |
182 |
183 | MSBuild:Compile
184 |
185 |
186 | MSBuild:Compile
187 |
188 |
189 | MSBuild:Compile
190 |
191 |
192 | MSBuild:Compile
193 |
194 |
195 | MSBuild:Compile
196 |
197 |
198 | MSBuild:Compile
199 |
200 |
201 | MSBuild:Compile
202 |
203 |
204 | MSBuild:Compile
205 |
206 |
207 | MSBuild:Compile
208 |
209 |
210 | MSBuild:Compile
211 |
212 |
213 |
214 |
221 |
222 |
223 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/RegisterPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
31 |
40 |
49 |
50 |
51 |
52 |
59 |
60 |
65 |
66 |
72 |
73 |
80 |
84 |
85 |
93 |
94 |
95 |
96 |
103 |
104 |
111 |
115 |
116 |
124 |
125 |
126 |
127 |
134 |
135 |
142 |
146 |
147 |
155 |
156 |
157 |
158 |
165 |
166 |
173 |
177 |
178 |
186 |
187 |
188 |
189 |
197 |
198 |
203 |
204 |
205 |
206 |
211 |
215 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/ChatListPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
29 |
30 |
35 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
54 |
55 |
61 |
62 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
78 |
79 |
80 |
83 |
84 |
85 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
99 |
100 |
103 |
104 |
106 |
107 |
108 |
114 |
115 |
118 |
119 |
125 |
129 |
130 |
131 |
132 |
133 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
222 |
223 |
224 |
225 |
226 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Resources/Images/dotnet_bot.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/FontIcons/FontIconsPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
18 |
25 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
40 |
47 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
62 |
69 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
84 |
91 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
106 |
113 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
128 |
135 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
150 |
157 |
163 |
164 |
165 |
166 |
167 |
175 |
176 |
177 |
178 |
179 |
183 |
184 |
185 |
186 |
187 |
197 |
198 |
199 |
200 |
204 |
208 |
209 |
210 |
212 |
214 |
216 |
217 |
218 |
219 |
220 |
227 |
228 |
229 |
231 |
233 |
235 |
236 |
237 |
238 |
239 |
240 |
250 |
251 |
252 |
253 |
258 |
265 |
270 |
271 |
272 |
274 |
276 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
--------------------------------------------------------------------------------
/Dorisoy.ChatApp/Views/ChatMessagePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
34 |
35 |
43 |
44 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
65 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
81 |
82 |
83 |
85 |
88 |
89 |
90 |
91 |
99 |
100 |
101 |
102 |
103 |
104 |
110 |
111 |
112 |
113 |
114 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
133 |
134 |
140 |
141 |
147 |
148 |
149 |
150 |
157 |
158 |
159 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
192 |
193 |
199 |
200 |
206 |
207 |
208 |
209 |
216 |
217 |
218 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
245 |
249 |
250 |
251 |
252 |
253 |
259 |
260 |
264 |
265 |
266 |
273 |
274 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
--------------------------------------------------------------------------------