UI rendberakása

This commit is contained in:
2025-04-11 10:55:40 +02:00
parent 9d107e8c0b
commit 6d276e73b8
15 changed files with 273 additions and 21 deletions
@@ -2,7 +2,41 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WorkFlowCheck.MAUI.Pages.System.DownloadAPKPage"
BackgroundColor="#f0f0f0"
Title="Program letöltés">
<Shell.TitleView>
<Grid Padding="2" VerticalOptions="Center">
<Label Text="Program letöltés"
FontSize="22"
FontAttributes="Bold"
VerticalOptions="Center"
HorizontalOptions="Start" />
<HorizontalStackLayout
VerticalOptions="Center"
HorizontalOptions="End"
Spacing="5">
<Frame CornerRadius="1"
Padding="5"
HasShadow="True"
VerticalOptions="Center"
HorizontalOptions="End">
<Label x:Name="DeviceId"
FontSize="10"
TextColor="Black"/>
</Frame>
<Frame CornerRadius="1"
Padding="5"
HasShadow="True"
VerticalOptions="Center"
HorizontalOptions="End">
<Label x:Name="UserInfo"
FontSize="10"
FontAttributes="Bold"
TextColor="Black"/>
</Frame>
</HorizontalStackLayout>
</Grid>
</Shell.TitleView>
<ScrollView>
<Grid>
<Grid.RowDefinitions>
@@ -1,3 +1,4 @@
using WorkFlowCheck.Common.DTO;
using WorkFlowCheck.MAUI.Services.Interfaces;
namespace WorkFlowCheck.MAUI.Pages.System;
@@ -5,10 +6,25 @@ namespace WorkFlowCheck.MAUI.Pages.System;
public partial class DownloadAPKPage : ContentPage
{
private ISyncService _syncService;
private IUserService _userService;
private UserDTO _currentUser;
public DownloadAPKPage()
{
InitializeComponent();
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
}
override protected async void OnAppearing()
{
base.OnAppearing();
SetInfo();
}
private void SetInfo()
{
_currentUser = _userService.GetCurrentUser();
DeviceId.Text = _userService.DeviceId;
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
}
private async void OnSyncClicked(object sender, EventArgs e)
{
@@ -4,6 +4,39 @@
x:Class="WorkFlowCheck.MAUI.Pages.System.SyncPage"
Title="Adatok szinkronizálása"
BackgroundColor="#f0f0f0">
<Shell.TitleView>
<Grid Padding="2" VerticalOptions="Center">
<Label Text="Adatok szinkronizálása"
FontSize="22"
FontAttributes="Bold"
VerticalOptions="Center"
HorizontalOptions="Start" />
<HorizontalStackLayout
VerticalOptions="Center"
HorizontalOptions="End"
Spacing="5">
<Frame CornerRadius="1"
Padding="5"
HasShadow="True"
VerticalOptions="Center"
HorizontalOptions="End">
<Label x:Name="DeviceId"
FontSize="10"
TextColor="Black"/>
</Frame>
<Frame CornerRadius="1"
Padding="5"
HasShadow="True"
VerticalOptions="Center"
HorizontalOptions="End">
<Label x:Name="UserInfo"
FontSize="10"
FontAttributes="Bold"
TextColor="Black"/>
</Frame>
</HorizontalStackLayout>
</Grid>
</Shell.TitleView>
<ScrollView>
<Grid>
<Grid.RowDefinitions>
@@ -1,3 +1,5 @@
using Android.DeviceLock;
using WorkFlowCheck.Common.DTO;
using WorkFlowCheck.MAUI.Services.Interfaces;
namespace WorkFlowCheck.MAUI.Pages.System;
@@ -5,12 +7,26 @@ namespace WorkFlowCheck.MAUI.Pages.System;
public partial class SyncPage : ContentPage
{
private ISyncService _syncService;
private IUserService _userService;
private UserDTO _currentUser;
public SyncPage()
{
InitializeComponent();
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
}
override protected async void OnAppearing()
{
base.OnAppearing();
SetInfo();
}
private void SetInfo()
{
_currentUser = _userService.GetCurrentUser();
DeviceId.Text = _userService.DeviceId;
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
}
private async void OnSyncClicked(object sender, EventArgs e)
{
SyncBtn.IsEnabled = false;