21 lines
562 B
C#
21 lines
562 B
C#
using Microsoft.Maui.Controls;
|
|
using cfs_tracker.ViewModels;
|
|
|
|
namespace cfs_tracker.Views;
|
|
|
|
public partial class QuickEntryPage : ContentPage, IQueryAttributable
|
|
{
|
|
private readonly QuickEntryViewModel _viewModel;
|
|
|
|
public QuickEntryPage(QuickEntryViewModel viewModel)
|
|
{
|
|
InitializeComponent();
|
|
BindingContext = _viewModel = viewModel;
|
|
}
|
|
|
|
public void ApplyQueryAttributes(IDictionary<string, object> query)
|
|
{
|
|
query.TryGetValue("date", out var value);
|
|
_viewModel.SetDateFromQuery(value?.ToString());
|
|
}
|
|
} |