コード例 #1
0
        void HandleSearchEntryChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(ToolbarView.SearchText))
            {
                lastSearchText = ToolbarView.SearchText;
            }

            if (string.IsNullOrEmpty(ToolbarView.SearchText))
            {
                DestroyPopup();
                return;
            }
            var pattern = SearchPopupSearchPattern.ParsePattern(ToolbarView.SearchText);

            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;
                    ToolbarView.SearchText = "";
                };
                PositionPopup();
                popup.ShowAll();
            }

            popup.Update(pattern);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: MainToolbar.cs プロジェクト: jrhtcg/monodevelop
		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);

		}
コード例 #4
0
		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);

		}