示例#1
0
        private void InitializeFunctionList()
        {
            if (_file == null)
            {
                lstFunctions.Items.Clear();
                return;
            }

            TextFilter tf = new TextFilter(txtFunctionFilter.Text);

            lstFunctions.Items.Clear();

            foreach (Function func in _file.Functions)
            {
                if (tf.Match(func.Name))
                {
                    var lvi = lstFunctions.Items.Add(CreateFunctionLvi(func));
                }
            }
        }
示例#2
0
 private void ApplyFileFilter()
 {
     TextFilter filter = new TextFilter(txtFileFilter.Text);
     lstFiles.BeginUpdate();
     lstFiles.Items.Clear();
     try
     {
         foreach (ProbeFile pf in _files)
         {
             if (filter.Match(pf.title))
             {
                 ListViewItem lvi = new ListViewItem(pf.title);
                 lvi.SubItems.Add(pf.dir);
                 lvi.Tag = pf;
                 lstFiles.Items.Add(lvi);
             }
         }
     }
     finally
     {
         lstFiles.EndUpdate();
     }
 }