Exemple #1
0
        public void simple_action(log_view_right_click.simple_action simple) {
            // - Adding a filter/changing a filter + Edit -> need to figure out if it's existing or not, to know what filter to select for later editing!
            switch (simple) {
            case log_view_right_click.simple_action.none:
                Debug.Assert(false);
                break;
            case log_view_right_click.simple_action.view_to_left:
                Debug.Assert(false);
                break;
            case log_view_right_click.simple_action.view_to_right:
                Debug.Assert(false);
                break;

            case log_view_right_click.simple_action.view_add_copy:
                createACopyOfTheExistingViewToolStripMenuItem_Click(null,null);
                break;
            case log_view_right_click.simple_action.view_add_new:
                createANewViewFromScratchToolStripMenuItem_Click(null,null);
                break;
            case log_view_right_click.simple_action.view_delete:
                delView_Click(null,null);
                break;

            case log_view_right_click.simple_action.button_toggles:
                show_toggles_menu();
                break;
            case log_view_right_click.simple_action.button_preferences:
                whatsupPreferences_Click(null,null);
                break;
            case log_view_right_click.simple_action.button_refresh:
                refreshToolStripMenuItem_Click(null,null);
                break;

            case log_view_right_click.simple_action.export_log_and_notes:
                export_notes_to_logwizard_file();
                break;
            case log_view_right_click.simple_action.export_view:
                exportCurrentViewtotxtAndhtmlFilesToolStripMenuItem_Click(null,null);
                break;
            case log_view_right_click.simple_action.export_notes:
                exportNotestotxtAndhtmlFilesToolStripMenuItem_Click(null,null);
                break;

            case log_view_right_click.simple_action.find_find:
                handle_action(action_type.search);
                break;
            case log_view_right_click.simple_action.find_find_next:
                handle_action(action_type.search_next);
                break;
            case log_view_right_click.simple_action.find_find_prev:
                handle_action(action_type.search_prev);
                break;

            case log_view_right_click.simple_action.copy_msg:
                handle_action(action_type.copy_to_clipboard);
                break;
            case log_view_right_click.simple_action.copy_full_line:
                handle_action(action_type.copy_full_line_to_clipboard);
                break;

            case log_view_right_click.simple_action.note_create_note:
                if (!global_ui.show_notes) {
                    global_ui.show_notes = true;
                    show_left_pane(global_ui.show_left_pane);
                }
                notes.focus_to_edit();
                break;
            case log_view_right_click.simple_action.note_show_notes:
                handle_action(action_type.toggle_notes);
                break;

            case log_view_right_click.simple_action.edit_last_filter:
                if (!global_ui.show_filter) {
                    global_ui.show_filter = true;
                    show_left_pane(global_ui.show_left_pane);
                }
                filtCtrl.edit_filter_row_by_filter_id(last_edited_filter_id_);
                break;

            default:
                Debug.Assert(false);
                break;
            }
        }
Exemple #2
0
        public log_view(Form parent, string name)
        {
            Debug.Assert(parent is log_view_parent);

            filter_ = new filter(this.create_match_object);
            filter_.on_change = on_change;

            InitializeComponent();
            this.parent = parent;
            ++ignore_change_;
            viewName.Text = name;
            --ignore_change_;
            model_ = new log_view_data_source(this.list, this ) { name = name };
            list.VirtualListDataSource = model_;

            load_font();
            lv_parent.handle_subcontrol_keys(this);

            render_ = new log_view_render(this);
            foreach (var col in list.AllColumns)
                (col as OLVColumn).Renderer = render_;
            right_click_ = new log_view_right_click(this);

            // just an example:
            //render_.set_override("settings", new log_view_render.print_info { fg = Color.Blue, bold = true });
            cur_col_ = msgCol.fixed_index();
            edit.on_sel_changed = on_edit_sel_changed;
            edit.on_search_ahead = search_ahead;
            edit.init(this);
            edit.BringToFront();

            list.ColumnRightClick += list_ColumnRightClick;
            list.ColumnWidthChanged += List_on_column_width_changed;
            list.ColumnWidthChanging += List_on_column_width_changing;
        }
Exemple #3
0
        public log_view(Form parent, string name)
        {
            Debug.Assert(parent is log_view_parent);

            filter_ = new filter(this.create_match_object);
            filter_.on_change = on_change;

            InitializeComponent();
            this.parent = parent;
            ++ignore_change_;
            viewName.Text = name;
            --ignore_change_;
            model_ = new log_view_data_source(this.list, this ) { name = name };
            list.VirtualListDataSource = model_;

            load_font();
            lv_parent.handle_subcontrol_keys(this);

            render_ = new log_view_render(this);
            foreach (var col in list.AllColumns) {
                col.Renderer = render_;
                col.Tag = new log_view_column_tag(this);
            }
            right_click_ = new log_view_right_click(this);

            cur_col_ = msgCol.fixed_index();
            edit.on_sel_changed = on_edit_sel_changed;
            edit.on_search_ahead = search_ahead;
            edit.init(this);
            edit.BringToFront();

            list.ColumnRightClick += list_ColumnRightClick;
            list.ColumnWidthChanged += List_on_column_width_changed;
            list.ColumnWidthChanging += List_on_column_width_changing;
            msgCol.FillsFreeSpace = !app.inst.show_horizontal_scrollbar;
        }
 public void simple_action(log_view_right_click.simple_action simple) {
 }