private void onFilterButtonClick(object sender, RoutedEventArgs e) { string name = ((FrameworkElement)e.Source).Name; _filters.setMarked(name); refreshUIElements(); }
public ShowTransactionsScreen(List <ViewTransaction> transactions) { InitializeComponent(); AvailableViewCategories = new List <Category>(); AvailableViewCategories.Add(new Category(Category.CategorySetting.ALL) { CategoryName = "* ALL", Description = "All items", Identifier = 20000 }); AvailableViewCategories.AddRange(BankApplicationState.UserConfig.Categories); _categoryDropdown.ItemsSource = AvailableViewCategories; _categoryDropdown.SelectedIndex = 0; _allTransactions = transactions; _filters = new FilterHandler(new Button[5] { _filter1, _filter2, _filter3, _filter4, _filter5 }); _filters.setMarked(0); _currentMonthSelector.SelectedIndex = DateTime.Now.Month - 1; _initialized = true; _lastYear = DateTime.Now.Year; _year.Text = _lastYear.ToString(); }