void SearchButton_Click(object sender, RoutedEventArgs e) { var hits = new List <string>(); var items = _dataGrid.Items; for (int row = 0; row < items.Count; row++) { var texts = (string[])items[row]; for (int col = 0; col < texts.Length; col++) { string text = texts[col]; { if (text.Contains(_searchText.Text)) { hits.Add($"OrderDocument ({row},{col}) : {text}"); } } } } string result = string.Empty; foreach (var hit in hits) { result += hit + "\n"; } SearchEvent?.Invoke(this, new SearchEventArgs(result)); }
private void Search() { if (CanSearch) { SearchEvent?.Invoke(); } }
void OnTriggerExit2D(Collider2D col) { if (SearchingForTag(col.tag)) { if (TagExit != null) { TagExit.Invoke(col); } } }
public void OnTriggerExit2D(Collider2D col) { T component = col.GetComponent <T>(); if (component != null && componentsWithin.Contains(component)) { componentsWithin.Remove(component); if (OnSearchZoneExit != null) { OnSearchZoneExit.Invoke(component); } } }
// Update is called once per frame public void OnTriggerEnter2D(Collider2D col) { T component = col.GetComponent <T>(); if (component != null && !componentsWithin.Contains(component)) { componentsWithin.Add(component); if (OnSearchZoneEnter != null) { OnSearchZoneEnter.Invoke(component); } } }
private void searchForSelectionToolStripMenuItem_Click(object sender, EventArgs e) { if (SearchEvent != null && !String.IsNullOrWhiteSpace(richTextBoxInfo.SelectedText.Trim())) { SearchEvent.Invoke(this, new SearchEventArgs() { SearchText = richTextBoxInfo.SelectedText.Trim(), DurationFrom = 0, DurationTo = 0, IgnoreCase = false, UseRegex = false }); } }
public void InvokeSearch(SearchEventArgs args) { SetFromSearchArgs(args); buttonSearch.Text = "Abort"; foreach (Control c in this.Controls) { if (c != buttonSearch && c != progressBarSearch) { c.Enabled = false; } } SearchEvent.Invoke(this, args); }
protected virtual void OnSearchEvent(SearchEventArgs e) => SearchEvent?.Invoke(this, e);
protected virtual void OnSearchEvent(RequestBinairiesEventArgs e) => SearchEvent?.Invoke(this, e);
public void onSearchInfoGet(SearchInfo info) { e_SearchInfoGet.Invoke(info); }