Example #1
0
        private log_view ensure_we_have_log_view_for_tab(int idx) {
            TabPage tab = viewsTab.TabPages[idx];
            foreach ( Control c in tab.Controls)
                if ( c is log_view)
                    return c as log_view; // we have it

            foreach ( Control c in tab.Controls)
                c.Visible = false;

            Debug.Assert( idx < cur_context().views.Count );
            string name = cur_context().views[idx].name;
            log_view new_ = new log_view( this, name );
            new_.Dock = DockStyle.Fill;
            tab.Controls.Add(new_);
            new_.show_name = false;
            new_.set_bookmarks(bookmarks_.ToList());
            if ( log_parser_ != null)
                new_.set_log( new log_reader(log_parser_));
            return new_;
        }