Example #1
0
        public void copy_from(ui_info other)
        {
            left   = other.left;
            top    = other.top;
            width  = other.width;
            height = other.height;

            show_filter_ = other.show_filter_;
            show_source  = other.show_source;
            show_fulllog = other.show_fulllog;

            show_current_view = other.show_current_view;
            show_header       = other.show_header;
            show_tabs         = other.show_tabs;
            show_title        = other.show_title;
            topmost           = other.topmost;
            show_details      = other.show_details;
            show_status       = other.show_status;
            log_name          = other.log_name;

            selected_view            = other.selected_view;
            selected_row_idx         = other.selected_row_idx;
            full_log_splitter_pos    = other.full_log_splitter_pos;
            description_splitter_pos = other.description_splitter_pos;
            left_pane_pos            = other.left_pane_pos;

            show_left_pane_ = other.show_left_pane_;
            show_notes_     = other.show_notes_;
            // ... get a copy
            views_ = other.views_.ToDictionary(x => x.Key, x => new view_info(x.Value.column_positions, x.Value.show_full_log));
        }
Example #2
0
        public void copy_from(ui_info other) {
            left = other.left;
            top = other.top;
            width = other.width;
            height = other.height;

            show_filter_ = other.show_filter_;
            show_source = other.show_source;
            show_fulllog = other.show_fulllog;

            show_current_view = other.show_current_view;
            show_header = other.show_header;
            show_tabs = other.show_tabs;
            show_title = other.show_title;
            topmost = other.topmost;
            show_details = other.show_details;
            show_status = other.show_status;
            log_name = other.log_name;

            selected_view = other.selected_view;
            selected_row_idx = other.selected_row_idx;
            full_log_splitter_pos = other.full_log_splitter_pos;
            description_splitter_pos = other.description_splitter_pos;
            left_pane_pos = other.left_pane_pos;

            show_left_pane_ = other.show_left_pane_;
            show_notes_ = other.show_notes_;
            // ... get a copy
            views_ = other.views_.ToDictionary(x => x.Key, x => new view_info(x.Value.show_full_log) );
        }
Example #3
0
 public void recreate_combo(Form form, ComboBox box, ui_info info, int custom_ui_idx) {
     lw_to_history_exists_.Remove(form);
     get_history(form, box, info, custom_ui_idx);
 }
Example #4
0
        public List<history> get_history(Form form, ComboBox box, ui_info info, int custom_ui_idx) {
            if (!lw_to_history_exists_.ContainsKey(form)) {
                // needs rebuilding
                lw_to_history_exists_.Add(form, true);
                var old_sel = lw_to_history_.ContainsKey(form) && box.SelectedIndex >= 0 ? lw_to_history_[form][box.SelectedIndex] : null;

                if ( !lw_to_history_.ContainsKey(form))
                    lw_to_history_.Add(form, null);
                lw_to_history_[form] = static_history_.ToList();

                int guid_idx = lw_to_history_[form].FindIndex(x => x.guid == info.last_log_guid );
                if (guid_idx >= 0) {
                    // care about the last log (show it last)
                    var last = lw_to_history_[form][guid_idx];
                    lw_to_history_[form].RemoveAt(guid_idx);
                    lw_to_history_[form].Add(last);
                }

                logger.Debug("recreating history combo for " + custom_ui_idx);
                update_history(box, lw_to_history_[form], old_sel);
            }

            return lw_to_history_[form];
        }