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));
        }
예제 #2
0
 private void Search()
 {
     if (CanSearch)
     {
         SearchEvent?.Invoke();
     }
 }
예제 #3
0
 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);
            }
        }
    }
예제 #6
0
 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
         });
     }
 }
예제 #7
0
        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);
        }
예제 #8
0
 protected virtual void OnSearchEvent(SearchEventArgs e) => SearchEvent?.Invoke(this, e);
예제 #9
0
 protected virtual void OnSearchEvent(RequestBinairiesEventArgs e) => SearchEvent?.Invoke(this, e);
예제 #10
0
 public void onSearchInfoGet(SearchInfo info)
 {
     e_SearchInfoGet.Invoke(info);
 }