private void ClassBrowser_Load(object sender, EventArgs e)
 {
     GListBox.GListBoxItem node;
     this.itemList.BeginUpdate();
     this.itemList.Items.Clear();
     if (this.ClassList != null)
     {
         foreach (MemberModel item in this.ClassList)
         {
             // exclude types imported in the current file
             if (item.Name != item.Type)
             {
                 continue;
             }
             if (ExcludeFlag > 0)
             {
                 if ((item.Flags & ExcludeFlag) > 0)
                 {
                     continue;
                 }
             }
             if (IncludeFlag > 0)
             {
                 if (!((item.Flags & IncludeFlag) > 0))
                 {
                     continue;
                 }
             }
             if (this.itemList.Items.Count > 0 && item.Name == this.itemList.Items[this.itemList.Items.Count - 1].ToString())
             {
                 continue;
             }
             node = new GListBox.GListBoxItem(item.Name, (item.Flags & FlagType.Interface) > 0 ? 6 : 8);
             this.itemList.Items.Add(node);
             this.DataProvider.Add(node);
         }
     }
     if (this.itemList.Items.Count > 0)
     {
         this.itemList.SelectedIndex = 0;
     }
     this.itemList.EndUpdate();
     this.filterBox.Focus();
     this.filterBox.SelectAll();
 }
        /// <summary>
        /// Filter the results
        /// </summary>
        private bool FindAllItems(GListBox.GListBoxItem item)
        {
            if (matchLen == 0)
            {
                return(true);
            }
            int score = PluginCore.Controls.CompletionList.SmartMatch(item.Text, matchToken, matchLen);

            if (score > 0 && score < 6)
            {
                if (score < lastScore)
                {
                    lastScore = score;
                    topIndex  = resultCount;
                }
                resultCount++;
                return(true);
            }
            else
            {
                return(false);
            }
        }
 private void ClassBrowser_Load(object sender, EventArgs e)
 {
     GListBox.GListBoxItem node;
     this.itemList.BeginUpdate();
     this.itemList.Items.Clear();
     if (this.ClassList != null)
     {
         foreach (MemberModel item in this.ClassList)
         {
             // exclude types imported in the current file
             if (item.Name != item.Type) continue;
             if (ExcludeFlag > 0) if ((item.Flags & ExcludeFlag) > 0) continue;
             if (IncludeFlag > 0)
             {
                 if (!((item.Flags & IncludeFlag) > 0)) continue;
             }
             if (this.itemList.Items.Count > 0 && item.Name == this.itemList.Items[this.itemList.Items.Count - 1].ToString()) continue;
             node = new GListBox.GListBoxItem(item.Name, (item.Flags & FlagType.Interface) > 0 ? 6 : 8);
             this.itemList.Items.Add(node);
             this.DataProvider.Add(node);
         }
     }
     if (this.itemList.Items.Count > 0)
     {
         this.itemList.SelectedIndex = 0;
     }
     this.itemList.EndUpdate();
     this.filterBox.Focus();
     this.filterBox.SelectAll();
 }