• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Data.FilterEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Data.FilterEventArgs的典型用法代码示例。如果您正苦于以下问题:C# FilterEventArgs类的具体用法?C# FilterEventArgs怎么用?C# FilterEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FilterEventArgs类属于System.Windows.Data命名空间,在下文中一共展示了FilterEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CollectionViewSource_Filter

 private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
 {
     if (e.Item is PersonViewModel)
         e.Accepted = ((PersonViewModel)e.Item).IsGuest;
     else
         e.Accepted = false;
 }
开发者ID:apazureck,项目名称:bierstrichler,代码行数:7,代码来源:PersonListview.xaml.cs


示例2: CollectionViewSource_Filter

 private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
 {
     if (e.Item is ItemViewModel)
         e.Accepted = ((ItemViewModel)e.Item).Model.Available;
     else
         e.Accepted = false;
 }
开发者ID:apazureck,项目名称:bierstrichler,代码行数:7,代码来源:DrinkList.xaml.cs


示例3: SortedApplications_OnFilter

        private void SortedApplications_OnFilter(object sender, FilterEventArgs e)
        {
            if (_vm == null && DataContext != null)
            {
                _vm = (ApplicationsViewModel)DataContext;
            }

            if (_vm == null || e.Item == null)
                return;

            if (e.Item.GetType() == typeof(DirectoryItemViewModel))
            {
                e.Accepted = false;
                return;
            }

            FileItemViewModel fileItem = (FileItemViewModel)e.Item;
            if (!fileItem.Pinned && fileItem.Accesses == 0)
            {
                e.Accepted = false;
                return;
            }

            e.Accepted = string.IsNullOrEmpty(_vm.SearchFilter) || fileItem.Name.Contains(_vm.SearchFilter);
        }
开发者ID:larrybeall,项目名称:RemoteAppLauncher,代码行数:25,代码来源:Pinned.xaml.cs


示例4: FilterIconList

        /// <summary>
        /// Filters the icon list.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="FilterEventArgs"/> instance containing the event data.</param>
        private void FilterIconList(object sender, FilterEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(FilterString))
                return;

            var icon = (IconInfo)e.Item;
            e.Accepted = !string.IsNullOrWhiteSpace(icon.Name) && icon.Name.ToUpper(CultureInfo.InvariantCulture).Contains(FilterString.ToUpper(CultureInfo.InvariantCulture));
        }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:IconListViewModel.cs


示例5: CharactersSource_Filter

		private void CharactersSource_Filter(object sender, FilterEventArgs e)
		{
			Character character = e.Item as Character;
			if (character != null)
				e.Accepted = !character.IsMob;
			else
				e.Accepted = true;
		}
开发者ID:codelicious,项目名称:TSW.CombatTracker,代码行数:8,代码来源:CombatDisplay.xaml.cs


示例6: IconSource_OnFilter

        private void IconSource_OnFilter(object sender, FilterEventArgs e)
        {
            var icon = e.Item as IconDescription;

            if (icon == null) return;

            e.Accepted = icon.Description.ToLower().Contains(FilterText.Text.ToLower());
        }
开发者ID:ImaginaryDevelopment,项目名称:Font-Awesome-WPF,代码行数:8,代码来源:MainWindow.xaml.cs


示例7: RecentItems_Filter

        private void RecentItems_Filter(object sender, FilterEventArgs e)
        {
            ItemViewModel itemVM = e.Item as ItemViewModel;

            if (itemVM == null)
                e.Accepted = false;
            else
                e.Accepted = itemVM.Item.LastModified > DateTime.Now.Subtract(recentTimeSpan);
        }
开发者ID:yadyn,项目名称:ItsBeen,代码行数:9,代码来源:RecentListView.xaml.cs


示例8: ShowOnlyBargainsFilter

 private void ShowOnlyBargainsFilter(object sender, FilterEventArgs e)
 {
     var product = e.Item as AuctionItem;
     if (product != null)
     {
         // Filter out products with price 25 or above
         e.Accepted = product.CurrentPrice < 25;
     }
 }
开发者ID:ClemensT,项目名称:WPF-Samples,代码行数:9,代码来源:MainWindow.cs


示例9: PlayerList_Filter

        void PlayerList_Filter(object sender, FilterEventArgs e)
        {
            var player = e.Item as GlobalPlayer;

            if (player == null)
                e.Accepted = false;
            else if (!player.Name.Contains(_searchFilter, StringComparison.OrdinalIgnoreCase))
                e.Accepted = false;
        }
开发者ID:Hertizch,项目名称:HrtzCraft,代码行数:9,代码来源:MainWindow.xaml.cs


示例10: FilteredItems_Filter

        private void FilteredItems_Filter(object sender, FilterEventArgs e)
        {
            ItemViewModel itemVM = e.Item as ItemViewModel;
            string category = (CategoryComboBox.SelectedValue ?? String.Empty).ToString();

            if (itemVM == null)
                e.Accepted = false;
            else
                e.Accepted = itemVM.Item.Category == category;
        }
开发者ID:yadyn,项目名称:ItsBeen,代码行数:10,代码来源:CategoryListView.xaml.cs


示例11: FilterItem

        private void FilterItem(object sender, FilterEventArgs e)
        {
            if (Filter == null) {
                e.Accepted = true;

                return;
            }

            e.Accepted = Filter(e.Item);
        }
