2025-11-15 14:52:01 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Microsoft.UI.Xaml.Controls;
|
|
|
|
|
using Wino.Core.Domain.Entities.Shared;
|
|
|
|
|
|
|
|
|
|
namespace Wino.Dialogs;
|
|
|
|
|
|
|
|
|
|
public sealed partial class AccountPickerDialog : ContentDialog
|
|
|
|
|
{
|
2026-02-27 20:12:43 +01:00
|
|
|
public MailAccount? PickedAccount { get; set; }
|
2025-11-15 14:52:01 +01:00
|
|
|
|
2026-02-27 20:12:43 +01:00
|
|
|
public List<MailAccount> AvailableAccounts { get; set; } = [];
|
2025-11-15 14:52:01 +01:00
|
|
|
|
|
|
|
|
public AccountPickerDialog(List<MailAccount> availableAccounts)
|
|
|
|
|
{
|
|
|
|
|
AvailableAccounts = availableAccounts;
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AccountClicked(object sender, ItemClickEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
PickedAccount = e.ClickedItem as MailAccount;
|
|
|
|
|
|
|
|
|
|
Hide();
|
|
|
|
|
}
|
|
|
|
|
}
|