mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
cce20ebdb6
- Implemented main application structure using .NET MAUI. - Added App class to manage navigation between Login and Admin pages. - Created AppDesign class for consistent UI styling. - Developed pages: LoginPage, DashboardPage, PlayersPage, RoomsPage, SettingsPage, and AdminTabbedPage. - Integrated AdminApiClient for API interactions and SecureAdminSettings for secure storage of sensitive data. - Configured Android and iOS platform-specific files including manifest and app delegate. - Added README with build instructions and authentication details.
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Maui.Controls.Hosting;
|
|
using Microsoft.Maui.Hosting;
|
|
using DorkNet.AdminMobile.Pages;
|
|
using DorkNet.AdminMobile.Services;
|
|
|
|
namespace DorkNet.AdminMobile;
|
|
|
|
public static class MauiProgram
|
|
{
|
|
public static MauiApp CreateMauiApp()
|
|
{
|
|
var builder = MauiApp.CreateBuilder();
|
|
builder.UseMauiApp<App>();
|
|
|
|
builder.Services.AddSingleton<SecureAdminSettings>();
|
|
builder.Services.AddSingleton<AdminApiClient>();
|
|
builder.Services.AddTransient<LoginPage>();
|
|
builder.Services.AddTransient<AdminTabbedPage>();
|
|
builder.Services.AddTransient<DashboardPage>();
|
|
builder.Services.AddTransient<PlayersPage>();
|
|
builder.Services.AddTransient<RoomsPage>();
|
|
builder.Services.AddTransient<SettingsPage>();
|
|
|
|
var app = builder.Build();
|
|
AppServices.Services = app.Services;
|
|
return app;
|
|
}
|
|
}
|
|
|
|
public static class AppServices
|
|
{
|
|
public static IServiceProvider Services { get; set; } = default!;
|
|
}
|