27 lines
681 B
C#
27 lines
681 B
C#
using AutoCompleteTextBox.Editors;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FSI.BT.Tools.RadialMenu
|
|
{
|
|
public class CmdProvider : ISuggestionProvider
|
|
{
|
|
private readonly ObservableCollection<string> _cmds;
|
|
|
|
public IEnumerable GetSuggestions(string filter)
|
|
{
|
|
return _cmds.Where(x => x.StartsWith(filter, StringComparison.InvariantCultureIgnoreCase));
|
|
}
|
|
|
|
public CmdProvider(ref ObservableCollection<string> cmds)
|
|
{
|
|
this._cmds = cmds;
|
|
}
|
|
}
|
|
}
|