2024-07-20 03:07:21 +02:00
|
|
|
|
using System.Collections.Generic;
|
2024-07-21 05:45:02 +02:00
|
|
|
|
using Wino.Domain.Entities;
|
|
|
|
|
|
|
2024-07-20 03:07:21 +02:00
|
|
|
|
|
|
|
|
|
|
#if NET8_0
|
|
|
|
|
|
using Microsoft.UI.Xaml.Controls;
|
|
|
|
|
|
#else
|
2024-07-20 23:32:39 +02:00
|
|
|
|
using Microsoft.UI.Xaml.Controls;
|
2024-07-20 03:07:21 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
namespace Wino.Dialogs
|
|
|
|
|
|
{
|
|
|
|
|
|
public sealed partial class AccountPickerDialog : ContentDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
public MailAccount PickedAccount { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public List<MailAccount> AvailableAccounts { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public AccountPickerDialog(List<MailAccount> availableAccounts)
|
|
|
|
|
|
{
|
|
|
|
|
|
AvailableAccounts = availableAccounts;
|
|
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void AccountClicked(object sender, ItemClickEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
PickedAccount = e.ClickedItem as MailAccount;
|
|
|
|
|
|
|
|
|
|
|
|
Hide();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|