/* Edit mode: * 1. if more than 1 entry, the combo is dropped down by default * 2. if you type any letter while the combo is first dropped down (or paste something), it will auto close the dropdown * 3. if you select any entry from the combo, you are EDITING that entry. If you don't select anything, you are ADDING */ // 1.2.7+ if there's something selected by the user, override what we had public search_form(Form parent, log_view lv, string smart_edit_search_for_text) { InitializeComponent(); TopMost = parent.TopMost; result.Font = lv.list.Font; lv_ = lv; render_ = new search_renderer(lv, this); history_ = search_form_history.inst.all_searches_cur_view_first(lv.name); // use the last ones... fg.BackColor = history_[0].fg; bg.BackColor = history_[0].bg; allColumns.Checked = history_[0].all_columns; load_combo(); find_result_columns(lv); if (smart_edit_search_for_text != "") { combo.Text = smart_edit_search_for_text; radioText.Checked = true; } update_autorecognize_radio(); update_negate(); update_to_filter_button(); prev_search_ = current_search(); util.postpone(() => { combo.Focus(); if (combo.Items.Count > 1) { dropped_first_time_ = true; combo.DroppedDown = true; } }, 1); new Thread(do_searches_thread) { IsBackground = true }.Start(); }
/* Edit mode: 1. if more than 1 entry, the combo is dropped down by default 2. if you type any letter while the combo is first dropped down (or paste something), it will auto close the dropdown 3. if you select any entry from the combo, you are EDITING that entry. If you don't select anything, you are ADDING */ // 1.2.7+ if there's something selected by the user, override what we had public search_form(Form parent, log_view lv, string smart_edit_search_for_text) { InitializeComponent(); TopMost = parent.TopMost; result.Font = lv.list.Font; lv_ = lv; render_ = new search_renderer(lv, this); history_ = search_form_history.inst.all_searches_cur_view_first(lv.name); // use the last ones... fg.BackColor = history_[0].fg; bg.BackColor = history_[0].bg; allColumns.Checked = history_[0].all_columns; load_combo(); load_surrounding_rows(lv); if (smart_edit_search_for_text != "") { combo.Text = smart_edit_search_for_text; radioText.Checked = true; } update_autorecognize_radio(); prev_search_ = current_search(); util.postpone(() => { combo.Focus(); if (combo.Items.Count > 1) { dropped_first_time_ = true; combo.DroppedDown = true; } },1); new Thread(do_searches_thread) {IsBackground = true }.Start(); }