Exemplo n.º 1
0
        public search_renderer(log_view parent, search_form search)
        {
            search_ = search;
            drawer_ = new log_view_item_draw_ui(parent);

            Color normal_fg_ = app.inst.fg, normal_bg_ = app.inst.bg;

            default_ = new text_part(0, 0)
            {
                fg = normal_fg_, bg = normal_bg_,
            };

            Color search_line_fg_ = app.inst.search_found_full_line_fg, search_line_bg_ = app.inst.bg;

            around_search_ = new text_part(0, 0)
            {
                fg = search_line_fg_, bg = search_line_bg_
            };

            Color search_fg_ = app.inst.search_found_fg, search_bg_ = util.darker_color(app.inst.bg);

            search_text_ = new text_part(0, 0)
            {
                text = "not important", fg = search_fg_, bg = search_bg_, bold = true, italic = false
            };
        }
Exemplo n.º 2
0
        public void init(log_view parent)
        {
            parent_ = parent;
            drawer_ = new log_view_item_draw_ui(parent);
            util.postpone(update_ui, 10);

            // ... easier testing
//            if ( util.is_debug)
//              BorderStyle = BorderStyle.FixedSingle;
        }
Exemplo n.º 3
0
        public search_renderer(log_view parent, search_form search) {
            search_ = search;
            drawer_ = new log_view_item_draw_ui(parent);

            Color normal_fg_ = app.inst.fg, normal_bg_ = app.inst.bg;
            default_ = new text_part(0,0) { fg = normal_fg_, bg = normal_bg_, };
            
            Color search_line_fg_ = app.inst.search_found_full_line_fg, search_line_bg_ = app.inst.bg;
            around_search_ = new text_part(0,0) { fg = search_line_fg_, bg = search_line_bg_ };

            Color search_fg_ = app.inst.search_found_fg, search_bg_ = util.darker_color(app.inst.bg);
            search_text_ = new text_part(0,0) { text = "not important", fg = search_fg_, bg = search_bg_, bold = true, italic = false };
        }
Exemplo n.º 4
0
        public void show_cur_item(log_view lv)
        {
            if (drawer_ == null)
            {
                drawer_ = new log_view_item_draw_ui(lv)
                {
                    ignore_selection = true
                }
            }
            ;
            drawer_.set_parent(lv);

            if (lv.sel != null)
            {
                foreach (var col in column_to_controls_)
                {
                    show_sub_item(lv, col.Key, col.Value.Item2);
                }
            }
        }
    }
Exemplo n.º 5
0
        public void show_cur_item(log_view lv) {
            if ( drawer_ == null)
                drawer_ = new log_view_item_draw_ui(lv) { ignore_selection = true };
            drawer_.set_parent(lv);

            if (lv.sel != null) {
                foreach (var col in column_to_controls_) 
                    show_sub_item(lv, col.Key, col.Value.Item2);
            }
        }
Exemplo n.º 6
0
        public void init(log_view parent) {
            parent_ = parent;
            drawer_ = new log_view_item_draw_ui(parent);
            util.postpone(update_ui, 10);

            // ... easier testing
//            if ( util.is_debug)
  //              BorderStyle = BorderStyle.FixedSingle;
        }
Exemplo n.º 7
0
 public log_view_render(log_view parent) {
     parent_ = parent;
     drawer_ = new log_view_item_draw_ui(parent_);            
 }
Exemplo n.º 8
0
        private void set_text(log_view lv) {
            if (drawer_ == null) {
                drawer_ = new log_view_item_draw_ui(lv) {ignore_selection = true};
                txt.Font = drawer_.default_font;
            }
            drawer_.set_parent(lv);

            int msg_col = lv.msgCol.fixed_index();
            string msg_txt = lv.sel_line_text;

            txt.Clear();
            txt.AppendText(msg_txt);

            var prints = lv.sel.override_print(lv, msg_txt, msg_col);
            var full_row = lv.list.GetItem(lv.sel_row_idx);

            BackColor = txt.BackColor = drawer_.bg_color(full_row, msg_col);
            int last_idx = 0;

            for (int print_idx = 0; print_idx < prints.Count; ++print_idx) {
                int cur_idx = prints[print_idx].Item1, cur_len = prints[print_idx].Item2;
                string before = msg_txt.Substring(last_idx, cur_idx - last_idx);
                if (before != "") {
                    txt.Select(last_idx, cur_idx - last_idx);
                    txt.SelectionColor = drawer_.print_fg_color(full_row, default_print_);
                    txt.SelectionBackColor = drawer_.bg_color(full_row, msg_col);
                }
                txt.Select(cur_idx, cur_len);
                txt.SelectionColor = drawer_.print_fg_color(full_row, prints[print_idx].Item3);
                txt.SelectionBackColor = drawer_.print_bg_color(full_row, prints[print_idx].Item3);
                last_idx = cur_idx + cur_len;
            }
            last_idx = prints.Count > 0 ? prints.Last().Item1 + prints.Last().Item2 : 0;
            if (last_idx < msg_txt.Length) {
                txt.Select(last_idx, msg_txt.Length - last_idx);
                txt.SelectionColor = drawer_.print_fg_color(full_row, default_print_);
                txt.SelectionBackColor = drawer_.bg_color(full_row, msg_col);
            }

            txt.SelectionStart = 0;
            txt.SelectionLength = 0;            
        }
Exemplo n.º 9
0
 public log_view_render(log_view parent)
 {
     parent_ = parent;
     drawer_ = new log_view_item_draw_ui(parent_);
     cache_  = new formatted_text_cache(parent_, column_formatter_base.format_cell.location_type.view);
 }
Exemplo n.º 10
0
        private void set_text(log_view lv) {
            if (drawer_ == null) {
                drawer_ = new log_view_item_draw_ui(lv) {ignore_selection = true};
                txt.Font = drawer_.default_font;
            }
            drawer_.set_parent(lv);

            int msg_col = lv.msgCol.fixed_index();
            string msg_txt = lv.sel_line_text;

            txt.Clear();
            txt.AppendText(msg_txt);

            var prints = lv.sel.override_print(lv, msg_txt, msg_col, column_formatter_base.format_cell.location_type.msg_description).format_text;
            var full_row = lv.list.GetItem(lv.sel_row_idx);

            BackColor = txt.BackColor = drawer_.bg_color(full_row, msg_col, prints);

            var parts = prints.parts(default_print_);
            foreach (var part in parts) {
                txt.Select(part.start, part.len);
                txt.SelectionColor = drawer_.print_fg_color(full_row, part);
                txt.SelectionBackColor = drawer_.print_bg_color(full_row, part);
            }

            txt.SelectionStart = 0;
            txt.SelectionLength = 0;            
        }
Exemplo n.º 11
0
 public log_view_render(log_view parent) {
     parent_ = parent;
     drawer_ = new log_view_item_draw_ui(parent_);
     cache_ = new formatted_text_cache(parent_, column_formatter_base.format_cell.location_type.view);
 }
Exemplo n.º 12
0
 public log_view_render(log_view parent)
 {
     parent_ = parent;
     drawer_ = new log_view_item_draw_ui(parent_);
 }