Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
 public IgnorFields(IgnoreService.FilterField field, string text)
 {
     Field = field;
     Text  = text;
 }