예제 #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
        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);
        }