UI rendberakása
This commit is contained in:
@@ -2,9 +2,43 @@
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.BaseStockPage"
|
||||
BackgroundColor="#f0f0f0"
|
||||
Title="Törzs adatok">
|
||||
<VerticalStackLayout Margin="10,0,10,0">
|
||||
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
|
||||
<Shell.TitleView>
|
||||
<Grid Padding="2" VerticalOptions="Center">
|
||||
<Label Text="Törzs adatok"
|
||||
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>
|
||||
<VerticalStackLayout Margin="50,50,50,10">
|
||||
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True" CornerRadius="10">
|
||||
<VerticalStackLayout Margin="10,10,10,0">
|
||||
<Button
|
||||
x:Name="ButtonGetCheckPoints"
|
||||
@@ -13,20 +47,20 @@
|
||||
SemanticProperties.Hint="Ellenőrzési pontok"
|
||||
Clicked="OnButtonGetCheckPoints"
|
||||
HorizontalOptions="Fill" />
|
||||
<Button
|
||||
<!--<Button
|
||||
x:Name="ButtonGetEquipments"
|
||||
Margin="0,0,0,10"
|
||||
Text="Berendezések"
|
||||
SemanticProperties.Hint="Berendezések"
|
||||
Clicked="OnButtonGetEquipments"
|
||||
HorizontalOptions="Fill" />
|
||||
<Button
|
||||
HorizontalOptions="Fill" />-->
|
||||
<!--<Button
|
||||
x:Name="ButtonGetLocations"
|
||||
Margin="0,0,0,10"
|
||||
Text="Lokációk"
|
||||
SemanticProperties.Hint="Lokációk"
|
||||
Clicked="OnButtonGetLocations"
|
||||
HorizontalOptions="Fill" />
|
||||
HorizontalOptions="Fill" />-->
|
||||
<Button
|
||||
x:Name="ButtonGetUsers"
|
||||
Margin="0,0,0,10"
|
||||
|
||||
@@ -1,15 +1,32 @@
|
||||
using Android.DeviceLock;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.MAUI.Pages.Security;
|
||||
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||
|
||||
namespace WorkFlowCheck.MAUI.Pages.BaseStock;
|
||||
|
||||
public partial class BaseStockPage : ContentPage
|
||||
{
|
||||
private IUserService _userService;
|
||||
private UserDTO _currentUser;
|
||||
|
||||
public BaseStockPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
|
||||
}
|
||||
private void SetInfo()
|
||||
{
|
||||
_currentUser = _userService.GetCurrentUser();
|
||||
DeviceId.Text = _userService.DeviceId;
|
||||
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||
}
|
||||
|
||||
override protected async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
SetInfo();
|
||||
}
|
||||
private async void OnButtonGetCheckPoints(object sender, EventArgs e)
|
||||
{
|
||||
//await Shell.Current.GoToAsync("//CheckPointsPage");
|
||||
|
||||
Reference in New Issue
Block a user