コード例 #1
0
        private void SetChkFilter()
        {
            if (logTabControl == null)
            {
                return;
            }

            if (logTabControl.SelectedItem == null)
            {
                return;
            }

            if ((logTabControl.SelectedItem as LogTab).logDataGrid != null)
            {
                ICollectionView cv = CollectionViewSource.GetDefaultView((logTabControl.SelectedItem as LogTab).logDataGrid.Items);

                cv.Filter = o =>
                {
                    Log log = o as Log;
                    return(LogFilterController.CheckLevel(log.Level[0], this) && LogFilterController.CheckFilter(log, this));
                };
            }
        }
コード例 #2
0
ファイル: LogTab.cs プロジェクト: sung-su/vs-tools-cps
        void ViewSource_Filter(object sender, FilterEventArgs e)
        {
            Log log = e.Item as Log;

            e.Accepted = LogFilterController.CheckLevel(log.Level[0], parentControl) && LogFilterController.CheckFilter(log, parentControl);
        }