开发者ID:strager,项目名称:NoCap,代码行数:10,代码来源:Filterer.cs


示例12: OnFilter

 private void OnFilter(object sender, FilterEventArgs e)
 {
     var item = e.Item as ProductName;
     if (item != null)
     {
         if (!item.Name.ContainsIgnoreKey(searchQuery))
         {
             e.Accepted = false;
         }
     }
 }
开发者ID:hva,项目名称:warehouse.net,代码行数:11,代码来源:ProductPickerViewModel.cs


示例13: Filter

        private void Filter(object obj, FilterEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(_searchText))
            {
                e.Accepted = true;
                return;
            }

            JsonManga manga = e.Item as JsonManga;
            e.Accepted = (manga != null && manga.Title.ToLowerInvariant().Contains(_searchText.ToLowerInvariant()));
        }
开发者ID:BinaryTENSHi,项目名称:MangaEden,代码行数:11,代码来源:ListViewModel.cs


示例14: CollectionViewSource_Filter

        private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
        {
            var res = true;
            var versionToDiaply = this.VersionToDisplay;

            var a = e.Item as CommentViewModel;
            if (a != null)
            {
                res = versionToDiaply <= 0 || a.VersionNumber == versionToDiaply;
            }
            e.Accepted = res;
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:12,代码来源:CommentsViewer.xaml.cs


示例15: ApplyFilter

        void ApplyFilter(object sender, FilterEventArgs e)
        {
            UserInfo svm = (UserInfo)e.Item;

            if (string.IsNullOrWhiteSpace(this.Filter) || this.Filter.Length == 0)
            {
                e.Accepted = true;
            }
            else
            {
                e.Accepted = svm.Name.Contains(Filter) || svm.Pinyin.Contains(Filter) || svm.UserName.Contains(Filter) || svm.OrganizationName.Contains(Filter) || svm.OrganizationNamePinyin.Contains(Filter) || (!string.IsNullOrEmpty(svm.Phone) && svm.Phone.Contains(Filter));
            }
        }
开发者ID:GavinHome,项目名称:REVOLUTION,代码行数:13,代码来源:SearchUsersViewModel.cs


示例16: view_Filter

        void view_Filter(object sender, FilterEventArgs e)
        {
            int index = customers.IndexOf((Customer)e.Item);

            if (index >= itemPerPage * currentPageIndex && index < itemPerPage * (currentPageIndex + 1))
            {
                e.Accepted = true;
            }
            else
            {
                e.Accepted = false;
            }
        }
开发者ID:mac10688,项目名称:PublicWorkspace,代码行数:13,代码来源:MainWindow.xaml.cs


示例17: UnitViewSource_Filter

        void UnitViewSource_Filter(object sender, FilterEventArgs e)
        {
            Unit item = (Unit)e.Item;

            if (_filterExpression != null)
            {
                e.Accepted = _filterExpression.Invoke(item);
            }
            else
            {
                e.Accepted = true;
            }
        }
开发者ID:codingbandit,项目名称:TriTechDemo,代码行数:13,代码来源:MainWindow.xaml.cs


示例18: FilterEventHandler

 protected override void FilterEventHandler(object sender, FilterEventArgs eventArgs)
 {
     Attendance attendance = eventArgs.Item as Attendance;
     if (attendance != null && attendance.Presence != null && attendance.Presence.IsOnline && !attendance.IsActive && !attendance.IsUnread && (attendance.Party is Components.Person.Team || (attendance.Party is Person && !((Person)attendance.Party).Guest)))
     //if (attendance != null && attendance.Presence != null && attendance.Presence.IsOnline && !attendance.Person.Guest)
     {
         eventArgs.Accepted = true;
     }
     else
     {
         eventArgs.Accepted = false;
     }
 }
开发者ID:gwupe,项目名称:Gwupe,代码行数:13,代码来源:MainRosterList.cs


示例19: FilterEventHandler

 protected override void FilterEventHandler(object sender, FilterEventArgs filterEventArgs)
 {
     Attendance attendance = filterEventArgs.Item as Attendance;
     //Logger.Debug("Checking status of " + attendance.Person + " " + attendance.IsActive);
     if (attendance != null && attendance.IsActive)
     {
         filterEventArgs.Accepted = true;
     }
     else
     {
         filterEventArgs.Accepted = false;
     }
 }
开发者ID:gwupe,项目名称:Gwupe,代码行数:13,代码来源:ActiveRosterList.cs


示例20: OnFilteredLogsFilter

        void OnFilteredLogsFilter(object sender, FilterEventArgs e)
        {
            e.Accepted = false;
            var taskLog = (Log)e.Item;

            string tag = (comboBoxLogTagsFilter.SelectedValue == null ? "" : comboBoxLogTagsFilter.SelectedValue.ToString());


            if (string.IsNullOrEmpty(tag)
                || taskLog.Tags.ToLower().Contains(tag.ToLower()))
            {
                e.Accepted = true;
            }
        }
开发者ID:axs221,项目名称:TaskDash,代码行数:14,代码来源:TaskDetailsView.xaml.cs



注:本文中的System.Windows.Data.FilterEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Data.ListCollectionView类代码示例发布时间:2022-05-26
下一篇:
C# Data.DataTransferEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap