void HandleSearchEntryChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(matchEntry.Entry.Text)) { if (popup != null) { popup.Destroy(); } return; } var pattern = SearchPopupSearchPattern.ParsePattern(matchEntry.Entry.Text); if (pattern.Pattern == null && pattern.LineNumber > 0 || pattern == emptyColonPattern) { if (popup != null) { popup.Hide(); } return; } else { if (popup != null && !popup.Visible) { popup.Show(); } } if (popup == null) { popup = new SearchPopupWindow(); popup.SearchForMembers = SearchForMembers; popup.Destroyed += delegate { popup = null; matchEntry.Entry.Text = ""; }; PositionPopup(); popup.ShowAll(); } popup.Update(pattern); }
void HandleSearchEntryChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(matchEntry.Entry.Text)) { if (popup != null) { popup.Destroy(); } return; } if (popup == null) { popup = new SearchPopupWindow(); popup.SearchForMembers = SearchForMembers; popup.Destroyed += delegate { popup = null; matchEntry.Entry.Text = ""; }; PositionPopup(); popup.ShowAll(); } popup.Update(matchEntry.Entry.Text); }