JobDocFilterItem.xaml.cs 807 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using Comal.Classes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Xamarin.Forms;
  8. using Xamarin.Forms.Xaml;
  9. namespace comal.timesheets
  10. {
  11. public delegate void JobDocFilterClosed(string filter, JobDocFilterType type);
  12. [XamlCompilation(XamlCompilationOptions.Compile)]
  13. public partial class JobDocFilterItem : ContentView
  14. {
  15. public event JobDocFilterClosed OnJobDocFilterClosed;
  16. public JobDocFilterType Type { get; set; }
  17. public JobDocFilterItem ()
  18. {
  19. InitializeComponent ();
  20. }
  21. public void Init(JobDocFilterType type, string text)
  22. {
  23. textLbl.Text = text;
  24. Type = type;
  25. }
  26. private void Close_Tapped(object sender, EventArgs e)
  27. {
  28. OnJobDocFilterClosed?.Invoke(textLbl.Text, Type);
  29. }
  30. }
  31. }