INIT GITEA

This commit is contained in:
2026-09-12 18:19:29 +02:00
parent b2faeb2986
commit 02ba8d4fe5
405 changed files with 125279 additions and 125267 deletions
@@ -1,42 +1,42 @@
using CommunityToolkit.Maui.Core;
using CommunityToolkit.Maui.Views;
namespace WorkFlowCheck.MAUI.Pages.System;
public partial class InputPopup : Popup
{
private TaskCompletionSource<(bool IsConfirmed, string Result)> _taskCompletionSource;
public InputPopup(string userConfirmationLabel)
{
InitializeComponent();
_taskCompletionSource = new();
UserConfirmationLabel.Text = userConfirmationLabel;
this.Closed += OnPopupClosed;
}
public Task<(bool IsConfirmed, string Result)> ShowAsync()
{
Application.Current.MainPage.ShowPopup(this);
return _taskCompletionSource.Task;
}
private void OnOkClicked(object sender, EventArgs e)
{
Close((true, UserInputEntry.Text));
}
private void OnCancelClicked(object sender, EventArgs e)
{
Close((false, ""));
}
private void OnPopupClosed(object sender, PopupClosedEventArgs e)
{
if (e?.Result is ValueTuple<bool, string> value)
{
_taskCompletionSource.TrySetResult(value);
}
else
{
_taskCompletionSource.TrySetResult((false, null));
}
}
using CommunityToolkit.Maui.Core;
using CommunityToolkit.Maui.Views;
namespace WorkFlowCheck.MAUI.Pages.System;
public partial class InputPopup : Popup
{
private TaskCompletionSource<(bool IsConfirmed, string Result)> _taskCompletionSource;
public InputPopup(string userConfirmationLabel)
{
InitializeComponent();
_taskCompletionSource = new();
UserConfirmationLabel.Text = userConfirmationLabel;
this.Closed += OnPopupClosed;
}
public Task<(bool IsConfirmed, string Result)> ShowAsync()
{
Application.Current.MainPage.ShowPopup(this);
return _taskCompletionSource.Task;
}
private void OnOkClicked(object sender, EventArgs e)
{
Close((true, UserInputEntry.Text));
}
private void OnCancelClicked(object sender, EventArgs e)
{
Close((false, ""));
}
private void OnPopupClosed(object sender, PopupClosedEventArgs e)
{
if (e?.Result is ValueTuple<bool, string> value)
{
_taskCompletionSource.TrySetResult(value);
}
else
{
_taskCompletionSource.TrySetResult((false, null));
}
}
}