public void AddCodes(List <string> codes) { IgnoreService.Instance(Core).AddCodes(codes); IgnorFields igf = comboBox1.SelectedItem as IgnorFields; if (igf != null && this.Visible && igf.Field == IgnoreService.FilterField.GeocacheCode) { comboBox1_SelectedIndexChanged(this, EventArgs.Empty); } }
private void button2_Click(object sender, EventArgs e) { IgnorFields igf = comboBox1.SelectedItem as IgnorFields; if (igf != null && listBox1.SelectedItem != null) { IgnoreService.Instance(Core).RemoveFilter(igf.Field, listBox1.SelectedItem.ToString()); listBox1.Items.Remove(listBox1.SelectedItem); } }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { listBox1.Items.Clear(); IgnorFields igf = comboBox1.SelectedItem as IgnorFields; if (igf != null) { listBox1.Items.AddRange(IgnoreService.Instance(Core).GetFilters(igf.Field)); } }
public void AddFilter(IgnoreService.FilterField field, string text) { string[] filters = IgnoreService.Instance(Core).GetFilters(field); string cs = (from s in filters where string.Compare(s, text, true) == 0 select s).FirstOrDefault(); if (string.IsNullOrEmpty(cs)) { IgnoreService.Instance(Core).AddFilter(field, field == IgnoreService.FilterField.GeocacheCode ? text.ToUpper() : text); IgnorFields igf = comboBox1.SelectedItem as IgnorFields; if (igf != null && this.Visible && igf.Field == field) { comboBox1_SelectedIndexChanged(this, EventArgs.Empty); } } }
private void button3_Click(object sender, EventArgs e) { IgnoreService.Instance(Core).Clear(); comboBox1_SelectedIndexChanged(this, EventArgs.Empty); }
public List <string> FilterGeocaches(List <string> codes) { return(IgnoreService.Instance(Core).FilterGeocaches(codes)); }
public bool IgnoreGeocache(Framework.Data.Geocache gc) { return(IgnoreService.Instance(Core).IgnoreGeocache(gc)); }
public bool IgnoreGeocache(string code) { return(IgnoreService.Instance(Core).IgnoreGeocache(code)); }