Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
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.º 5
0
 private void button3_Click(object sender, EventArgs e)
 {
     IgnoreService.Instance(Core).Clear();
     comboBox1_SelectedIndexChanged(this, EventArgs.Empty);
 }
Exemplo n.º 6
0
 public List <string> FilterGeocaches(List <string> codes)
 {
     return(IgnoreService.Instance(Core).FilterGeocaches(codes));
 }
Exemplo n.º 7
0
 public bool IgnoreGeocache(Framework.Data.Geocache gc)
 {
     return(IgnoreService.Instance(Core).IgnoreGeocache(gc));
 }
Exemplo n.º 8
0
 public bool IgnoreGeocache(string code)
 {
     return(IgnoreService.Instance(Core).IgnoreGeocache(code));
 }