Ejemplo n.º 1
0
        private LogFilter GetFilterObjectFromUI()
        {
            LogFilter FilterObj = null;

            object         BoxVal   = 0;
            FilterOperator Op       = (FilterOperator)cbFilterOp.SelectedIndex;
            FilterSection  Sect     = (FilterSection)cbFilterSection.SelectedIndex;
            DebugType      DebType  = (DebugType)(cbSectionValues.SelectedIndex + 1);
            string         StrValue = txtValue.Text;

            switch (Sect)
            {
            case FilterSection.LogTypeSection:
                BoxVal = DebType;
                break;

            case FilterSection.TagSection:
            case FilterSection.MessageSection:
                BoxVal = txtValue.Text;
                break;

            case FilterSection.PidSection:
            {
                try
                {
                    BoxVal = int.Parse(StrValue);
                }
                catch { }

                break;
            }
            }


            FilterObj = new LogFilter(Op, BoxVal, Sect);

            FilterObj.UseRegexp = chkUseRegexp.Checked;

            return(FilterObj);
        }
Ejemplo n.º 2
0
 public void AddFilter(LogFilter filter)
 {
     Filters.Add(filter);
 }
Ejemplo n.º 3
0
 public void AddFilter(LogFilter filter)
 {
     Filters.Add(filter);
 }