public void on_aliases(aliases aliases) { lock (this) foreach (info_type type in Enum.GetValues(typeof(info_type))) { if (info_type_io.is_snoopable(type)) { if (aliases.has_column(type)) { snoop_for(type).is_visible = false; } else { // this column is not visible for this log if (snoops_.ContainsKey(type)) { var unuse_now = snoops_[type]; snoops_.Remove(type); unused_.Add(unuse_now); unuse_now.form.is_visible = false; } } } } aliases_set_ = true; }
// the aliases tell us which columns are visible public void set_aliases(aliases aliases) { // set_aliases names as well visible_columns_.Clear(); names_.Clear(); foreach (info_type type in Enum.GetValues(typeof(info_type))) { if (aliases.has_column(type)) { string name = aliases.friendly_name(type); visible_columns_.Add(type); names_.Add(type, name); } } update_ui(); }