aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-04 15:26:21 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-04 15:26:21 +0200
commit6900c4dea48adb484efc9648e081b7b3f75bd60c (patch)
tree78cebaa7e24d9c36b14d25c35f5679403e5b1ce3 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs
parent0681c34b56580e3c5c37d95bf1c3f948d95c2302 (diff)
downloadTango-6900c4dea48adb484efc9648e081b7b3f75bd60c.tar.gz
Tango-6900c4dea48adb484efc9648e081b7b3f75bd60c.zip
Progress on Machine Designer..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs
new file mode 100644
index 000000000..943c52f81
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.AutoComplete.Editors;
+using Tango.DAL.Observables;
+
+namespace Tango.MachineStudio.MachineDesigner.AutoComplete
+{
+ public class MachinesProvider : ISuggestionProvider
+ {
+ public IEnumerable GetSuggestions(string filter)
+ {
+ return ObservablesEntitiesAdapter.Instance.Machines.Where(x => x.SerialNumber.StartsWith(filter, StringComparison.CurrentCultureIgnoreCase)).ToList();
+ }
+ }
+}