2026-02-12 18:04:29 +01:00
|
|
|
using Windows.UI.Xaml.Controls;
|
|
|
|
|
using Wino.Calendar.ViewModels.Data;
|
2025-01-14 00:53:54 +01:00
|
|
|
using Wino.Calendar.Views.Abstract;
|
|
|
|
|
|
2025-05-18 14:06:25 +02:00
|
|
|
namespace Wino.Calendar.Views;
|
|
|
|
|
|
|
|
|
|
public sealed partial class EventDetailsPage : EventDetailsPageAbstract
|
2025-01-14 00:53:54 +01:00
|
|
|
{
|
2025-05-18 14:06:25 +02:00
|
|
|
public EventDetailsPage()
|
2025-01-14 00:53:54 +01:00
|
|
|
{
|
2025-05-18 14:06:25 +02:00
|
|
|
this.InitializeComponent();
|
2025-01-14 00:53:54 +01:00
|
|
|
}
|
2026-02-12 18:04:29 +01:00
|
|
|
|
|
|
|
|
private void AttachmentClicked(object sender, ItemClickEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.ClickedItem is CalendarAttachmentViewModel attachmentViewModel)
|
|
|
|
|
{
|
|
|
|
|
ViewModel?.OpenAttachmentCommand.Execute(attachmentViewModel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OpenCalendarAttachment_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (sender is MenuFlyoutItem item && item.CommandParameter is CalendarAttachmentViewModel attachment)
|
|
|
|
|
{
|
|
|
|
|
ViewModel?.OpenAttachmentCommand.Execute(attachment);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SaveCalendarAttachment_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (sender is MenuFlyoutItem item && item.CommandParameter is CalendarAttachmentViewModel attachment)
|
|
|
|
|
{
|
|
|
|
|
ViewModel?.SaveAttachmentCommand.Execute(attachment);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-14 00:53:54 +01:00
|
|
|
}
|