2025-02-01 18:13:36 +01:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using Windows.UI.Xaml.Controls;
|
|
|
|
|
|
using Wino.Core.Domain.Interfaces;
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
namespace Wino.Mail.Dialogs;
|
|
|
|
|
|
|
|
|
|
|
|
public sealed partial class MessageSourceDialog : ContentDialog
|
2025-02-01 18:13:36 +01:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
private readonly IClipboardService _clipboardService = App.Current.Services.GetService<IClipboardService>();
|
|
|
|
|
|
public string MessageSource { get; set; }
|
|
|
|
|
|
public bool Copied { get; set; }
|
|
|
|
|
|
public MessageSourceDialog()
|
2025-02-01 18:13:36 +01:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
this.InitializeComponent();
|
|
|
|
|
|
}
|
2025-02-01 18:13:36 +01:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
|
|
|
|
|
{
|
|
|
|
|
|
_clipboardService.CopyClipboardAsync(MessageSource);
|
|
|
|
|
|
Copied = true;
|
2025-02-01 18:13:36 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|