Még egy kis UI rendezés
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.CheckPoints.CheckPointEditPage"
|
||||
xmlns:local="clr-namespace:WorkFlowCheck.MAUI.Pages.BaseStock.CheckPoints"
|
||||
xmlns:templateselectors="clr-namespace:WorkFlowCheck.MAUI.TemplateSelectors"
|
||||
BackgroundColor="#f0f0f0"
|
||||
Title="{Binding CheckPointDTO.ShortName}">
|
||||
<StackLayout Padding="20">
|
||||
<!-- Cím: Edit Item -->
|
||||
@@ -25,13 +26,13 @@
|
||||
<ColumnDefinition Width="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Text="Save" Command="{Binding SaveCommand}" Grid.Column="0"/>
|
||||
<Button Text="Cancel" Command="{Binding CancelCommand}" Grid.Column="2"/>
|
||||
<!--<Button Text="Save" Command="{Binding SaveCommand}" Grid.Column="0"/>
|
||||
<Button Text="Cancel" Command="{Binding CancelCommand}" Grid.Column="2"/>-->
|
||||
</Grid>
|
||||
<Label Text="Ellenőrzési feladatok" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
|
||||
<Frame BorderColor="Gray" Padding="1" Margin="2" HasShadow="True" CornerRadius="2">
|
||||
<CollectionView x:Name="CheckPointCheckListRows"
|
||||
HeightRequest="440"
|
||||
HeightRequest="490"
|
||||
|
||||
ItemTemplate="{StaticResource AnswerTemplateSelector}">
|
||||
<CollectionView.EmptyView>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.CheckPointsPage"
|
||||
BackgroundColor="#f0f0f0"
|
||||
Title="Ellenőrzési pontok">
|
||||
<Grid>
|
||||
<!-- Fő tartalom -->
|
||||
|
||||
@@ -5,6 +5,7 @@ using WorkFlowCheck.MAUI.Pages.BaseStock.CheckPoints;
|
||||
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||
using Plugin.NFC;
|
||||
using WorkFlowCheck.MAUI.Pages.NFC;
|
||||
using AndroidX.Camera.Core.Impl;
|
||||
|
||||
namespace WorkFlowCheck.MAUI.Pages.BaseStock;
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
|
||||
<!-- Jobb oldali oszlop: Két gomb egymás mellett -->
|
||||
<HorizontalStackLayout Grid.Column="1" HorizontalOptions="End" Spacing="5">
|
||||
<Button Text="Blokkolás"
|
||||
Margin="5,0,0,0"
|
||||
BackgroundColor="Red"
|
||||
IsVisible="{Binding CheckStatus, Converter={StaticResource BlockedHideConverter}}"
|
||||
Command="{Binding BindingContext.BlockCommand, Source={x:Reference CheckList}}"
|
||||
CommandParameter="{Binding .}">
|
||||
</Button>
|
||||
<Button Text="Feloldás"
|
||||
Margin="5,0,0,0"
|
||||
BackgroundColor="Green"
|
||||
|
||||
@@ -19,6 +19,7 @@ public partial class CheckListPage : ContentPage
|
||||
public ICommand NewCommand { get; set; }
|
||||
public ICommand ContinueCommand { get; set; }
|
||||
public ICommand UnblockCommand { get; set; }
|
||||
public ICommand BlockCommand { get; set; }
|
||||
public bool IsLoading
|
||||
{
|
||||
get => _isLoading;
|
||||
@@ -38,6 +39,7 @@ public partial class CheckListPage : ContentPage
|
||||
NewCommand = new Command<CheckListTemplateHeaderDTO>(OnNewItem);
|
||||
ContinueCommand = new Command<CheckListHeaderDTO>(OnContinueItem);
|
||||
UnblockCommand = new Command<CheckListHeaderDTO>(OnUnblockItem);
|
||||
BlockCommand = new Command<CheckListHeaderDTO>(OnBlockItem);
|
||||
|
||||
}
|
||||
protected override bool OnBackButtonPressed()
|
||||
@@ -80,6 +82,10 @@ public partial class CheckListPage : ContentPage
|
||||
private async void OnUnblockItem(CheckListHeaderDTO checkListHeaderDTO)
|
||||
{
|
||||
|
||||
}
|
||||
private async void OnBlockItem(CheckListHeaderDTO checkListHeaderDTO)
|
||||
{
|
||||
|
||||
}
|
||||
private async Task LoadCheckListTemplate()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.NFC.NFCTestPage"
|
||||
Title="NFCTestPage">
|
||||
BackgroundColor="#f0f0f0"
|
||||
Title="NFC teszt ">
|
||||
|
||||
<RefreshView x:Name="refreshView" Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
|
||||
<CollectionView x:Name="NFCDataListCollection" ItemsSource="{Binding NFCDataList}">
|
||||
<CollectionView.ItemTemplate>
|
||||
|
||||
@@ -134,7 +134,7 @@ public partial class NFCTestPage : ContentPage
|
||||
|
||||
// Customized serial number
|
||||
var identifier = tagInfo.Identifier;
|
||||
var serialNumber = NFCUtils.ByteArrayToHexString(identifier, ":");
|
||||
var serialNumber = NFCUtils.ByteArrayToHexString(identifier, "");
|
||||
|
||||
if (NFCDataList == null)
|
||||
{
|
||||
@@ -158,6 +158,7 @@ public partial class NFCTestPage : ContentPage
|
||||
IsRefreshing = false;
|
||||
OnPropertyChanged(nameof(IsRefreshing));
|
||||
OnPropertyChanged(nameof(NFCDataList));
|
||||
|
||||
}
|
||||
string GetMessage(NFCNdefRecord record)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.Nfc;
|
||||
using Android.OS;
|
||||
using Plugin.NFC;
|
||||
|
||||
|
||||
namespace WorkFlowCheck.MAUI
|
||||
@@ -32,6 +33,7 @@ namespace WorkFlowCheck.MAUI
|
||||
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
CrossNFC.Init(this);
|
||||
base.OnCreate(savedInstanceState);
|
||||
nfcAdapter = NfcAdapter.GetDefaultAdapter(this);
|
||||
pendingIntent = PendingIntent.GetActivity(this, 0,
|
||||
@@ -43,7 +45,9 @@ namespace WorkFlowCheck.MAUI
|
||||
protected override void OnNewIntent(Intent intent)
|
||||
{
|
||||
base.OnNewIntent(intent);
|
||||
|
||||
|
||||
CrossNFC.OnNewIntent(intent);
|
||||
|
||||
if (intent.Action == NfcAdapter.ActionTagDiscovered)
|
||||
{
|
||||
var tag = intent.GetParcelableExtra(NfcAdapter.ExtraTag) as Tag;
|
||||
@@ -55,7 +59,15 @@ namespace WorkFlowCheck.MAUI
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
|
||||
// Plugin NFC: Restart NFC listening on resume (needed for Android 10+)
|
||||
CrossNFC.OnResume();
|
||||
}
|
||||
|
||||
public void StartNfc(Action<string> onTagRead)
|
||||
{
|
||||
_onTagRead = onTagRead;
|
||||
|
||||
Reference in New Issue
Block a user