From 92c15072b8d5d10918b23fc64c38db1a49594bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Wed, 2 Apr 2025 16:52:25 +0200 Subject: [PATCH] =?UTF-8?q?Bek=C3=BCld=C3=A9s=20=20=C3=A9s=20ment=C3=A9s?= =?UTF-8?q?=20jav=C3=ADt=C3=A1sa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/CheckList/CheckListWorkPage.xaml.cs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs index f1934c3..4095c1d 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs @@ -101,19 +101,22 @@ public partial class CheckListWorkPage : ContentPage IsLoading = true; try { - foreach (var checkListRow in CheckListRows) + await Task.Run(async () => { - if (checkListRow.AnswerYes == true) + foreach (var checkListRow in CheckListRows) { - checkListRow.Answer = "Igen"; + if (checkListRow.AnswerYes == true) + { + checkListRow.Answer = "Igen"; + } + if (checkListRow.AnswerNo == true) + { + checkListRow.Answer = "Nem"; + } + await _checkListService.UpdateCheckListRow(checkListRow); } - if (checkListRow.AnswerNo == true) - { - checkListRow.Answer = "Nem"; - } - await _checkListService.UpdateCheckListRow(checkListRow); - } - await LoadCheckPointCheckListRows(); + await LoadCheckPointCheckListRows(); + }); } catch (Exception) { @@ -162,7 +165,7 @@ public partial class CheckListWorkPage : ContentPage using var resizedImage = surface.Snapshot(); using var data = resizedImage.Encode(SKEncodedImageFormat.Jpeg, 100); - checkListRowDTO.Photo = data.ToArray(); + checkListRowDTO.Photo = data.ToArray(); await _checkListService.UpdateCheckListRow(checkListRowDTO); await LoadCheckPointCheckListRows(); @@ -201,7 +204,7 @@ public partial class CheckListWorkPage : ContentPage IsLoading = false; } - + } public class BindableRadioButton : RadioButton {