This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/BreCalClient/SearchFilterControl.xaml.cs

69 lines
1.4 KiB
C#

// Copyright (c) 2023 schick Informatik
// Description: Search filter bar for top window, generates events if filter criteria change
//
using BreCalClient.misc.Model;
using System;
using System.Collections.Generic;
using System.Windows.Controls;
using System.Windows.Input;
namespace BreCalClient
{
/// <summary>
/// Interaction logic for SearchFilterControl.xaml
/// </summary>
public partial class SearchFilterControl : UserControl
{
#region Construction
public SearchFilterControl()
{
InitializeComponent();
}
#endregion
#region events
public event Action? LogoImageClicked;
#endregion
#region Properties
#endregion
#region public methods
public void SetBerths(List<Berth> berths)
{
this.comboBoxBerths.ItemsSource = berths;
}
public void SetAgencies(List<Participant> agencies)
{
this.comboBoxAgencies.ItemsSource = agencies;
}
#endregion
#region event handler
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)
{
LogoImageClicked?.Invoke();
}
private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
this.comboBoxCategories.ItemsSource = Enum.GetValues(typeof(Shipcall.TypeEnum));
}
#endregion
}
}