From 27515d443a8eab66f4195490a989f0be6561ff45 Mon Sep 17 00:00:00 2001 From: Paulius Klezys Date: Mon, 22 May 2017 11:20:29 +0200 Subject: Cykavej 78 --- .../ApartmentManager/View/BoardMemberManageApartment.xaml | 6 +++++- .../View/BoardMemberManageApartment.xaml.cs | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml index 49923cf..a6aec28 100644 --- a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml +++ b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml @@ -14,17 +14,21 @@ + - + + + + diff --git a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs index e275537..81fa3a8 100644 --- a/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs +++ b/ApartmentManager/ApartmentManager/View/BoardMemberManageApartment.xaml.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; @@ -12,6 +13,7 @@ using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; +using ApartmentManager.Model; // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 @@ -36,5 +38,18 @@ namespace ApartmentManager.View { this.Frame.Navigate(typeof(BoardMemberCreateApartmentPage)); } + + private bool ApartmentFilter(object item) + { + if (String.IsNullOrEmpty(TextFilter.Text)) + return true; + else + return ((item as Apartment).BoardMemberCatalogSingleton.IndexOf(TextFilter.Text, StringComparison.OrdinalIgnoreCase) >= 0); + } + + private void txtFilter_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) + { + CollectionViewSource.GetDefaultView(lvUsers.ItemsSource).Refresh(); + } } } -- cgit v1.2.3