Exemplo n.º 1
0
 private void findBtn_Click(object sender, EventArgs e)
 {
     SearchOptions options = new SearchOptions();
     options.Type = GetSelectedType();
     options.FriendlyName = dNameBox.Text;
     options.Identifier = identBox.Text;
     options.Value = valueBox.Text;
     Editor.FindNext(options);
 }
Exemplo n.º 2
0
        public void FindNext(SearchOptions options)
        {
            Entry cur = GetSelectedEntry();
            if (cur != null)
                cur = cur.Step(); //start one after the selected
            else
                cur = RootSection.Entries[0];

            while (cur != null && !options.Matches(cur))
            {
                cur = cur.Step(); //most of the magic is in the Step() method
            }
            Goto(cur);
        }