MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / FilterNamespaces

Method FilterNamespaces

src/NodeRTUI/MainForm.cs:117–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 }
116
117 private void FilterNamespaces()
118 {
119 if (_namespaces != null)
120 {
121 if (!string.IsNullOrWhiteSpace(txtFilter.Text))
122 {
123 var filter = txtFilter.Text.Trim().ToLowerInvariant();
124 var filteredNamespaces = _namespaces.Where((name) => name.ToLowerInvariant().Contains(filter));
125 namespaceList.SuspendLayout();
126 namespaceList.Items.Clear();
127 namespaceList.Items.AddRange(filteredNamespaces.ToArray());
128 namespaceList.ResumeLayout();
129 }
130 else
131 {
132 namespaceList.Items.AddRange(_namespaces.ToArray());
133 }
134 }
135 }
136
137 private void LoadNamespaces(string path)
138 {

Callers

nothing calls this directly

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected