├── SECURITY.md
├── ScreenShots
├── Android
│ ├── login.png
│ ├── logind.png
│ ├── stats.png
│ ├── statsd.png
│ ├── flowhold.png
│ ├── flowoutd.png
│ ├── flowouts.png
│ ├── homepage.png
│ ├── homepaged.png
│ ├── register.png
│ ├── registerd.png
│ ├── setting1d.png
│ ├── settings1.png
│ ├── settings2.png
│ ├── settings2d.png
│ ├── flowholddetail.png
│ └── flowholddetaild.png
└── Windows
│ ├── login.png
│ ├── logind.png
│ ├── flowouts.png
│ ├── flowoutsd.png
│ ├── homepage.png
│ ├── homepaged.png
│ ├── register.png
│ ├── registerd.png
│ ├── settings.png
│ ├── settingsd.png
│ ├── flowinsights.png
│ └── flowinsightsd.png
├── FlowHub-MAUI
├── Resources
│ ├── Images
│ │ └── dotnet_bot.png
│ ├── Fonts
│ │ ├── OpenSans-Regular.ttf
│ │ └── OpenSans-Semibold.ttf
│ ├── AppIcon
│ │ ├── appicon.svg
│ │ └── appiconfg.svg
│ ├── Raw
│ │ └── AboutAssets.txt
│ ├── Splash
│ │ └── splash.svg
│ └── Styles
│ │ ├── Colors.xaml
│ │ └── Styles.xaml
├── Utilities
│ ├── TypeConverters
│ │ ├── BoolToInverse.cs
│ │ ├── CountToVisibilityConverter.cs
│ │ ├── PathToImageConverter.cs
│ │ ├── EmptyStringToMessageConverter.cs
│ │ ├── BytesArrayToImageSource.cs
│ │ ├── CollectionSizeToVisibility.cs
│ │ ├── BoolToImageConverter.cs
│ │ ├── DurationConverterFromMsToTimeSpan.cs
│ │ ├── BoolToInverseConverter.cs
│ │ ├── BytesToMegabytesConverter.cs
│ │ ├── DateTimeOffsetToLocalDateConverter.cs
│ │ └── IndexToVisibilityConverter.cs
│ ├── OtherUtils
│ │ ├── GeneralStaticUtilities.cs
│ │ └── CustomAdmin.cs
│ └── Models
│ │ ├── UserModel.cs
│ │ └── FlowModel.cs
├── FodyWeavers.xml
├── Properties
│ └── launchSettings.json
├── DataAccess
│ ├── IServices
│ │ ├── IDataBaseService.cs
│ │ └── IFlowsService.cs
│ └── Services
│ │ ├── DataBaseService.cs
│ │ └── FlowService.cs
├── Platforms
│ ├── Android
│ │ ├── Resources
│ │ │ └── values
│ │ │ │ └── colors.xml
│ │ ├── AndroidManifest.xml
│ │ ├── MainApplication.cs
│ │ └── MainActivity.cs
│ ├── iOS
│ │ ├── AppDelegate.cs
│ │ ├── Program.cs
│ │ ├── Info.plist
│ │ └── Resources
│ │ │ └── PrivacyInfo.xcprivacy
│ ├── MacCatalyst
│ │ ├── AppDelegate.cs
│ │ ├── Program.cs
│ │ ├── Entitlements.plist
│ │ └── Info.plist
│ ├── Windows
│ │ ├── App.xaml
│ │ ├── app.manifest
│ │ ├── App.xaml.cs
│ │ └── Package.appxmanifest
│ └── Tizen
│ │ ├── Main.cs
│ │ └── tizen-manifest.xml
├── AppShellMobile.xaml.cs
├── AppShell.xaml.cs
├── Views
│ ├── Desktop
│ │ ├── SettingsD.xaml.cs
│ │ ├── HomeD.xaml.cs
│ │ ├── CustomViews
│ │ │ ├── FlowHubWindow.xaml
│ │ │ └── FlowHubWindow.xaml.cs
│ │ ├── SettingsD.xaml
│ │ └── HomeD.xaml
│ └── Mobile
│ │ ├── SettingsM.xaml.cs
│ │ ├── HomeM.xaml.cs
│ │ ├── SettingsM.xaml
│ │ └── HomeM.xaml
├── MainPage.xaml.cs
├── App.xaml
├── AppShell.xaml
├── AppShellMobile.xaml
├── MainPage.xaml
├── GlobalUsings.cs
├── FlowHub-MAUI.sln
├── MauiProgram.cs
├── FlowHub-MAUI.csproj
├── App.xaml.cs
└── ViewModel
│ └── HomePageVM.cs
├── .gitattributes
├── .editorconfig
├── README.md
└── .gitignore
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ScreenShots/Android/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/login.png
--------------------------------------------------------------------------------
/ScreenShots/Android/logind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/logind.png
--------------------------------------------------------------------------------
/ScreenShots/Android/stats.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/stats.png
--------------------------------------------------------------------------------
/ScreenShots/Android/statsd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/statsd.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/login.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/logind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/logind.png
--------------------------------------------------------------------------------
/ScreenShots/Android/flowhold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/flowhold.png
--------------------------------------------------------------------------------
/ScreenShots/Android/flowoutd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/flowoutd.png
--------------------------------------------------------------------------------
/ScreenShots/Android/flowouts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/flowouts.png
--------------------------------------------------------------------------------
/ScreenShots/Android/homepage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/homepage.png
--------------------------------------------------------------------------------
/ScreenShots/Android/homepaged.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/homepaged.png
--------------------------------------------------------------------------------
/ScreenShots/Android/register.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/register.png
--------------------------------------------------------------------------------
/ScreenShots/Android/registerd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/registerd.png
--------------------------------------------------------------------------------
/ScreenShots/Android/setting1d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/setting1d.png
--------------------------------------------------------------------------------
/ScreenShots/Android/settings1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/settings1.png
--------------------------------------------------------------------------------
/ScreenShots/Android/settings2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/settings2.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/flowouts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/flowouts.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/flowoutsd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/flowoutsd.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/homepage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/homepage.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/homepaged.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/homepaged.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/register.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/register.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/registerd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/registerd.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/settings.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/settingsd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/settingsd.png
--------------------------------------------------------------------------------
/ScreenShots/Android/settings2d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/settings2d.png
--------------------------------------------------------------------------------
/ScreenShots/Android/flowholddetail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/flowholddetail.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/flowinsights.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/flowinsights.png
--------------------------------------------------------------------------------
/ScreenShots/Windows/flowinsightsd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Windows/flowinsightsd.png
--------------------------------------------------------------------------------
/ScreenShots/Android/flowholddetaild.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/ScreenShots/Android/flowholddetaild.png
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Images/dotnet_bot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/FlowHub-MAUI/Resources/Images/dotnet_bot.png
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/FlowHub-MAUI/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Fonts/OpenSans-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YBTopaz8/FlowHub-MAUI/HEAD/FlowHub-MAUI/Resources/Fonts/OpenSans-Semibold.ttf
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/BoolToInverse.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 |
3 | internal class BoolToInverse
4 | {
5 | }
6 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/DataAccess/IServices/IDataBaseService.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.DataAccess.IServices;
2 |
3 | public interface IDataBaseService
4 | {
5 | RealmConfiguration GetRealm();
6 | void DeleteDB();
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/AppIcon/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace FlowHub_MAUI
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace FlowHub_MAUI
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/AppShellMobile.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI;
2 |
3 | public partial class AppShellMobile : Shell
4 | {
5 | public AppShellMobile()
6 | {
7 | InitializeComponent();
8 | Routing.RegisterRoute(nameof(HomeM), typeof(HomeM));
9 | Routing.RegisterRoute(nameof(SettingsM), typeof(SettingsM));
10 | }
11 | public HomePageVM? Vm { get; }
12 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/AppShell.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI
2 | {
3 | public partial class AppShell : Shell
4 | {
5 | public AppShell(HomePageVM vm)
6 | {
7 | InitializeComponent();
8 | Routing.RegisterRoute(nameof(HomeD), typeof(HomeD));
9 | Routing.RegisterRoute(nameof(SettingsD), typeof(SettingsD));
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/SettingsD.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Views.Desktop;
2 |
3 | public partial class SettingsD : ContentPage
4 | {
5 | public SettingsD(HomePageVM ViewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = ViewModel;
9 | this.ViewModel = ViewModel;
10 | }
11 | public bool ToLogin { get; }
12 | public HomePageVM ViewModel { get; }
13 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Mobile/SettingsM.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Views.Mobile;
2 |
3 | public partial class SettingsM : ContentPage
4 | {
5 | public SettingsM(HomePageVM ViewModel)
6 | {
7 | InitializeComponent();
8 | BindingContext = ViewModel;
9 | this.ViewModel = ViewModel;
10 | }
11 | public bool ToLogin { get; }
12 | public HomePageVM ViewModel { get; }
13 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Tizen/Main.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Hosting;
3 | using System;
4 |
5 | namespace FlowHub_MAUI
6 | {
7 | internal 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 | }
18 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Mobile/HomeM.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Views.Mobile;
2 |
3 | public partial class HomeM : ContentPage
4 | {
5 | public HomeM(HomePageVM viewModel)
6 | {
7 | InitializeComponent();
8 | ViewModel = viewModel;
9 | BindingContext = ViewModel;
10 | }
11 |
12 | public HomePageVM ViewModel { get; }
13 |
14 | private void Button_Clicked(object sender, EventArgs e)
15 | {
16 | ViewModel.AddCommentUI();
17 | }
18 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 |
4 | namespace FlowHub_MAUI
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 | }
17 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace FlowHub_MAUI
4 | {
5 | public class Program
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, typeof(AppDelegate));
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace FlowHub_MAUI
4 | {
5 | public class Program
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, typeof(AppDelegate));
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/HomeD.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Views.Desktop;
2 |
3 | public partial class HomeD : ContentPage
4 | {
5 | public HomeD(HomePageVM viewModel)
6 | {
7 | InitializeComponent();
8 | ViewModel = viewModel;
9 | BindingContext = ViewModel;
10 | }
11 |
12 | public HomePageVM ViewModel { get; }
13 |
14 | private void Button_Clicked(object sender, EventArgs e)
15 | {
16 | ViewModel.AddCommentUI();
17 |
18 | }
19 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 |
4 | namespace FlowHub_MAUI
5 | {
6 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
7 | public class MainActivity : MauiAppCompatActivity
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/CountToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class CountToVisibilityConverter : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | return false;
7 | }
8 |
9 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
10 | {
11 | throw new NotImplementedException();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/PathToImageConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class PathToImageConverter : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | return string.Empty;
7 |
8 |
9 | }
10 |
11 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
12 | {
13 | throw new NotImplementedException();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/EmptyStringToMessageConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class EmptyStringToMessageConverter : IValueConverter // TODO: RENAME THIS
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 |
7 |
8 | return false;
9 | }
10 |
11 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
12 | {
13 | throw new NotImplementedException();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI
2 | {
3 | public partial class MainPage : ContentPage
4 | {
5 | int count = 0;
6 |
7 | public MainPage()
8 | {
9 | InitializeComponent();
10 | }
11 |
12 | private void OnCounterClicked(object sender, EventArgs e)
13 | {
14 | count++;
15 |
16 | if (count == 1)
17 | CounterBtn.Text = $"Clicked {count} time";
18 | else
19 | CounterBtn.Text = $"Clicked {count} times";
20 |
21 | SemanticScreenReader.Announce(CounterBtn.Text);
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/BytesArrayToImageSource.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class BytesArrayToImageSource : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | if (value is byte[] bytes && bytes.Length > 0)
7 | {
8 | return ImageSource.FromStream(() => new MemoryStream(bytes));
9 | }
10 | return null;
11 | }
12 |
13 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
14 | {
15 | throw new NotSupportedException();
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/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 your 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 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/MacCatalyst/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | com.apple.security.app-sandbox
8 |
9 |
10 | com.apple.security.network.client
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/CustomViews/FlowHubWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/CollectionSizeToVisibility.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 |
3 | public class CollectionSizeToVisibility : IValueConverter
4 | {
5 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
6 | {
7 | #pragma warning disable CS8605 // Unboxing a possibly null value.
8 | var val = (int)value;
9 | #pragma warning restore CS8605 // Unboxing a possibly null value.
10 | if (val < 1)
11 | {
12 | return false;
13 | }
14 | return true;
15 | }
16 |
17 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
18 | {
19 | throw new NotImplementedException();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Tizen/tizen-manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | maui-appicon-placeholder
7 |
8 |
9 |
10 |
11 | http://tizen.org/privilege/internet
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/CustomViews/FlowHubWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Views.Desktop.CustomViews;
2 |
3 | public partial class FlowHubWindow : Window
4 | {
5 | public FlowHubWindow(Lazy viewModel)
6 | {
7 | InitializeComponent();
8 | ViewModel = viewModel.Value;
9 | BindingContext = viewModel.Value;
10 | }
11 |
12 | public HomePageVM ViewModel { get; }
13 |
14 | protected override void OnCreated()
15 | {
16 | base.OnCreated();
17 | this.MinimumHeight = 950;
18 | this.MinimumWidth = 1200;
19 | this.Height = 950;
20 | this.Width = 1200;
21 |
22 | #if DEBUG
23 | FlowHubTitleBar.Subtitle = "v0.0.1-debug";
24 | #endif
25 |
26 | #if RELEASE
27 | FlowHubTitleBar.Subtitle = "v0.0.1-release";
28 | #endif
29 | }
30 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/BoolToImageConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class BoolToImageConverter : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | var vm = IPlatformApplication.Current!.Services.GetService();
7 |
8 |
9 | if (value is bool MyBoolValue && MyBoolValue is true)
10 | {
11 | return FontAw.Solid.HeartCircleMinus;
12 |
13 | }
14 | else
15 | {
16 |
17 | return Regular.Heart;
18 | }
19 | }
20 |
21 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/DurationConverterFromMsToTimeSpan.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class DurationConverterFromMsToTimeSpan : IValueConverter
3 | {
4 | public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | if (value is double duration)
7 | {
8 | TimeSpan time = TimeSpan.FromSeconds(duration);
9 | string timeString = time.ToString(@"mm\:ss");
10 | return timeString;
11 | }
12 | return "00:00";
13 | }
14 |
15 | public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
16 | {
17 | if (value is TimeSpan timeSpan)
18 | {
19 | return timeSpan.TotalMilliseconds;
20 | }
21 | return 0;
22 | }
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/OtherUtils/GeneralStaticUtilities.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.OtherUtils;
2 |
3 | public static class GeneralStaticUtilities
4 | {
5 | public static string GenerateRandomString(string CallerClass, int length = 12)
6 | {
7 | if (string.IsNullOrEmpty(CallerClass))
8 | {
9 | throw new ArgumentNullException(nameof(CallerClass));
10 | }
11 |
12 | Random random = Random.Shared;
13 | const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
14 | char[] stringChars = new char[length];
15 | stringChars[0] = CallerClass[0];
16 | stringChars[1] = CallerClass[1];
17 |
18 | for (int i = 2; i < length; i++)
19 | {
20 | stringChars[i] = chars[random.Next(chars.Length)];
21 | }
22 |
23 | return new string(stringChars);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | // To learn more about WinUI, the WinUI project structure,
2 | // and more about our project templates, see: http://aka.ms/winui-project-info.
3 |
4 | namespace FlowHub_MAUI.WinUI
5 | {
6 | ///
7 | /// Provides application-specific behavior to supplement the default Application class.
8 | ///
9 | public partial class App : MauiWinUIApplication
10 | {
11 | ///
12 | /// Initializes the singleton application object. This is the first line of authored code
13 | /// executed, and as such is the logical equivalent of main() or WinMain().
14 | ///
15 | public App()
16 | {
17 | this.InitializeComponent();
18 | }
19 |
20 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/AppShell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/DataAccess/Services/DataBaseService.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.DataAccess.Services;
2 |
3 | public class DataBaseService : IDataBaseService
4 | {
5 | public void DeleteDB() => throw new NotImplementedException();
6 |
7 | public RealmConfiguration GetRealm()
8 | {
9 | string dbPath=string.Empty;
10 | #if ANDROID
11 | dbPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\FlowHub";
12 | #elif WINDOWS
13 | dbPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\FlowHub";
14 | #endif
15 |
16 | if (!Directory.Exists(dbPath))
17 | {
18 | Directory.CreateDirectory(dbPath);
19 | }
20 |
21 | string filePath = Path.Combine(dbPath, "FlowHub.realm");
22 | //File.Delete(filePath);
23 | var config = new RealmConfiguration(filePath)
24 | {
25 | SchemaVersion = 0
26 | };
27 |
28 | return config;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/DataAccess/IServices/IFlowsService.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | namespace FlowHub_MAUI.DataAccess.IServices;
5 |
6 | public interface IFlowsService
7 | {
8 | void GetFlows();
9 | Task LoadFlowsToDBFromOnline();
10 | UserModelView? GetUserAccount(ParseUser? usr = null);
11 | string UpdateFlow(FlowsModelView flow);
12 | bool SyncAllDataToDatabaseAsync(IEnumerable flows, IEnumerable flowComments);
13 | Task LogUserIn(ParseUser user, string password);
14 | Task SignUpUser(ParseUser user);
15 | void UpdateUser(UserModelView user);
16 | string AddFlowComment(FlowCommentsView comment);
17 | void SaveBoth(FlowsModelView flow, FlowCommentsView comment);
18 | Task LoadFlowAndCommentsLinksToDBFromOnline();
19 | Task LoadFlowCommentsToDBFromOnline();
20 | Task SyncAllData();
21 |
22 | IList? AllFlows { get; internal set; }
23 | IList? AllFlowAndCommentsLink { get; set; }
24 | IList? AllFlowComments { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/BoolToInverseConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class BoolToInverseConverter : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 |
7 | return null;
8 |
9 | }
10 |
11 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
12 | {
13 |
14 | Debug.WriteLine(message: "None");
15 | return null;
16 | }
17 | }
18 |
19 | public class BoolToYesNoConverter : IValueConverter
20 | {
21 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
22 | {
23 | var val = (bool)value!;
24 | if (val)
25 | {
26 | return "Yes";
27 | }
28 | else
29 | {
30 | return "No";
31 | }
32 | }
33 |
34 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
35 | {
36 | Debug.WriteLine(message: "None");
37 | return null;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/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 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/AppShellMobile.xaml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
10 |
15 |
16 |
20 |
21 |
26 |
27 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/GlobalUsings.cs:
--------------------------------------------------------------------------------
1 | global using CommunityToolkit.Maui;
2 | global using CommunityToolkit.Maui.Storage;
3 |
4 |
5 | global using CommunityToolkit.Maui.Core.Extensions;
6 | global using CommunityToolkit.Mvvm.ComponentModel;
7 | global using UraniumUI.Icons.FontAwesome;
8 | global using FontAw = UraniumUI.Icons.FontAwesome;
9 | global using Realms;
10 |
11 | global using System.Collections.ObjectModel;
12 |
13 | global using CommunityToolkit.Mvvm.Input;
14 |
15 | global using Syncfusion.Maui.Toolkit.Hosting;
16 | global using DevExpress.Maui;
17 |
18 | global using FlowHub_MAUI.ViewModel;
19 | global using FlowHub_MAUI.Utilities.Models;
20 |
21 |
22 | global using Microsoft.Extensions.Logging;
23 |
24 | #if WINDOWS
25 |
26 | global using Microsoft.UI;
27 | global using Microsoft.UI.Windowing;
28 | global using WinRT.Interop;
29 |
30 | #endif
31 |
32 | global using Parse;
33 | global using Parse.Infrastructure;
34 |
35 | global using System.Globalization;
36 | global using System.Reactive.Linq;
37 | global using System.Diagnostics;
38 |
39 |
40 | global using FlowHub_MAUI.Utilities.OtherUtils;
41 | global using FlowHub_MAUI.Views.Desktop.CustomViews;
42 | global using FlowHub_MAUI.DataAccess.IServices;
43 | global using FlowHub_MAUI.DataAccess.Services;
44 |
45 | global using FlowHub_MAUI.Views.Desktop;
46 | global using FlowHub_MAUI.Views.Mobile;
47 | global using UraniumUI;
48 |
49 |
50 | namespace FlowHub_MAUI
51 | {
52 | internal class GlobalUsings
53 | {
54 | }
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/BytesToMegabytesConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class BytesToMegabytesConverter : IValueConverter
3 | {
4 |
5 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
6 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
7 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
8 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
9 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
10 | {
11 | if (value is long)
12 | {
13 | return ((long)value / 1024.0 / 1024.0).ToString("0.##") + " MB";
14 | }
15 | else if (value is double)
16 | {
17 | return ((double)value / 1024.0 / 1024.0).ToString("0.##") + " MB";
18 | }
19 | return "0 MB"; // Default case if conversion fails
20 | }
21 |
22 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | UIDeviceFamily
15 |
16 | 2
17 |
18 | UIRequiredDeviceCapabilities
19 |
20 | arm64
21 |
22 | UISupportedInterfaceOrientations
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationLandscapeLeft
26 | UIInterfaceOrientationLandscapeRight
27 |
28 | UISupportedInterfaceOrientations~ipad
29 |
30 | UIInterfaceOrientationPortrait
31 | UIInterfaceOrientationPortraitUpsideDown
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | XSAppIconAssets
36 | Assets.xcassets/appicon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Splash/splash.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/AppIcon/appiconfg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/DateTimeOffsetToLocalDateConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class DateTimeOffsetToLocalDateConverter : IValueConverter
3 | {
4 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
5 | {
6 | if (value is DateTimeOffset dateTimeOffset)
7 | {
8 |
9 | return dateTimeOffset.ToLocalTime().ToString("f");
10 | }
11 | return null;
12 | }
13 |
14 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
15 | {
16 | throw new NotImplementedException();
17 | }
18 | }
19 | public class DateTimeToLocalTimeConverter : IValueConverter
20 | {
21 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
22 | {
23 | if (value is DateTimeOffset dateTimeOffset)
24 | {
25 | // Convert DateTimeOffset to local DateTime
26 | return dateTimeOffset.ToLocalTime().ToString("h:mm:ss tt");
27 | }
28 | return null; // Or you could return Binding.DoNothing;
29 | }
30 |
31 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
32 | {
33 | throw new NotImplementedException();
34 | }
35 | }
36 | public class DateTimeToLocalDateConverter : IValueConverter
37 | {
38 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
39 | {
40 | if (value is DateTimeOffset dateTimeOffset)
41 | {
42 | // Convert DateTimeOffset to local DateTime
43 | return dateTimeOffset.ToLocalTime().ToString("f");
44 | }
45 | return null; // Or you could return Binding.DoNothing;
46 | }
47 |
48 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
49 | {
50 | throw new NotImplementedException();
51 | }
52 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/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 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Platforms/iOS/Resources/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 | NSPrivacyAccessedAPITypes
14 |
15 |
16 | NSPrivacyAccessedAPIType
17 | NSPrivacyAccessedAPICategoryFileTimestamp
18 | NSPrivacyAccessedAPITypeReasons
19 |
20 | C617.1
21 |
22 |
23 |
24 | NSPrivacyAccessedAPIType
25 | NSPrivacyAccessedAPICategorySystemBootTime
26 | NSPrivacyAccessedAPITypeReasons
27 |
28 | 35F9.1
29 |
30 |
31 |
32 | NSPrivacyAccessedAPIType
33 | NSPrivacyAccessedAPICategoryDiskSpace
34 | NSPrivacyAccessedAPITypeReasons
35 |
36 | E174.1
37 |
38 |
39 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/TypeConverters/IndexToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.TypeConverters;
2 | public class IndexToVisibilityConverter : IValueConverter
3 | {
4 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
5 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
6 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
7 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
8 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
9 | {
10 | if (value is int currentIndex && parameter is string viewIndexString && int.TryParse(viewIndexString, out int viewIndex))
11 | {
12 | return currentIndex == viewIndex;
13 | }
14 | return false;
15 | }
16 |
17 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
18 | #pragma warning disable CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
21 | #pragma warning restore CS8767 // Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes).
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/SettingsD.xaml:
--------------------------------------------------------------------------------
1 |
2 |
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 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Mobile/SettingsM.xaml:
--------------------------------------------------------------------------------
1 |
2 |
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 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/FlowHub-MAUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.12.35521.163 d17.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowHub-MAUI", "FlowHub-MAUI.csproj", "{BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Parse", "..\..\Parse-SDK-dotNETMAUI\Parse\Parse.csproj", "{6CA274DF-CABC-4C85-8699-90AD0DA87E3D}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParseLiveQuery", "..\..\parse-live-query-dotnetMAUI\ParseLiveQuery\ParseLiveQuery.csproj", "{230295DE-B1F5-4239-8C42-1ABD8B1A6D05}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
21 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Release|Any CPU.Build.0 = Release|Any CPU
23 | {BD5E9009-A735-4E78-9DF6-3044E6F9FC0B}.Release|Any CPU.Deploy.0 = Release|Any CPU
24 | {6CA274DF-CABC-4C85-8699-90AD0DA87E3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {6CA274DF-CABC-4C85-8699-90AD0DA87E3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {6CA274DF-CABC-4C85-8699-90AD0DA87E3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {6CA274DF-CABC-4C85-8699-90AD0DA87E3D}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {230295DE-B1F5-4239-8C42-1ABD8B1A6D05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {230295DE-B1F5-4239-8C42-1ABD8B1A6D05}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {230295DE-B1F5-4239-8C42-1ABD8B1A6D05}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {230295DE-B1F5-4239-8C42-1ABD8B1A6D05}.Release|Any CPU.Build.0 = Release|Any CPU
32 | EndGlobalSection
33 | GlobalSection(SolutionProperties) = preSolution
34 | HideSolutionNode = FALSE
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Styles/Colors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 | #512BD4
10 | #ac99ea
11 | #242424
12 | #DFD8F7
13 | #9880e5
14 | #2B0B98
15 |
16 | White
17 | Black
18 | #D600AA
19 | #190649
20 | #1f1f1f
21 |
22 | #E1E1E1
23 | #C8C8C8
24 | #ACACAC
25 | #919191
26 | #6E6E6E
27 | #404040
28 | #212121
29 | #141414
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI
2 | {
3 | public static class MauiProgram
4 | {
5 | public static MauiApp CreateMauiApp()
6 | {
7 | var builder = MauiApp.CreateBuilder();
8 | builder
9 | .UseMauiApp()
10 | .UseDevExpress(useLocalization: false)
11 | .UseDevExpressCollectionView()
12 | .UseDevExpressControls()
13 | .UseDevExpressDataGrid()
14 | .UseDevExpressEditors()
15 | .UseDevExpressGauges()
16 |
17 | .UseMauiCommunityToolkit(options =>
18 | {
19 | options.SetShouldSuppressExceptionsInAnimations(true);
20 | options.SetShouldSuppressExceptionsInBehaviors(true);
21 | options.SetShouldSuppressExceptionsInConverters(true);
22 |
23 | })
24 |
25 | .ConfigureFonts(fonts =>
26 | {
27 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
28 | fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
29 | fonts.AddMaterialSymbolsFonts();
30 | fonts.AddFontAwesomeIconFonts();
31 | })
32 | .ConfigureSyncfusionToolkit();
33 | #if DEBUG
34 | builder.Logging.AddDebug();
35 | #endif
36 | builder.Services.AddSingleton();
37 | builder.Services.AddSingleton(FolderPicker.Default);
38 | //builder.Services.AddSingleton(FilePicker.Default);
39 | builder.Services.AddSingleton(FileSaver.Default);
40 |
41 | /* Registering the DataAccess Services */
42 | builder.Services.AddSingleton();
43 |
44 |
45 | /* Registering the ViewModels */
46 | builder.Services.AddSingleton(provider =>
47 | new Lazy(() => provider.GetRequiredService()));
48 |
49 | builder.Services.AddSingleton();
50 |
51 |
52 | /* Registering the Desktop Views */
53 | builder.Services.AddSingleton();
54 | builder.Services.AddSingleton();
55 |
56 |
57 |
58 | /* Registering the Mobile Views */
59 |
60 | builder.Services.AddSingleton();
61 | builder.Services.AddSingleton();
62 | builder.Services.AddSingleton();
63 | builder.Services.AddSingleton();
64 |
65 | return builder.Build();
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/OtherUtils/CustomAdmin.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.OtherUtils;
2 |
3 | public static class CustomAnimsExtensions
4 | {
5 |
6 | public static async Task AnimateHighlightPointerPressed(this View element)
7 | {
8 | await element.ScaleTo(0.95, 80, Easing.CubicIn);
9 | }
10 | public static async Task AnimateHighlightPointerReleased(this View element)
11 | {
12 | await element.ScaleTo(1.0, 80, Easing.CubicOut);
13 | }
14 |
15 | public static async Task DimmOut(this View element)//, EventArgs e)
16 | {
17 | await element.FadeTo(0.85, 80, Easing.CubicIn);
18 | }
19 | public static async Task DimmIn(this View element)//, EventArgs e)
20 | {
21 | await element.FadeTo(1.0, 80, Easing.CubicOut);
22 |
23 | }
24 |
25 | public static async Task AnimateRippleBounce(this View element, int bounceCount = 3, double bounceHeight = 20, uint duration = 200)
26 | {
27 | for (int i = 0; i < bounceCount; i++)
28 | {
29 | // Move the view down
30 | await element.TranslateTo(0, bounceHeight, duration / 2, Easing.CubicIn);
31 |
32 | // Move the view back up
33 | await element.TranslateTo(0, 0, duration / 2, Easing.CubicOut);
34 |
35 | // Gradually reduce bounce height for the next bounce
36 | bounceHeight *= 0.5; // Diminishes like a ripple
37 | }
38 | }
39 |
40 | public static async Task AnimateFocusModePointerEnter(this View element, double endOpacity = 1, double endScale = 1)
41 | {
42 | // Animate scale-up to 1.2 and opacity to 1 with a smooth transition
43 | await Task.WhenAll(
44 | element.ScaleTo(endScale, 250, Easing.CubicInOut),
45 | element.FadeTo(1.0, 250, Easing.CubicInOut)
46 | );
47 | }
48 |
49 |
50 | public static async Task AnimateFocusModePointerExited(this View element, double endOpacity = 0.7, double endScale = 0.7)
51 | {
52 | // Animate scale-down to 0.8 and opacity to 0.7 with a smooth transition
53 | await Task.WhenAll(
54 | element.ScaleTo(endScale, 250, Easing.CubicInOut),
55 | element.FadeTo(endOpacity, 250, Easing.CubicInOut)
56 | );
57 | }
58 |
59 | // Extension method to fade out and slide back a view
60 | public static async Task AnimateFadeOutBack(this View element, uint duration = 250)
61 | {
62 | await Task.WhenAll(
63 | element.FadeTo(0, duration, Easing.CubicInOut), // Fade out
64 | element.TranslateTo(0, 50, duration, Easing.CubicInOut) // Slide back by 50 units on Y-axis
65 | );
66 | element.IsVisible = false; // Hide the view after animation
67 | }
68 |
69 | // Extension method to fade in and slide forward a view
70 | public static async Task AnimateFadeInFront(this View element, uint duration = 250)
71 | {
72 | element.IsVisible = true; // Show the view before animation
73 | element.Opacity = 0; // Ensure the view is initially transparent
74 | element.TranslationY = 50; // Start with the view slightly back
75 | await Task.WhenAll(
76 | element.FadeTo(1, duration, Easing.CubicInOut), // Fade in
77 | element.TranslateTo(0, 0, duration, Easing.CubicInOut) // Slide forward to original position
78 | );
79 | }
80 |
81 | public static async Task AnimateSlideDown(this View element, double heightToSlide)
82 | {
83 | await element.TranslateTo(0, heightToSlide, 250, Easing.CubicInOut);
84 | element.HeightRequest = element.Height - heightToSlide;
85 | }
86 |
87 | public static async Task AnimateSlideUp(this View element, double heightToSlide)
88 | {
89 | await element.TranslateTo(0, 0, 250, Easing.CubicInOut);
90 | element.HeightRequest = element.Height + heightToSlide;
91 | }
92 |
93 | // Helper method to animate HeightRequest smoothly
94 | private static async Task AnimateHeightRequest(this View element, double targetHeight, uint duration)
95 | {
96 | var initialHeight = element.Height;
97 | var heightAnimation = new Animation(v => element.HeightRequest = v, initialHeight, targetHeight);
98 |
99 | heightAnimation.Commit(element, "HeightRequestAnimation", length: duration, easing: Easing.CubicInOut);
100 | await Task.Delay((int)duration); // Wait for the animation to complete
101 | }
102 |
103 |
104 |
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Mobile/HomeM.xaml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
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 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Views/Desktop/HomeD.xaml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
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 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.cs]
2 |
3 | # CS1998: Async method lacks 'await' operators and will run synchronously
4 | dotnet_diagnostic.CS1998.severity = silent
5 | csharp_indent_labels = no_change
6 | csharp_using_directive_placement = outside_namespace:silent
7 | csharp_prefer_simple_using_statement = true:suggestion
8 | csharp_prefer_braces = true:silent
9 | csharp_style_namespace_declarations = block_scoped:silent
10 | csharp_style_prefer_method_group_conversion = true:silent
11 | csharp_style_prefer_top_level_statements = true:silent
12 | csharp_style_prefer_primary_constructors = true:suggestion
13 | csharp_style_expression_bodied_methods = false:silent
14 | csharp_style_expression_bodied_constructors = false:silent
15 | csharp_style_expression_bodied_operators = false:silent
16 | csharp_style_expression_bodied_properties = true:silent
17 | csharp_style_expression_bodied_indexers = true:silent
18 | csharp_style_expression_bodied_accessors = true:silent
19 | csharp_style_expression_bodied_lambdas = true:silent
20 | csharp_style_expression_bodied_local_functions = false:silent
21 | csharp_style_throw_expression = true:suggestion
22 | csharp_style_prefer_null_check_over_type_check = true:suggestion
23 | csharp_space_around_binary_operators = before_and_after
24 |
25 | [*.{cs,vb}]
26 | #### Naming styles ####
27 |
28 | # Naming rules
29 |
30 | dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
31 | dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
32 | dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
33 |
34 | dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
35 | dotnet_naming_rule.types_should_be_pascal_case.symbols = types
36 | dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
37 |
38 | dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
39 | dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
40 | dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
41 |
42 | # Symbol specifications
43 |
44 | dotnet_naming_symbols.interface.applicable_kinds = interface
45 | dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
46 | dotnet_naming_symbols.interface.required_modifiers =
47 |
48 | dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
49 | dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
50 | dotnet_naming_symbols.types.required_modifiers =
51 |
52 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
53 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
54 | dotnet_naming_symbols.non_field_members.required_modifiers =
55 |
56 | # Naming styles
57 |
58 | dotnet_naming_style.begins_with_i.required_prefix = I
59 | dotnet_naming_style.begins_with_i.required_suffix =
60 | dotnet_naming_style.begins_with_i.word_separator =
61 | dotnet_naming_style.begins_with_i.capitalization = pascal_case
62 |
63 | dotnet_naming_style.pascal_case.required_prefix =
64 | dotnet_naming_style.pascal_case.required_suffix =
65 | dotnet_naming_style.pascal_case.word_separator =
66 | dotnet_naming_style.pascal_case.capitalization = pascal_case
67 |
68 | dotnet_naming_style.pascal_case.required_prefix =
69 | dotnet_naming_style.pascal_case.required_suffix =
70 | dotnet_naming_style.pascal_case.word_separator =
71 | dotnet_naming_style.pascal_case.capitalization = pascal_case
72 | dotnet_style_operator_placement_when_wrapping = beginning_of_line
73 | tab_width = 4
74 | indent_size = 4
75 | end_of_line = crlf
76 | dotnet_style_coalesce_expression = true:suggestion
77 | dotnet_style_null_propagation = true:suggestion
78 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
79 | dotnet_style_prefer_auto_properties = true:silent
80 | dotnet_style_object_initializer = true:suggestion
81 | dotnet_style_collection_initializer = true:suggestion
82 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
83 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent
84 | dotnet_style_prefer_conditional_expression_over_return = true:silent
85 | dotnet_style_explicit_tuple_names = true:suggestion
86 | dotnet_style_prefer_inferred_tuple_names = true:suggestion
87 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
88 | dotnet_style_prefer_compound_assignment = true:suggestion
89 | dotnet_style_prefer_simplified_interpolation = true:suggestion
90 | dotnet_style_namespace_match_folder = true:suggestion
91 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Time Spent So Far... [](https://wakatime.com/badge/user/20225675-04f6-42d1-8535-b25921cfc585/project/9869e113-a517-4e62-84dc-be741016f769)
2 | # FlowHub (An Expense Tracker) Cross Platform MAUI App.
3 |
4 | # Work Will resume on this project in the coming weeks. A complete redesign done better!
5 |
6 | An Application used to manage Savings, Expenditures, Incomes, Debts, Financial plannings etc.
7 |
8 | Ideal for anyone who likes to keep track of their Financial Flow.
9 |
10 | ## Screenshots at bottom of the page
11 |
12 | ## More [Here... 📸](https://github.com/YBTopaz8/FlowHub-MAUI/tree/master/ScreenShots)
13 | ## Requirements
14 | This project is build on .NET CORE 7, .NET MAUI and LiteDB as its DataBase using iText 7 for PDF Generation.
15 |
16 | The Requirement to run use THIS project, you would need;
17 | - A PC running Windows 10 at least.
18 | - An Android Device running Android 11 at least (API 30).
19 | - Visual Studio 2019, 2022 or latest (It was built on VS 2022) with MAUI support.
20 |
21 | ## Installation
22 | To install the project, please do as follows;
23 | - Clone the project from my GitHub
24 | - Extract the project to your desired location
25 | - Load it in Visual Studio
26 | - Open the Package Manager Console (View -> Other Windows -> Package Manager Console)
27 | - Type 'dotnet restore' without the ' ' then press Enter.
28 | - Wait for it to restore all required packages
29 |
30 | > Then,
31 | - Ensure you have an Android Virtual Device for emulation testing.
32 | - Make sure you have Hardware Acceleration enabled on your PC
33 | Build and run your app and that's it!
34 |
35 | ## FAQ:
36 |
37 | | CodeName | UI Name |
38 | | ------------- |:-------------:|
39 | | Expenditure | Flow Out |
40 | | Income | Flow In |
41 | | Debt | Flow Hold |
42 |
43 | ## Currently Existing Features
44 |
45 | - Official Android and Windows Beta Versions
46 | - Expenditures Management (CRUD operations)
47 | - Income Management (CRUD Operations)
48 | - Debts Management now :D
49 | - Black and White Themes
50 | - Statistics and Graphs
51 | - Report Printing for Flow Outs on both Windows and Android
52 | - Login feature and Account Management.
53 | - Support for probably all currencies
54 | > More Coming Soon...
55 |
56 | ## Roadmap (Upcoming features)
57 | - Normal Planned Expenditures
58 | - Application Customisation
59 | - Localization for Multilanguage
60 |
61 | ## Screenshots
62 | ## Login/Register Android
63 | | Android Light Mode| Android Dark Mode|
64 | | ------------- |:-------------:|
65 | |
|
|
66 | |
|
|
67 |
68 | ## General UI Android
69 | | Android Light Mode| Android Dark Mode|
70 | | ------------- |:-------------:|
71 | |
|
|
72 | |
|
|
73 | |
|
|
74 |
75 | ## Login/Register Windows
76 | | Windows Light Mode| Windows Dark Mode|
77 | | ------------- |:-------------:|
78 | |
|
|
79 | |
|
|
80 |
81 | ## GENERAL UI Windows
82 | | Windows Light Mode| Windows Dark Mode|
83 | | ------------- |:-------------:|
84 | |
|
|
85 | |
|
|
86 |
87 | > Those are just the surfaces..
88 |
89 | ## Lots and Lots of thanks to:
90 | - [enisn](https://github.com/enisn) for their incredible [UraniumUI](https://github.com/enisn/UraniumUI) and [InputKit](https://github.com/enisn/Xamarin.Forms.InputKit) That I HEAVILY use in this project ❤️
91 | - [Beto Rodriguez](https://github.com/beto-rodriguez) for the charts & graph library : [LiveCharts2](https://github.com/beto-rodriguez/LiveCharts2)
92 |
93 | 
94 |
95 | ## Authors
96 |
97 | - [Yvan Brunel](https://github.com/YBTopaz8) (Author)
98 | - [Silver](https://github.com/Silver-U) (Co-Author)
99 |
100 | [My Simple Portfolio](https://flowcv.me/ybtopaz)
101 |
102 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/FlowHub-MAUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net9.0-android;net9.0-ios;net9.0-maccatalyst
4 | $(TargetFrameworks);net9.0-windows10.0.19041.0
5 |
6 |
7 |
12 |
13 | Exe
14 | FlowHub_MAUI
15 | true
16 | true
17 | enable
18 | enable
19 |
20 | FlowHub-MAUI
21 |
22 | com.companyname.flowhubmaui
23 |
24 | 1.0
25 | 1
26 | 11.0
27 | 13.1
28 | 21.0
29 | 10.0.17763.0
30 | 6.5
31 | 10.0.19041.0
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 | FlowHubWindow.xaml
74 |
75 |
76 |
77 |
78 | MSBuild:Compile
79 |
80 |
81 | MSBuild:Compile
82 |
83 |
84 | MSBuild:Compile
85 |
86 |
87 | MSBuild:Compile
88 |
89 |
90 | MSBuild:Compile
91 |
92 |
93 | MSBuild:Compile
94 |
95 |
96 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/App.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | namespace FlowHub_MAUI
5 | {
6 | public partial class App : Application
7 | {
8 | public FlowHubWindow FlowHubWindow { get; }
9 | public App(FlowHubWindow flowHubWindow)
10 | {
11 | InitializeComponent();
12 |
13 | InitializeParseClient();
14 |
15 | AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
16 | FlowHubWindow = flowHubWindow;
17 | var vm = IPlatformApplication.Current!.Services.GetService()!;
18 | #if WINDOWS
19 | PCShell = new(vm);
20 | FlowHubWindow.Page = PCShell;
21 |
22 | #elif ANDROID
23 | MobileShell = new();
24 | FlowHubWindow.Page = MobileShell;
25 | #endif
26 | }
27 | AppShell PCShell { get; set; }
28 | AppShellMobile MobileShell { get; set; }
29 | private void CurrentDomain_FirstChanceException(object? sender, System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs e)
30 | {
31 | Debug.WriteLine($"********** UNHANDLED EXCEPTION! Details: {e.Exception} | {e.Exception.InnerException?.Message} | {e.Exception.Source} " +
32 | $"| {e.Exception.StackTrace} | {e.Exception.Message} || {e.Exception.Data.Values} {e.Exception.HelpLink}");
33 |
34 | //var home = IPlatformApplication.Current!.Services.GetService();
35 | //await home.ExitingApp();
36 | LogException(e.Exception);
37 | }
38 |
39 |
40 | protected override Window CreateWindow(IActivationState? activationState)
41 | {
42 |
43 | var vm = IPlatformApplication.Current!.Services.GetService()!;
44 | #if WINDOWS
45 | FlowHubWindow.Page = PCShell;
46 |
47 | #elif ANDROID
48 | FlowHubWindow.Page = MobileShell;
49 | #endif
50 |
51 | //win = base.CreateWindow(activationState);
52 | //this.MinimumHeight = 800;
53 | //this.MinimumWidth = 1200;
54 | //this.Height = 900;
55 | //this.Width = 1200;
56 |
57 | return FlowHubWindow;
58 | }
59 |
60 |
61 | public static bool InitializeParseClient()
62 | {
63 | try
64 | {
65 | // Check for internet connection
66 | if (Connectivity.NetworkAccess != NetworkAccess.Internet)
67 | {
68 | Console.WriteLine("No Internet Connection: Unable to initialize ParseClient.");
69 | return false;
70 | }
71 |
72 | // Validate API Keys
73 | if (string.IsNullOrEmpty(APIKeys.ApplicationId) ||
74 | string.IsNullOrEmpty(APIKeys.ServerUri) ||
75 | string.IsNullOrEmpty(APIKeys.DotNetKEY))
76 | {
77 | Console.WriteLine("Invalid API Keys: Unable to initialize ParseClient.");
78 | return false;
79 | }
80 |
81 | // Create ParseClient
82 | ParseClient client = new ParseClient(new ServerConnectionData
83 | {
84 | ApplicationID = APIKeys.ApplicationId,
85 | ServerURI = APIKeys.ServerUri,
86 | Key = APIKeys.DotNetKEY,
87 |
88 | }
89 | );
90 | HostManifestData manifest = new HostManifestData()
91 | {
92 | Version = "1.0.0",
93 | Identifier = "com.yvanbrunel.flowhub",
94 | Name = "Flowhub",
95 | };
96 |
97 | client.Publicize();
98 |
99 |
100 | Debug.WriteLine("ParseClient initialized successfully.");
101 | return true;
102 | }
103 | catch (Exception ex)
104 | {
105 | Console.WriteLine($"Error initializing ParseClient: {ex.Message}");
106 | return false;
107 | }
108 | }
109 | private static readonly object _logLock = new object();
110 |
111 |
112 | private void LogException(Exception ex)
113 | {
114 |
115 | try
116 | {
117 | // Define the directory path
118 | string directoryPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "DimmerCrashLogs");
119 |
120 | // Ensure the directory exists; if not, create it
121 | if (!Directory.Exists(directoryPath))
122 | {
123 | Directory.CreateDirectory(directoryPath);
124 | }
125 | string filePath = Path.Combine(directoryPath, "crashlog.txt");
126 | string logContent = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}]\nMsg:{ex.Message}\nStackTrace:{ex.StackTrace}\n\n";
127 |
128 | // Retry mechanism for file writing
129 | bool success = false;
130 | int retries = 3;
131 | int delay = 500; // Delay between retries in milliseconds
132 |
133 | lock (_logLock)
134 | {
135 | while (retries-- > 0 && !success)
136 | {
137 | try
138 | {
139 | #if RELEASE || DEBUG
140 | File.AppendAllText(filePath, logContent);
141 | success = true; // Write successful
142 | #endif
143 | }
144 | catch (IOException ioEx) when (retries > 0)
145 | {
146 | Debug.WriteLine($"Failed to log, retrying... ({ioEx.Message})");
147 | Thread.Sleep(delay); // Wait and retry
148 | }
149 | }
150 |
151 | if (!success)
152 | {
153 | Debug.WriteLine("Failed to log exception after multiple attempts.");
154 | }
155 | }
156 | }
157 | catch (Exception loggingEx)
158 | {
159 | Debug.WriteLine($"Failed to log exception: {loggingEx}");
160 | }
161 | }
162 | }
163 |
164 |
165 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/Models/UserModel.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.Models;
2 |
3 | public partial class UserModel : RealmObject
4 | {
5 | [PrimaryKey]
6 | public string? LocalDeviceId { get; set; } = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
7 | public string? Username { get; set; }
8 | public string? Email {get;set;}
9 | public string? Password {get;set;}
10 | public string? CoverImage {get;set;}
11 | public string? PhoneNumber {get;set;}
12 | public string? Address {get;set;}
13 | public string? City {get;set;}
14 | public string? State {get;set;}
15 | public string? Currency {get;set; }
16 |
17 | public string? DateCreated { get; set; } = DateTime.UtcNow.ToString("o");
18 | public string? DeviceName { get; set; } = DeviceInfo.Current.Name;
19 | public string? DeviceFormFactor { get; set; } = DeviceInfo.Current.Idiom.ToString();
20 | public string? DeviceModel { get; set; } = DeviceInfo.Current.Model;
21 | public string? DeviceManufacturer { get; set; } = DeviceInfo.Current.Manufacturer;
22 | public string? DeviceVersion { get; set; } = DeviceInfo.Current.VersionString;
23 | public UserModel()
24 | {
25 |
26 | }
27 |
28 | public UserModel(UserModelView model)
29 | {
30 | LocalDeviceId = model.LocalDeviceId;
31 | Username = model.UserName;
32 | Email = model.UserEmail;
33 | Password = model.UserPassword;
34 | CoverImage = model.CoverImage;
35 | PhoneNumber = model.PhoneNumber;
36 | Address = model.Address;
37 | City = model.City;
38 | State = model.State;
39 | Currency = model.Currency;
40 |
41 | }
42 | }
43 |
44 | public partial class UserModelView : ObservableObject
45 | {
46 |
47 | [ObservableProperty]
48 | string? localDeviceId = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
49 |
50 | [ObservableProperty]
51 | bool isAuthenticated;
52 | [ObservableProperty]
53 | string? userIDOnline;
54 | [ObservableProperty]
55 | string? userName = "User";
56 | [ObservableProperty]
57 | string? userPassword;
58 | [ObservableProperty]
59 | string? userEmail;
60 | [ObservableProperty]
61 | string? coverImage = string.Empty;
62 | [ObservableProperty]
63 | DateTimeOffset lastSessionDate;
64 |
65 | [ObservableProperty]
66 | string? phoneNumber;
67 | [ObservableProperty]
68 | string? address;
69 | [ObservableProperty]
70 | string? city;
71 | [ObservableProperty]
72 | string? state;
73 | [ObservableProperty]
74 | string? currency;
75 |
76 |
77 | public string? DateCreated { get; set; } = DateTime.UtcNow.ToString("o");
78 | public string? DeviceName { get; set; } = DeviceInfo.Current.Name;
79 | public string? DeviceFormFactor { get; set; } = DeviceInfo.Current.Idiom.ToString();
80 | public string? DeviceModel { get; set; } = DeviceInfo.Current.Model;
81 | public string? DeviceManufacturer { get; set; } = DeviceInfo.Current.Manufacturer;
82 | public string? DeviceVersion { get; set; } = DeviceInfo.Current.VersionString;
83 | public UserModelView()
84 | {
85 |
86 | }
87 | public UserModelView(UserModel model)
88 | {
89 | LocalDeviceId = model.LocalDeviceId;
90 | UserName = model.Username;
91 | UserEmail= model.Email;
92 | UserPassword = model.Password;
93 | CoverImage = model.CoverImage;
94 | PhoneNumber = model.PhoneNumber;
95 | Address = model.Address;
96 | City = model.City;
97 | State = model.State;
98 | Currency = model.Currency;
99 |
100 | }
101 |
102 | public UserModelView(ParseUser model)
103 | {
104 | UserEmail = model.Email;
105 | UserName = model.Username;
106 | UserIDOnline = model.ObjectId;
107 | IsAuthenticated = model.IsAuthenticated;
108 | }
109 | }
110 |
111 | public partial class ReportModel : RealmObject
112 | {
113 | [PrimaryKey]
114 | public string? LocalDeviceId { get; set; } = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
115 |
116 | public UserModel? User { get; set; }
117 | public string? ReportTitle { get; set; }
118 | public string? ReportDescription { get; set; }
119 | public DateTimeOffset Date { get; set; }
120 | public double ReportTotalAmount { get; set; }
121 | public double ReportCurrency { get; set; }
122 |
123 | public string? DateCreated { get; set; } = DateTime.UtcNow.ToString("o");
124 | public string? DeviceName { get; set; } = DeviceInfo.Current.Name;
125 | public string? DeviceFormFactor { get; set; } = DeviceInfo.Current.Idiom.ToString();
126 | public string? DeviceModel { get; set; } = DeviceInfo.Current.Model;
127 | public string? DeviceManufacturer { get; set; } = DeviceInfo.Current.Manufacturer;
128 | public string? DeviceVersion { get; set; } = DeviceInfo.Current.VersionString;
129 | public ReportModel()
130 | {
131 |
132 | }
133 |
134 | public ReportModel(ReportModelView model)
135 | {
136 | LocalDeviceId = model.LocalDeviceId;
137 | User = model.User;
138 | ReportTitle = model.ReportTitle;
139 | ReportDescription = model.ReportDescription;
140 | Date = model.Date;
141 | ReportTotalAmount = model.ReportTotalAmount;
142 | ReportCurrency = model.ReportCurrency;
143 | }
144 | }
145 |
146 | public partial class ReportModelView : ObservableObject
147 | {
148 | [ObservableProperty]
149 | string? localDeviceId = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
150 |
151 | [ObservableProperty]
152 | UserModel? user;
153 |
154 | [ObservableProperty]
155 | string? reportTitle;
156 |
157 | [ObservableProperty]
158 | string? reportDescription;
159 |
160 | [ObservableProperty]
161 | DateTimeOffset date;
162 |
163 | [ObservableProperty]
164 | double reportTotalAmount;
165 | [ObservableProperty]
166 | double reportCurrency;
167 | public ReportModelView()
168 | {
169 |
170 | }
171 |
172 | public ReportModelView(ReportModel model)
173 | {
174 | LocalDeviceId = model.LocalDeviceId;
175 | User = model.User;
176 | ReportTitle = model.ReportTitle;
177 | ReportDescription = model.ReportDescription;
178 | Date = model.Date;
179 | ReportTotalAmount = model.ReportTotalAmount;
180 | ReportCurrency = model.ReportCurrency;
181 | //ReportComments = model.ReportComments.Select(x => new ReportComments(x)).ToList();
182 | }
183 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
364 | /FlowHub.DataAccess/Platforms/Android/OnlineDataAccessRepository.cs
365 | /FlowHub.DataAccess/Platforms/Windows/OnlineDataAccessRepository.cs
366 | /FlowHub.DataAccess/Repositories/OnlineCredentialsRepository.cs
367 | /FlowHub.DataAccess/Platforms/Android/OnlineDataAccessRepository.cs
368 | /FlowHub.DataAccess/Platforms/Windows/OnlineDataAccessRepository.cs
369 | /FlowHub.DataAccess/
370 | /FlowHub.Main/
371 | /FlowHub.Models/
372 | /FlowHub-MAUI/Utilities/OtherUtils/APIKeys.cs
373 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Utilities/Models/FlowModel.cs:
--------------------------------------------------------------------------------
1 | namespace FlowHub_MAUI.Utilities.Models;
2 |
3 | public partial class FlowsModel : RealmObject
4 | {
5 | [PrimaryKey]
6 | public string? LocalDeviceId { get; set; } = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
7 | public string? UserID { get; set; }
8 | public DateTimeOffset Date { get; set; }
9 | public DateTimeOffset? DeadLine { get; set; }
10 | public string? ReceiptImageUrl { get; set; }
11 | public bool IsFlowIn { get; set; }=false; // FlowIn = Income or FlowOut = Expense
12 | public bool IsDebt { get; set; }=false;
13 | public bool IsRecurring { get; set; }=false;
14 | public int RecurrenceNumber { get; set; }=0;
15 | public string? ForUserID { get; set; }
16 | public string? Description { get; set; }
17 | public double Amount { get; set; }
18 | public string? Notes { get; set; }
19 | public string? PaymentMethod { get; set; } = "Card";
20 | public string? DateCreated { get; set; } = DateTime.UtcNow.ToString("o");
21 | public string? DeviceName { get; set; } = DeviceInfo.Current.Name;
22 | public string? DeviceFormFactor { get; set; } = DeviceInfo.Current.Idiom.ToString();
23 | public string? DeviceModel { get; set; } = DeviceInfo.Current.Model;
24 | public string? DeviceManufacturer { get; set; } = DeviceInfo.Current.Manufacturer;
25 | public string? DeviceVersion { get; set; } = DeviceInfo.Current.VersionString;
26 | // Backing field for the category
27 | public string? Category { get; set; }
28 | // ACL for sharing permissions
29 | [Ignored]
30 | public ParseACL Acl { get; set; } = new ParseACL();
31 | public string? FlowBaseID { get; set; }
32 | public string? FlowModelCommentLinkID { get; set; }
33 | public IList? Tags { get; }
34 | public FlowsModel()
35 | {
36 |
37 | }
38 | public FlowsModel(FlowsModel model)
39 | {
40 |
41 | if (Tags is not null)
42 | {
43 | Tags.Clear();
44 | if (model.Tags is not null)
45 | {
46 | var s = model.Tags.ToList();
47 | foreach (var item in s)
48 | {
49 | var q = item;
50 | Tags.Add(q);
51 | }
52 | }
53 |
54 | }
55 |
56 | LocalDeviceId = model.LocalDeviceId;
57 | Category = model.Category;
58 | DeadLine = model.DeadLine;
59 | ReceiptImageUrl = model.ReceiptImageUrl;
60 |
61 | FlowBaseID = model.FlowBaseID;
62 | IsDebt = model.IsDebt;
63 | IsFlowIn = model.IsFlowIn;
64 | }
65 | public FlowsModel(FlowsModelView model)
66 | {
67 | LocalDeviceId = model.LocalDeviceId;
68 | Category = model.Category;
69 | DeadLine = model.DeadLine;
70 | ReceiptImageUrl = model.ReceiptImageUrl;
71 | FlowModelCommentLinkID = model.FlowModelCommentLinkID;
72 | Tags = model.Tags.Select(x=>x).ToList();
73 | IsDebt = model.IsDebt;
74 | IsFlowIn= model.IsFlowIn;
75 |
76 |
77 | }
78 | // Override Equals to compare based on string
79 | public override bool Equals(object? obj)
80 | {
81 | if (obj is FlowsModelView other)
82 | {
83 | return this.LocalDeviceId == other.LocalDeviceId;
84 | }
85 | return false;
86 | }
87 |
88 | // Override GetHashCode to use string's hash code
89 | public override int GetHashCode()
90 | {
91 | return LocalDeviceId!.GetHashCode();
92 | }
93 | }
94 |
95 |
96 | /*
97 | *
98 | Allow User B to comment
99 | flow.Acl.SetWriteAccess(userB, true);
100 |
101 | // Save the flow
102 | realm.Write(() => realm.Add(flow));
103 | await flow.SaveAsync(); // Parse sync
104 | *
105 | *
106 | *
107 | * */
108 |
109 |
110 | public partial class FlowModelAndCommentLink:RealmObject
111 | {
112 | [PrimaryKey]
113 | public string? LocalDeviceId { get; set; } = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
114 | public string? FlowID { get; set; }
115 | public string? CommentID { get; set; }
116 | public FlowModelAndCommentLink()
117 | {
118 |
119 | }
120 |
121 |
122 | }
123 |
124 |
125 | public partial class FlowsModelView : ObservableObject
126 | {
127 | [ObservableProperty]
128 | string? localDeviceId = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
129 | [ObservableProperty]
130 | string? category;
131 | [ObservableProperty]
132 | DateTimeOffset? deadLine;
133 | [ObservableProperty]
134 | string? receiptImageThumbnailPath;
135 | [ObservableProperty]
136 | string? receiptImageUrl;
137 | [ObservableProperty]
138 | string? receiptImageThumbnailUrl;
139 | [ObservableProperty]
140 | bool isDebt = false;
141 | [ObservableProperty]
142 | bool isFlowIn= false;
143 | [ObservableProperty]
144 | string? flowModelCommentLinkID;
145 | [ObservableProperty]
146 | string? location;
147 | [ObservableProperty]
148 | List tags = new();
149 | [ObservableProperty]
150 | bool isRecurring = false;
151 | [ObservableProperty]
152 | string? recurringInterval; // Could be Enum-backed
153 |
154 | [ObservableProperty]
155 | string? forUserID;
156 |
157 | [ObservableProperty]
158 | string? description;
159 |
160 | [ObservableProperty]
161 | double amount;
162 |
163 | [ObservableProperty]
164 | string? dateCreated= DateTime.UtcNow.ToString("o");
165 | [ObservableProperty]
166 | string? notes;
167 | [ObservableProperty]
168 | string? paymentMethod="Card";
169 | [ObservableProperty]
170 | ParseACL? aCL;
171 |
172 | public FlowsModelView()
173 | {
174 | if (Connectivity.Current.NetworkAccess == NetworkAccess.Internet)
175 | {
176 | if (ParseClient.Instance is not null)
177 | {
178 | var currentUser = ParseClient.Instance.GetCurrentUser();
179 | if (currentUser is not null)
180 | {
181 | ACL = new();
182 | ACL.SetReadAccess(currentUser.ObjectId, true);
183 | ACL.SetWriteAccess(currentUser.ObjectId, true);
184 |
185 | }
186 |
187 | }
188 |
189 | }
190 | }
191 | public FlowsModelView(FlowsModel model)
192 | {
193 | LocalDeviceId = model.LocalDeviceId;
194 |
195 | Category = model.Category;
196 |
197 | DeadLine = model.DeadLine;
198 | ReceiptImageUrl = model.ReceiptImageUrl;
199 |
200 | FlowModelCommentLinkID = model.FlowModelCommentLinkID;
201 | IsDebt = model.IsDebt;
202 | IsRecurring = model.IsRecurring;
203 |
204 | IsFlowIn = model.IsFlowIn;
205 |
206 | ForUserID = model.ForUserID;
207 | Description = model.Description;
208 | Amount = model.Amount;
209 | DateCreated = model.DateCreated;
210 | Notes = model.Notes;
211 | PaymentMethod = model.PaymentMethod;
212 |
213 | if (model.Tags is not null)
214 | {
215 | Tags = model.Tags.ToList();
216 | }
217 | model.FlowBaseID = model.FlowBaseID;
218 | }
219 | // Override Equals to compare based on string
220 | public override bool Equals(object? obj)
221 | {
222 | if (obj is FlowsModelView other)
223 | {
224 | return this.LocalDeviceId == other.LocalDeviceId;
225 | }
226 | return false;
227 | }
228 |
229 | // Override GetHashCode to use string's hash code
230 | public override int GetHashCode()
231 | {
232 | return LocalDeviceId!.GetHashCode();
233 | }
234 | }
235 | // Method to map back to FlowsModel for saving to the database
236 |
237 | public partial class FlowComments: RealmObject
238 | {
239 | [PrimaryKey]
240 | public string? LocalDeviceId { get; set; } = GeneralStaticUtilities.GenerateRandomString(nameof(FlowsModelView));
241 | public string? UserIDCommenting { get; set; }
242 | public string? Comment { get; set; }
243 | public DateTimeOffset DateOfComment { get; set; }=DateTimeOffset.Now;
244 | public bool IsDeleted { get; set; } = false;
245 |
246 |
247 | public string? DateCreated { get; set; } = DateTime.UtcNow.ToString("o");
248 | public string? DeviceName { get; set; } = DeviceInfo.Current.Name;
249 | public string? DeviceFormFactor { get; set; } = DeviceInfo.Current.Idiom.ToString();
250 | public string? DeviceModel { get; set; } = DeviceInfo.Current.Model;
251 | public string? DeviceManufacturer { get; set; } = DeviceInfo.Current.Manufacturer;
252 | public string? DeviceVersion { get; set; } = DeviceInfo.Current.VersionString;
253 | public FlowComments()
254 | {
255 |
256 | }
257 | public FlowComments(FlowCommentsView model)
258 | {
259 | LocalDeviceId = model.LocalDeviceId;
260 | UserIDCommenting = model.UserIDCommenting;
261 | Comment = model.Comment;
262 |
263 | IsDeleted = model.IsDeleted;
264 | }
265 | }
266 |
267 | public partial class FlowCommentsView: ObservableObject
268 | {
269 | [ObservableProperty]
270 | string? localDeviceId = GeneralStaticUtilities.GenerateRandomString(nameof(FlowCommentsView));
271 | [ObservableProperty]
272 | string? userIDCommenting;
273 | [ObservableProperty]
274 | string? comment;
275 | [ObservableProperty]
276 | bool isDeleted;
277 |
278 | public FlowCommentsView()
279 | {
280 |
281 | }
282 | public FlowCommentsView(FlowComments model)
283 | {
284 | LocalDeviceId = model.LocalDeviceId;
285 | UserIDCommenting = model.UserIDCommenting!;
286 | Comment = model.Comment;
287 |
288 | IsDeleted = model.IsDeleted;
289 | }
290 | }
--------------------------------------------------------------------------------
/FlowHub-MAUI/ViewModel/HomePageVM.cs:
--------------------------------------------------------------------------------
1 | using Parse.Abstractions.Internal;
2 | using Parse.LiveQuery;
3 | using System.Diagnostics;
4 |
5 | namespace FlowHub_MAUI.ViewModel;
6 |
7 | public partial class HomePageVM : ObservableObject, IParseLiveQueryClientCallbacks
8 | {
9 | [ObservableProperty]
10 | bool isAuthenticated;
11 |
12 | [ObservableProperty]
13 | ObservableCollection? allFlows=new();
14 | [ObservableProperty]
15 | FlowsModelView? selectedFlow=new();
16 |
17 | [ObservableProperty]
18 | bool isBusy;
19 | [ObservableProperty]
20 | bool isRefreshing;
21 | [ObservableProperty]
22 | bool isFlowSelected;
23 | [ObservableProperty]
24 | bool isFlowDeleted;
25 | [ObservableProperty]
26 | bool isFlowAdded;
27 | [ObservableProperty]
28 | bool isFlowUpdated;
29 | [ObservableProperty]
30 | ObservableCollection? allCommentsForSpecificFlow=new();
31 | [ObservableProperty]
32 | ObservableCollection? allComments=new();
33 | [ObservableProperty]
34 | ObservableCollection? allFlowAndCommentsLinks=new();
35 |
36 | [ObservableProperty]
37 | FlowCommentsView singleFlowComment = new();
38 | [ObservableProperty]
39 | bool isConnectedOnline;
40 | [ObservableProperty]
41 | ParseUser? currentUserOnline=new();
42 | [ObservableProperty]
43 | UserModelView? currentUserLocal=new();
44 |
45 | [ObservableProperty]
46 | string? username;
47 | [ObservableProperty]
48 | string? userpassword;
49 | [ObservableProperty]
50 | string? useremail;
51 |
52 | public HomePageVM(IFlowsService flowsService)
53 | {
54 | FlowsService = flowsService;
55 |
56 | }
57 | async Task Testt()
58 | {
59 |
60 | var query = ParseClient.Instance.GetQuery("FlowCommentsView")
61 | .WhereEqualTo("IsDeleted", false);
62 | var results = await query.FindAsync();
63 | Debug.WriteLine($"Found {results.Count()} objects.");
64 |
65 | }
66 | public ParseLiveQueryClient? LiveClient { get; set; }
67 |
68 | [RelayCommand]
69 | public void QuickSignUp()
70 | {
71 | ParseUser signUpUser = new ParseUser();
72 | //signUpUser.Username = CurrentUserLocal.UserName;
73 | ParseClient.Instance.SignUpAsync(signUpUser);
74 | }
75 | [RelayCommand]
76 | void SetupLiveQueries()
77 | {
78 |
79 | LiveClient = new ParseLiveQueryClient();
80 | SetupLiveQuery();
81 | }
82 |
83 | [RelayCommand]
84 | public void SyncFlows()
85 | {
86 | FlowsService.SyncAllData();
87 | if (FlowsService.AllFlows is not null)
88 | {
89 | AllFlows = FlowsService.AllFlows!.ToObservableCollection();
90 | }
91 | if (FlowsService.AllFlowComments is not null)
92 | {
93 | AllComments = FlowsService.AllFlowComments!.ToObservableCollection();
94 | }
95 | if (FlowsService.AllFlowAndCommentsLink is not null)
96 | {
97 | AllFlowAndCommentsLinks = FlowsService.AllFlowAndCommentsLink!.ToObservableCollection();
98 | }
99 | }
100 |
101 | public IFlowsService FlowsService { get; }
102 |
103 | [RelayCommand]
104 | public async Task LoginUser()
105 | {
106 | if (CurrentUserLocal is null)
107 | {
108 | CurrentUserLocal = new();
109 | }
110 |
111 | CurrentUserLocal.UserName= Username;
112 | CurrentUserLocal.UserPassword = Userpassword;
113 |
114 | ParseUser signUpUser = new ParseUser();
115 | //signUpUser.Username = CurrentUserLocal.UserName;
116 | signUpUser.Email = "me@me.com";
117 | signUpUser.Username = "YBTopaz8";
118 | signUpUser.Password = "Yvan";
119 | //signUpUser.Password = CurrentUserLocal.UserPassword;
120 | if (await FlowsService.LogUserIn(signUpUser, signUpUser.Password!))
121 | {
122 | //Debug.WriteLine("Login OK");
123 |
124 | var e = await ParseClient.Instance.CurrentUserController.GetCurrentSessionTokenAsync(ParseClient.Instance.Services);
125 | Debug.WriteLine(e);
126 | var ee = await ParseClient.Instance.GetCurrentSessionAsync();
127 |
128 | Debug.WriteLine(ee.SessionToken);
129 | Debug.WriteLine(ee.ObjectId);
130 | Debug.WriteLine(ee.Keys.FirstOrDefault());
131 | }
132 | }
133 | partial void OnCurrentUserOnlineChanged(ParseUser? oldValue, ParseUser? newValue)
134 | {
135 | Debug.WriteLine($"Old {oldValue?.IsAuthenticated} New {newValue?.IsAuthenticated}");
136 | }
137 |
138 |
139 | partial void OnCurrentUserOnlineChanging(ParseUser? oldValue, ParseUser? newValue)
140 | {
141 | if (newValue is not null)
142 | {
143 | if (newValue.IsAuthenticated)
144 | {
145 |
146 | //best to use this and away a little for parse client to validate auth
147 | IsAuthenticated = true;
148 | CurrentUserLocal.UserIDOnline = CurrentUserOnline.ObjectId;
149 | CurrentUserLocal.LocalDeviceId = CurrentUserOnline.ObjectId;
150 | CurrentUserLocal.UserPassword = Userpassword;
151 | CurrentUserLocal.IsAuthenticated = CurrentUserOnline.IsAuthenticated;
152 | CurrentUserLocal.UserEmail = CurrentUserLocal.UserEmail;
153 | CurrentUserLocal.UserName = CurrentUserLocal.UserName;
154 |
155 | FlowsService.UpdateUser(CurrentUserLocal);
156 | _ = Shell.Current.DisplayAlert("Login", "Login Successful", "OK");
157 | }
158 | else
159 | {
160 | IsAuthenticated = false;
161 | }
162 | }
163 | }
164 | [RelayCommand]
165 | public async Task SignUpUser()
166 | {
167 | if (CurrentUserLocal is null)
168 | {
169 | CurrentUserLocal = new();
170 | }
171 |
172 | CurrentUserLocal.UserName= Username;
173 | CurrentUserLocal.UserPassword = Userpassword;
174 | CurrentUserLocal.UserEmail = Useremail;
175 |
176 | ParseUser signUpUser= new ParseUser();
177 | signUpUser.Username = CurrentUserLocal.UserName;
178 | signUpUser.Password = CurrentUserLocal.UserPassword;
179 | signUpUser.Email = CurrentUserLocal.UserEmail;
180 |
181 | if (await FlowsService.SignUpUser(signUpUser))
182 | {
183 | Debug.WriteLine("Sign Up OK");
184 | }
185 |
186 | }
187 | [RelayCommand]
188 |
189 | public void AddFlow()
190 | {
191 | if (SingleFlowComment is not null)
192 | {
193 | SingleFlowComment.UserIDCommenting = CurrentUserLocal!.UserIDOnline;
194 |
195 |
196 | }
197 | FlowsService.SaveBoth(SelectedFlow!, SingleFlowComment!);
198 |
199 | AllFlows!.Add(SelectedFlow!);
200 | SelectedFlow = new();
201 | Shell.Current.DisplayAlert("Add", "Flow Added Normal", "OK");
202 | }
203 |
204 | [RelayCommand]
205 | public void UpdateFlow()
206 | {
207 | FlowsService.UpdateFlow(SelectedFlow!);
208 | SelectedFlow = new();
209 |
210 | Shell.Current.DisplayAlert("Update", "Flow Updated Normal", "OK");
211 | }
212 | [RelayCommand]
213 | public void DeleteFlow()
214 | {
215 | FlowsService.UpdateFlow(SelectedFlow!);
216 | SelectedFlow = new();
217 | }
218 | public void AddFlowComment(FlowsModelView baseFlow)
219 | {
220 | AddFlow();
221 | SingleFlowComment = new();
222 | }
223 | [RelayCommand]
224 | public void QuickLogin()
225 | {
226 | _ = LoginUser();
227 | return;
228 |
229 | }
230 | [RelayCommand]
231 | public void UpdateCommentUI()
232 | {
233 | FlowService.MapToParseObject(SingleFlowComment, nameof(FlowCommentsView)).SaveAsync();
234 | SingleFlowComment = new();
235 | }
236 | [RelayCommand]
237 | public void DeleteCommentUI()
238 | {
239 | SingleFlowComment.IsDeleted = true;
240 | FlowService.MapToParseObject(SingleFlowComment, nameof(FlowCommentsView)).SaveAsync();
241 | SingleFlowComment = new();
242 |
243 | }
244 | [RelayCommand]
245 | public void AddCommentUI()
246 | {
247 | SingleFlowComment.UserIDCommenting = CurrentUserLocal!.UserIDOnline;
248 |
249 | var comm = FlowService.MapToParseObject(SingleFlowComment, nameof(FlowCommentsView));
250 | comm["UserIDCommenting"] = "Yvan";
251 | _ = comm.SaveAsync();
252 | //SingleFlowComment = new();
253 | }
254 | //public void DeleteFlowComment(FlowsModelView baseFlow)
255 | //{
256 |
257 | // if (SingleFlowComment is not null)
258 | // {
259 | // SingleFlowComment.UserIDCommenting = CurrentUserLocal!.UserIDOnline;
260 | // SingleFlowComment.DateOfComment = DateTimeOffset.Now;
261 | // FlowsService.(SingleFlowComment);
262 | // }
263 | // AllFlows!.Add(SelectedFlow!);
264 | // FlowsService.UpdateFlow(baseFlow);
265 |
266 | //}
267 |
268 | [RelayCommand]
269 | public void UpdateUserAccount()
270 | {
271 | FlowsService.UpdateUser(CurrentUserLocal!);
272 | }
273 | [RelayCommand]
274 | public void LogoutUser()
275 | {
276 | FlowService.LogUserOut();
277 | }
278 | [ObservableProperty]
279 | List flowCategory = new()
280 | {
281 | "Food",
282 | "Transportation",
283 | "Entertainment",
284 | "Healthcare",
285 | "Education",
286 | "Rent",
287 | "Other"
288 | };
289 | public ObservableCollection Comments { get; private set; } = new ObservableCollection();
290 |
291 | private async void SetupLiveQuery()
292 | {
293 | try
294 | {
295 | var query = ParseClient.Instance.GetQuery("FlowCommentsView")
296 | //.WhereEqualTo("IsDeleted", false);
297 | var sub = LiveClient.Subscribe(query);
298 | LiveClient.RegisterListener(this);
299 |
300 |
301 | sub.HandleSubscribe(query =>
302 | {
303 | Debug.WriteLine($"Subscribed to query: {query.GetClassName()}");
304 | })
305 | .HandleEvents((query, objEvent, obj) =>
306 | {
307 | Debug.WriteLine($"Event {objEvent} occurred for object: {obj.ObjectId}");
308 | })
309 | .HandleError((query, exception) =>
310 | {
311 | Debug.WriteLine($"Error in query for class {query.GetClassName()}: {exception.Message}");
312 | })
313 | .HandleUnsubscribe(query =>
314 | {
315 | Debug.WriteLine($"Unsubscribed from query: {query.GetClassName()}");
316 | });
317 |
318 | // Connect asynchronously
319 | await Task.Run(()=> LiveClient.ConnectIfNeeded());
320 | }
321 | catch (IOException ex)
322 | {
323 | Console.WriteLine($"Connection error: {ex.Message}");
324 | }
325 | catch (Exception ex)
326 | {
327 | Debug.WriteLine($"SetupLiveQuery encountered an error: {ex.Message}");
328 | }
329 | }
330 |
331 | public void OnLiveQueryClientConnected(ParseLiveQueryClient client)
332 | {
333 | Debug.WriteLine("Client Connected");
334 | }
335 |
336 | public void OnLiveQueryClientDisconnected(ParseLiveQueryClient client, bool userInitiated)
337 | {
338 | Debug.WriteLine("Client Disconnected");
339 | }
340 |
341 | public void OnLiveQueryError(ParseLiveQueryClient client, LiveQueryException reason)
342 | {
343 | Debug.WriteLine("Error "+reason.Message);
344 | }
345 |
346 | public void OnSocketError(ParseLiveQueryClient client, Exception reason)
347 | {
348 | Debug.WriteLine("Socket Error ");
349 | }
350 | }
351 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/Resources/Styles/Styles.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
10 |
11 |
15 |
16 |
21 |
22 |
25 |
26 |
51 |
52 |
69 |
70 |
90 |
91 |
112 |
113 |
134 |
135 |
141 |
142 |
163 |
164 |
182 |
183 |
186 |
187 |
193 |
194 |
200 |
201 |
205 |
206 |
228 |
229 |
244 |
245 |
265 |
266 |
269 |
270 |
293 |
294 |
314 |
315 |
321 |
322 |
341 |
342 |
345 |
346 |
374 |
375 |
395 |
396 |
400 |
401 |
413 |
414 |
419 |
420 |
426 |
427 |
428 |
--------------------------------------------------------------------------------
/FlowHub-MAUI/DataAccess/Services/FlowService.cs:
--------------------------------------------------------------------------------
1 | using Parse.Abstractions.Platform.Authentication;
2 | using Parse.LiveQuery;
3 | using System.Diagnostics;
4 |
5 | namespace FlowHub_MAUI.DataAccess.Services;
6 |
7 | public class FlowService : IFlowsService
8 | {
9 | Realm? db;
10 | public IList? AllFlows { get; set ; }
11 | public IList? AllFlowComments { get; set ; }
12 | public IList? AllFlowAndCommentsLink { get; set ; }
13 | HomePageVM? ViewModel { get; set; }
14 | public IDataBaseService DataBaseService { get; }
15 |
16 | public FlowService(IDataBaseService dataBaseService)
17 | {
18 | DataBaseService = dataBaseService;
19 |
20 | GetUserAccount();
21 | GetFlows();
22 | }
23 |
24 |
25 | //bool HasOnlineSyncOn;
26 | public ParseUser? CurrentUserOnline { get; set; }
27 |
28 | public UserModelView? CurrentOfflineUser { get; set; }
29 | public void InitApp(HomePageVM vm)
30 | {
31 | ViewModel = vm;
32 |
33 | }
34 |
35 | public UserModelView? GetUserAccount(ParseUser? usr = null)
36 | {
37 | // If current offline user is already authenticated and no user is passed, return it
38 | if (CurrentOfflineUser is not null && CurrentOfflineUser.IsAuthenticated && usr is null)
39 | {
40 | return CurrentOfflineUser;
41 | }
42 |
43 | // Access the Realm database instance
44 | db = Realm.GetInstance(DataBaseService.GetRealm());
45 |
46 | // Attempt to find the existing user in the database
47 | var dbUser = db.All().FirstOrDefault();
48 |
49 | if (dbUser is not null)
50 | {
51 | // Convert the database user to the current offline user
52 | CurrentOfflineUser = new UserModelView(dbUser);
53 | return CurrentOfflineUser;
54 | }
55 |
56 | // If no existing user is found in the database
57 | if (usr is not null)
58 | {
59 | // Create a new UserModelView from the provided ParseUser
60 | CurrentOfflineUser = new UserModelView(usr);
61 |
62 | // Write the new user to the database
63 | db.Write(() =>
64 | {
65 | var user = new UserModel(CurrentOfflineUser);
66 | db.Add(user, update: true); // Update if user already exists
67 | });
68 |
69 | return CurrentOfflineUser;
70 | }
71 |
72 | // Create a default offline user if no user is found or provided
73 | CurrentOfflineUser = CreateDefaultOfflineUser();
74 |
75 | // Save the default user to the database
76 | db.Write(() =>
77 | {
78 | var user = new UserModel(CurrentOfflineUser);
79 | db.Add(user, update: false); // Do not update; create new
80 | });
81 |
82 | return CurrentOfflineUser;
83 | }
84 |
85 | ///
86 | /// Creates a default offline user.
87 | ///
88 | private UserModelView CreateDefaultOfflineUser()
89 | {
90 | return new UserModelView
91 | {
92 | UserName = "User",
93 | UserEmail = "user@FlowHub.com",
94 | UserPassword = "1234"
95 | };
96 | }
97 |
98 |
99 | public async Task SignUpUser(ParseUser user)
100 | {
101 | try
102 | {
103 | _ = ParseClient.Instance.SignUpAsync(user);
104 | // notify to verify email
105 | await Shell.Current.DisplayAlert("Last Step!", "Please Verify Your Email!", "Ok");
106 | _ = ParseClient.Instance.LogOutAsync();
107 | return true;
108 | }
109 | catch (Exception ex)
110 | {
111 | Debug.WriteLine("Error when registering user: " + ex.Message);
112 | return false;
113 | }
114 | }
115 |
116 | public static void LogUserOut()
117 | {
118 | _ = ParseClient.Instance.LogOutAsync();
119 | }
120 | public async Task LogUserIn(ParseUser user, string password)
121 | {
122 |
123 | CurrentUserOnline = await ParseClient.Instance.LogInAsync(user.Username, password);
124 | //var isVerified =(bool)CurrentUserOnline["emailVerified"] == true;
125 | //if (isVerified)
126 | //{
127 | // await Shell.Current.DisplayAlert("Success!", "Logged In!", "Ok");
128 | //}
129 | //else
130 | //{
131 | // await Shell.Current.DisplayAlert("Error!", "Please Verify Your Email!", "Ok");
132 | // return false;
133 | //}
134 |
135 | return true;
136 | }
137 | public void GetFlows()
138 | {
139 | try
140 | {
141 | db = Realm.GetInstance(DataBaseService.GetRealm());
142 | AllFlows?.Clear();
143 | var realflows = db.All().OrderBy(x=>x.DateCreated).ToList();
144 | db.Write(() =>
145 | {
146 | AllFlows = new List(realflows.Select(flow => new FlowsModelView(flow)));
147 |
148 | });
149 | AllFlows ??= Enumerable.Empty().ToList();
150 | }
151 | catch (Exception ex)
152 | {
153 | throw new Exception(ex.Message);
154 | }
155 | }
156 |
157 | public string AddFlowComment(FlowCommentsView comment)
158 | {
159 | try
160 | {
161 | db = Realm.GetInstance(DataBaseService.GetRealm());
162 | string localDeviceId = string.Empty;
163 | db.Write(() =>
164 | {
165 | var existingFlow = db.All()
166 | .Where(x => x.LocalDeviceId == comment.LocalDeviceId)
167 | .ToList();
168 | if (existingFlow.Count < 1)
169 | {
170 | FlowComments flow = new FlowComments(comment);
171 | db.Add(flow);
172 | localDeviceId = flow.LocalDeviceId!;
173 | Debug.WriteLine("OK Saved flow db add");
174 | }
175 | else
176 | {
177 | FlowComments dbFlow = new FlowComments(comment);
178 | db.Add(dbFlow, update: true);
179 | localDeviceId = dbFlow.LocalDeviceId!;
180 | Debug.WriteLine("OK Saved flowc db up");
181 | }
182 | });
183 |
184 | if (CurrentUserOnline is not null && CurrentUserOnline.IsAuthenticated)
185 | {
186 | _ = SendSingleObjectToParse(nameof(FlowCommentsView), comment);
187 | Debug.WriteLine("OK Saved flow online add");
188 | }
189 |
190 | return localDeviceId;
191 | }
192 | catch (Exception ex)
193 | {
194 | Debug.WriteLine("Error when updating song: " + ex.Message);
195 | return string.Empty;
196 | }
197 | }
198 | public void SaveBoth(FlowsModelView flow, FlowCommentsView comment)
199 | {
200 | try
201 | {
202 |
203 | var fCommentId= AddFlowComment(comment);
204 | flow.FlowModelCommentLinkID = fCommentId;
205 |
206 | UpdateFlow(flow);
207 |
208 | FlowModelAndCommentLink link = new()
209 | {
210 | FlowID = flow.LocalDeviceId,
211 | CommentID = fCommentId
212 | };
213 |
214 | AddFlowModelAndCommendlink(link);
215 |
216 | }
217 | catch (Exception ex)
218 | {
219 | Debug.WriteLine("Error when updating song: " + ex.Message);
220 |
221 | }
222 | }
223 |
224 | public string AddFlowModelAndCommendlink(FlowModelAndCommentLink link)
225 | {
226 | try
227 | {
228 | db = Realm.GetInstance(DataBaseService.GetRealm());
229 | string localDeviceId = string.Empty;
230 | db.Write(() =>
231 | {
232 | db.Add(link);
233 | localDeviceId = link.LocalDeviceId!;
234 | Debug.WriteLine("OK Saved link db");
235 | });
236 |
237 |
238 | if (CurrentUserOnline is not null && CurrentUserOnline.IsAuthenticated)
239 | {
240 | _ = SendSingleObjectToParse(nameof(FlowModelAndCommentLink), link);
241 | Debug.WriteLine("OK Saved link online");
242 | }
243 | Debug.WriteLine("OK Saved link okk");
244 | return localDeviceId;
245 | }
246 | catch (Exception ex)
247 | {
248 | Debug.WriteLine("Error when updating song: " + ex.Message);
249 | return string.Empty;
250 | }
251 | }
252 |
253 | public string UpdateFlow(FlowsModelView flow)
254 | {
255 | try
256 | {
257 | db = Realm.GetInstance(DataBaseService.GetRealm());
258 | string localDeviceId = string.Empty;
259 | db.Write(() =>
260 | {
261 | var existingFlow = db.All()
262 | .Where(x => x.LocalDeviceId == flow.LocalDeviceId)
263 | .ToList();
264 |
265 | if (existingFlow.Count < 1)
266 | {
267 | FlowsModel floww = new FlowsModel(flow);
268 | db.Add(floww);
269 | localDeviceId = flow.LocalDeviceId!;
270 | Debug.WriteLine("OK Saved flow db add");
271 | }
272 | if (existingFlow?.Count > 0)
273 | {
274 | FlowsModel dbFlow= new FlowsModel(flow);
275 |
276 | db.Add(dbFlow, update: true);
277 | localDeviceId = flow.LocalDeviceId!;
278 | Debug.WriteLine("OK Saved flow db up");
279 | }
280 | });
281 |
282 | if (CurrentUserOnline is not null)
283 | {
284 | if (CurrentUserOnline.IsAuthenticated)
285 | {
286 | _ = SendSingleObjectToParse(nameof(FlowsModelView), flow);
287 | Debug.WriteLine("OK Saved flow online");
288 | }
289 | }
290 | return localDeviceId;
291 | }
292 | catch (Exception ex)
293 | {
294 | Debug.WriteLine("Error when updating song: " + ex.Message);
295 | return ex.Message;
296 | }
297 | }
298 | public async Task LoadFlowsToDBFromOnline()
299 | {
300 | var AllItems = await ParseClient.Instance.CallCloudCodeFunctionAsync>
301 | (
302 | "getFlowsForUser", new Dictionary
303 | {
304 |
305 | }
306 | );
307 |
308 |
309 | //var UniqueItems = AllItems.DistinctBy(x => x["DeviceFormFactor"]).ToList();
310 | if (AllItems != null && AllItems.Count != 0)
311 | {
312 | AllFlows?.Clear();
313 | // Get the realm database instance.
314 | db = Realm.GetInstance(DataBaseService.GetRealm());
315 | db.Write(() =>
316 | {
317 | foreach (var item in AllItems)
318 | {
319 | try
320 | {
321 | FlowsModelView? itemmm = MapToModelFromParseObject((ParseObject)item); //duration is off
322 | AllFlows?.Add(itemmm);
323 | FlowsModel itemm = new FlowsModel(itemmm);
324 |
325 | var existingSongs = db.All()
326 | .Where(s => s.LocalDeviceId == itemmm.LocalDeviceId)
327 | .ToList();
328 |
329 | if (existingSongs.Count < 1)
330 | {
331 | db.Add(itemm);
332 | }
333 | else
334 | {
335 | db.Add(itemm, update: true);
336 | }
337 | }
338 | catch (Exception ex)
339 | {
340 | Debug.WriteLine($"Error processing artist: {ex.Message}");
341 | }
342 | }
343 | });
344 | }
345 | //GetFlows();
346 | }
347 | public async Task SyncAllData()
348 | {
349 | await LoadFlowsToDBFromOnline();
350 | await LoadFlowCommentsToDBFromOnline();
351 | await LoadFlowAndCommentsLinksToDBFromOnline();
352 | }
353 | public async Task LoadFlowCommentsToDBFromOnline()
354 | {
355 |
356 | var query = ParseClient.Instance.GetQuery("FlowCommentsView")
357 | .WhereEqualTo("ACL", CurrentUserOnline.ObjectId);
358 |
359 | var AllItems = await query.FindAsync();
360 |
361 |
362 | //var UniqueItems = AllItems.DistinctBy(x => x["DeviceFormFactor"]).ToList();
363 | if (AllItems != null && AllItems.Any())
364 | {
365 | AllFlows?.Clear();
366 | // Get the realm database instance.
367 | db = Realm.GetInstance(DataBaseService.GetRealm());
368 | db.Write(() =>
369 | {
370 | foreach (var item in AllItems)
371 | {
372 | try
373 | {
374 | FlowCommentsView? itemmm = MapToModelFromParseObject((ParseObject)item); //duration is off
375 | AllFlowComments?.Add(itemmm);
376 | FlowComments itemm = new FlowComments(itemmm);
377 |
378 | var existingSongs = db.All()
379 | .Where(s => s.LocalDeviceId == itemmm.LocalDeviceId)
380 | .ToList();
381 |
382 | if (existingSongs.Count < 1)
383 | {
384 | db.Add(itemm);
385 | }
386 | else
387 | {
388 | db.Add(itemm, update: true);
389 | }
390 | }
391 | catch (Exception ex)
392 | {
393 | Debug.WriteLine($"Error processing artist: {ex.Message}");
394 | }
395 | }
396 | });
397 | }
398 | //GetFlows();
399 | }
400 | public async Task LoadFlowAndCommentsLinksToDBFromOnline()
401 | {
402 |
403 | var query = ParseClient.Instance.GetQuery("FlowModelAndCommentLink")
404 | .WhereEqualTo("ACL", CurrentUserOnline!.ObjectId);
405 |
406 | var AllItems = await query.FindAsync();
407 |
408 |
409 | //var UniqueItems = AllItems.DistinctBy(x => x["DeviceFormFactor"]).ToList();
410 | if (AllItems != null && AllItems.Any())
411 | {
412 | AllFlows?.Clear();
413 | // Get the realm database instance.
414 | db = Realm.GetInstance(DataBaseService.GetRealm());
415 | db.Write(() =>
416 | {
417 | foreach (var item in AllItems)
418 | {
419 | try
420 | {
421 | FlowModelAndCommentLink? itemmm = MapToModelFromParseObject((ParseObject)item); //duration is off
422 | AllFlowAndCommentsLink?.Add(itemmm);
423 |
424 | var existingSongs = db.All()
425 | .Where(s => s.LocalDeviceId == itemmm.LocalDeviceId)
426 | .ToList();
427 |
428 | if (existingSongs.Count < 1)
429 | {
430 | db.Add(itemmm);
431 | }
432 | else
433 | {
434 | db.Add(itemmm, update: true);
435 | }
436 | }
437 | catch (Exception ex)
438 | {
439 | Debug.WriteLine($"Error processing artist: {ex.Message}");
440 | }
441 | }
442 | });
443 | }
444 | //GetFlows();
445 | }
446 | public static ParseObject MapToParseObject(T model, string className)
447 | {
448 | var parseObject = new ParseObject(className);
449 |
450 | // Get the properties of the class
451 | var properties = typeof(T).GetProperties();
452 |
453 | foreach (var property in properties)
454 | {
455 | try
456 | {
457 | var value = property.GetValue(model);
458 |
459 | // Skip null values or Realm-specific/unsupported types
460 | if (value == null || IsRealmSpecificType(property.PropertyType))
461 | {
462 | continue;
463 | }
464 |
465 | // Handle special types like DateTimeOffset
466 | if (property.PropertyType == typeof(DateTimeOffset))
467 | {
468 | var val = (DateTimeOffset)value;
469 | parseObject[property.Name] = val.Date;
470 | continue;
471 | }
472 |
473 | // Handle string as string (required for Parse compatibility)
474 | if (property.PropertyType == typeof(string))
475 | {
476 | parseObject[property.Name] = value.ToString();
477 | continue;
478 | }
479 |
480 | // Add a fallback check for unsupported complex types
481 | if (value.GetType().Namespace?.StartsWith("Realms") == true)
482 | {
483 | Debug.WriteLine($"Skipped unsupported Realm type: {property.Name}");
484 | continue;
485 | }
486 |
487 | // For other types, directly set the value
488 | parseObject[property.Name] = value;
489 | }
490 | catch (Exception ex)
491 | {
492 | // Log the exception for this particular property, but continue with the next one
493 | Debug.WriteLine($"Error when mapping property '{property.Name}': {ex.Message}");
494 | }
495 | }
496 |
497 | return parseObject;
498 | }
499 |
500 | public static T MapToModelFromParseObject(ParseObject parseObject) where T : new()
501 | {
502 | var model = new T();
503 | var properties = typeof(T).GetProperties();
504 |
505 | foreach (var property in properties)
506 | {
507 | try
508 | {
509 | // Skip Realm-specific properties
510 | if (IsRealmSpecificType(property.PropertyType))
511 | {
512 | continue;
513 | }
514 |
515 | // Check if the ParseObject contains the property name
516 | if (parseObject.ContainsKey(property.Name))
517 | {
518 | var value = parseObject[property.Name];
519 |
520 | if (value != null)
521 | {
522 | // Handle special types like DateTimeOffset
523 | if (property.PropertyType == typeof(DateTimeOffset) && value is DateTime dateTime)
524 | {
525 | property.SetValue(model, new DateTimeOffset(dateTime));
526 | continue;
527 | }
528 |
529 | // Handle string as string
530 | if (property.PropertyType == typeof(string) && value is string objectIdStr)
531 | {
532 | property.SetValue(model, new string(objectIdStr));
533 | continue;
534 | }
535 |
536 | if (property.CanWrite && property.PropertyType.IsAssignableFrom(value.GetType()))
537 | {
538 | property.SetValue(model, value);
539 | }
540 |
541 | }
542 | }
543 | }
544 | catch (Exception ex)
545 | {
546 | // Log and skip the property
547 | Debug.WriteLine($"Error mapping property '{property.Name}': {ex.Message}");
548 | }
549 | }
550 |
551 | return model;
552 | }
553 |
554 | public static bool IsRealmSpecificType(Type type)
555 | {
556 |
557 | return type.IsSubclassOf(typeof(RealmObject)) || type.IsGenericType && type.GetGenericTypeDefinition() == typeof(RealmList<>) || type == typeof(DynamicObjectApi);
558 | }
559 |
560 |
561 | public bool SyncAllDataToDatabaseAsync(IEnumerable flows,
562 | IEnumerableflowComments)
563 | {
564 | try
565 | {
566 | db = Realm.GetInstance(DataBaseService.GetRealm());
567 | // Ensure UserModel exists
568 | var user = db.All().FirstOrDefault();
569 | if (user == null)
570 | {
571 | db.Write(() =>
572 | {
573 | user = new UserModel
574 | {
575 | // Set other properties as needed
576 | };
577 | db.Add(user);
578 | });
579 | }
580 | db.Write(() =>
581 | {
582 | AddOrUpdateMultipleRealmItems(
583 | flows.Select(x => new FlowsModel(x)),
584 | flow => db.All().Any(x => x.LocalDeviceId == flow.LocalDeviceId)
585 | );
586 | });
587 | return true;
588 | }
589 | catch (Exception ex)
590 | {
591 | Debug.WriteLine($"Error syncing data to database: {ex.Message}");
592 | return false;
593 | }
594 | }
595 |
596 |
597 | ///
598 | /// Maps Collection of ModelView objects to ParseObjects then Sends to Online DB
599 | ///
600 | ///
601 | ///
602 | ///
603 | ///
604 | public async Task SendMultipleObjectsToParse(IEnumerable items, string modelName)
605 | {
606 | try
607 | {
608 | foreach (var item in items)
609 | {
610 | try
611 | {
612 | // Map and save each item to Parse
613 | await SendSingleObjectToParse(modelName, item);
614 | }
615 | catch (Exception ex)
616 | {
617 | Debug.WriteLine($"Error saving {modelName} action: {ex.Message}");
618 | }
619 | }
620 | Debug.WriteLine($"{modelName}sToOnline saved!");
621 | await Shell.Current.DisplayAlert("Success!", "Synced!", "Ok");
622 | return true;
623 | }
624 | catch (Exception ex)
625 | {
626 | Debug.WriteLine($"Exception during sync for {modelName}: {ex.Message}");
627 | return false;
628 | }
629 | }
630 |
631 | ///
632 | /// Maps Single ModelView object to ParseObject then Sends to Online DB
633 | ///
634 | ///
635 | ///
636 | ///
637 | ///
638 | public static async Task SendSingleObjectToParse(string modelName, T? item)
639 | {
640 | var parseObj = MapToParseObject(item, modelName);
641 | await parseObj.SaveAsync();
642 | }
643 | ///
644 | /// Adds or updates a collection of items in the specified Realm database.
645 | ///
646 | /// The type of the Realm object being added or updated. Must inherit from RealmObject.
647 | ///
648 | /// A collection of items of type that need to be synchronized with the Realm database.
649 | ///
650 | ///
651 | /// A condition used to determine if an item already exists in the database. This is a delegate that accepts
652 | /// an item of type and returns a boolean value indicating whether the item exists.
653 | ///
654 | ///
655 | /// An optional delegate that allows additional custom updates to an item if it already exists in the database.
656 | /// If provided, this delegate will be invoked before the item is added or updated in the database.
657 | ///
658 | ///
659 | /// This method performs a batch operation to synchronize a collection of items with the Realm database.
660 | /// It uses the to check if an item already exists in the database.
661 | /// - If an item does not exist, it is added to the database.
662 | /// - If an item exists, the (if provided) is invoked for additional updates,
663 | /// and the item is updated in the database.
664 | ///
665 | /// This method wraps all database operations within a single write transaction to ensure atomicity.
666 | ///
667 | /// Thrown if there is an error during the write transaction.
668 | ///
669 | /// Example usage:
670 | ///
671 | /// var songs = new List<SongModel> { song1, song2, song3 };
672 | /// AddOrUpdateMultipleRealmItems(
673 | /// songs,
674 | /// song => db.All<SongModel>().Any(s => s.Title == song.Title && s.ArtistName == song.ArtistName),
675 | /// existingSong =>
676 | /// {
677 | /// existingSong.PlayCount = song.PlayCount; // Example custom update
678 | /// });
679 | ///
680 | ///
681 |
682 | public void AddOrUpdateMultipleRealmItems(IEnumerable items, Func existsCondition, Action? updateAction = null) where T : RealmObject
683 | {
684 | try
685 | {
686 |
687 | db = Realm.GetInstance(DataBaseService.GetRealm());
688 | db.Write(() =>
689 | {
690 | foreach (var item in items)
691 | {
692 | if (!db.All().Any(existsCondition))
693 | {
694 | db.Add(item);
695 | Debug.WriteLine($"Added {typeof(T).Name}");
696 | }
697 | else
698 | {
699 | updateAction?.Invoke(item); // Perform additional updates if needed
700 | db.Add(item, update: true); // Update existing item
701 | Debug.WriteLine($"Updated {typeof(T).Name}");
702 | }
703 | }
704 | });
705 | }
706 | catch (Exception ex)
707 | {
708 |
709 | throw new Exception(ex.Message);
710 | }
711 | }
712 |
713 | public void AddOrUpdateSingleRealmItem(Realm db, T item, Func existsCondition, Action? updateAction = null) where T : RealmObject
714 | {
715 |
716 | db = Realm.GetInstance(DataBaseService.GetRealm());
717 | db.Write(() =>
718 | {
719 | if (!db.All().Any(existsCondition))
720 | {
721 | db.Add(item);
722 | Debug.WriteLine($"Added {typeof(T).Name}");
723 | }
724 | else
725 | {
726 | updateAction?.Invoke(item); // Perform additional updates if needed
727 | db.Add(item, update: true); // Update existing item
728 | Debug.WriteLine($"Updated {typeof(T).Name}");
729 | }
730 | });
731 | }
732 |
733 |
734 | public void UpdateUser(UserModelView user)
735 | {
736 | db = Realm.GetInstance(DataBaseService.GetRealm());
737 | db.Write(() =>
738 | {
739 |
740 | db.RemoveAll();
741 |
742 | UserModel userm = new UserModel(user);
743 | db.Add(userm);
744 | });
745 | if (CurrentUserOnline is not null)
746 | {
747 | if (CurrentUserOnline.IsAuthenticated)
748 | {
749 | _ = SendSingleObjectToParse("_User", user);
750 | }
751 | }
752 | }
753 | }
754 |
--------------------------------------------------------------------------------