Esempio n. 1
0
        public MainWindowViewModel(ICardList iCards)
        {
            MasterCards = iCards.Cards.Select(x => new MainViewCard(x));
            Cards       = MasterCards.AsEnumerable();

            originalOwnerFilter    = MasterCards.Select(x => x.Owner).Distinct().Select(x => new CheckBoxSource(x, true)).ToList();
            originalCategoryFilter = MasterCards.Select(x => x.Category).Distinct().Select(x => new CheckBoxSource(x, true)).ToList();
            originalMainFilter     = MasterCards.Select(x => x.Main).Distinct().Select(x => new CheckBoxSource(x, true)).ToList();
            originalSubFilter      = MasterCards.Select(x => x.Sub).Distinct().Select(x => new CheckBoxSource(x, true)).ToList();
        }
Esempio n. 2
0
 private void CloseWindow(string filterEnable)
 {
     if (filterEnable == "True")
     {
         originalOwnerFilter    = EditOwnerFilter;
         originalCategoryFilter = EditCategoryFilter;
         originalMainFilter     = EditMainFilter;
         originalSubFilter      = EditSubFilter;
         Cards = MasterCards.Where(Filtering);
         RaisePropertyChanged(nameof(Cards));
     }
     CloseWindowRequest.Raise(new Notification());
 }