Sicherung
This commit is contained in:
26
FSI.BT.Tools/RadialMenu/CmdProvider.cs
Normal file
26
FSI.BT.Tools/RadialMenu/CmdProvider.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user