Beispiel #1
0
            /// <summary>
            /// For a call log: does this filter affect the record?
            /// </summary>
            /// <param name="pcl"></param>
            /// <returns></returns>
            public FilterResult IsFiltered(ProcessedCallLog pcl)
            {
                switch (fieldType)
                {
                case FieldType.TIMESTAMP:
                    if (filterType == FilterType.AGE)
                    {
                        return(AgeCheck(pcl.MetaData.TimeStamp));
                    }
                    break;

                case FieldType.PHONENUM:
                    break;

                case FieldType.NAME:
                    break;

                case FieldType.CLTYPE:
                    break;

                default:
                    break;
                }
                return(FilterResult.NOTAPPLICABLE);
            }
Beispiel #2
0
        /// <summary>
        /// Cycle through the list of call log filters to determine if the
        /// supplied call log should be filtered.
        /// </summary>
        /// <param name="pcl"></param>
        /// <returns>True if it should be filtered, false if it should be kept.</returns>
        public bool IsFiltered(ProcessedCallLog pcl)
        {
            foreach (Filter filter in clFilters)
            {
                switch (filter.IsFiltered(pcl))
                {
                case Filter.FilterResult.NOTAPPLICABLE:
                    break;

                case Filter.FilterResult.ACCEPT:
                    return(false);

                case Filter.FilterResult.REJECT:
                    return(true);
                }
            }
            // Default is to keep the record.
            return(false);
        }
 public CallLogListViewItem(ProcessedCallLog callLog)
     : base()
 {
     this.CallLog = callLog;
 }