LSFE/LSFE.MobApp/AppShell.xaml.cs
2026-07-30 10:31:04 +08:00

33 lines
1.5 KiB
C#

using LSFE.MobApp.Pages.Admin;
using LSFE.MobApp.Pages.Attendance;
using LSFE.MobApp.Pages.Authentication;
using LSFE.MobApp.Pages.CoveragePlan;
namespace LSFE.MobApp
{
public partial class AppShell : Shell
{
private readonly Services.INavigationService _navigationService;
public AppShell(Services.INavigationService navigationService)
{
InitializeComponent();
_navigationService = navigationService;
// Register routes
Routing.RegisterRoute(nameof(LoginPage), typeof(LoginPage));
Routing.RegisterRoute(nameof(ForgotPasswordPage), typeof(ForgotPasswordPage));
Routing.RegisterRoute(nameof(DeviceRegistrationPage), typeof(DeviceRegistrationPage));
Routing.RegisterRoute(nameof(AddEditDoctorPage), typeof(AddEditDoctorPage));
Routing.RegisterRoute(nameof(ViewDoctorPage), typeof(ViewDoctorPage));
Routing.RegisterRoute(nameof(MarketProductPage), typeof(MarketProductPage));
Routing.RegisterRoute(nameof(DoctorSignaturePage), typeof(DoctorSignaturePage));
Routing.RegisterRoute(nameof(ActualCoveragePage), typeof(ActualCoveragePage));
Routing.RegisterRoute(nameof(AttendancePage), typeof(AttendancePage));
}
private void OnCloseFlyout(object sender, EventArgs e)
{
Shell.Current.FlyoutIsPresented = false;
_navigationService.NavigateToLoginPageAsync();
}
}
}