Example #1
0
 // returns true if it's equal to the other row, regardless of being enabled or not
 //
 // if it is, we can keep the cached information (about line matches)
 public bool same(filter_row other)
 {
     return Enumerable.SequenceEqual(items_, other.items_) && Enumerable.SequenceEqual(additions_, other.additions_);
 }
Example #2
0
 protected bool Equals(filter_row other)
 {
     return same(other) && (enabled == other.enabled) && (dimmed == other.dimmed);
 }
Example #3
0
        private void filterCtrl_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sel_filter = filterCtrl.SelectedIndex;
            if (sel_filter < 0)
                return;
            int sel_view = viewsTab.SelectedIndex;
            if (sel_view < 0)
                return;

            item i = filterCtrl.GetItem(sel_filter).RowObject as item;
            filter_row filt = new filter_row(i.text);
            if (filt.is_valid) {
                var lv = ensure_we_have_log_view_for_tab(sel_view);
                Color fg = util.str_to_color(sett.get("filter_fg", "transparent"));
                Color bg = util.str_to_color(sett.get("filter_bg", "#faebd7"));
                lv.mark_match(sel_filter, fg, bg);
            }
        }
Example #4
0
        private void update_non_active_filter(int idx)
        {
            var view = ensure_we_have_log_view_for_tab(idx);
            if (view.is_filter_set)
                return;

            ui_context ctx = cur_context();
            List<filter_row> lvf = new List<filter_row>();
            foreach (ui_filter filt in ctx.views[idx].filters) {
                filter_row row = new filter_row(filt.text);
                row.enabled = filt.enabled;
                row.dimmed = filt.dimmed;
                if ( row.is_valid)
                    lvf.Add(row);
            }
            view.set_filter( lvf);
        }
Example #5
0
        private void update_filter( log_view lv)
        {
            if (last_filter_text_change_.AddMilliseconds(IGNORE_FILTER_UDPATE_MS) > DateTime.Now)
                return;

            List<filter_row> lvf = new List<filter_row>();
            int count = filterCtrl.GetItemCount();
            for ( int idx = 0; idx < count; ++idx) {
                item i = filterCtrl.GetItem(idx).RowObject as item;
                filter_row filt = new filter_row(i.text);
                filt.enabled = i.enabled;
                filt.dimmed = i.dimmed;

                if ( filt.is_valid)
                    lvf.Add(filt);
            }

            lv.set_filter(lvf);
        }
Example #6
0
 // returns true if it's equal to the other row, regardless of being enabled or not
 //
 // if it is, we can keep the cached information (about line matches)
 public bool same(filter_row other)
 {
     return(Enumerable.SequenceEqual(items_, other.items_) && Enumerable.SequenceEqual(additions_, other.additions_));
 }
Example #7
0
 protected bool Equals(filter_row other)
 {
     return(same(other) && (enabled == other.enabled) && (dimmed == other.dimmed));
 }