void LoadData()
        {
            AdornerLayer   layer = AdornerLayer.GetAdornerLayer(this);
            OverlayAdorner ad    = new OverlayAdorner(this);
            WaitBar        bar   = new WaitBar(Translation.WaitBarText);

            ad.Child = bar;
            layer.Add(ad);
            int    rangeStart = RangeStart;
            int    rangeEnd   = RangeEnd;
            string query      = this.CurrentQuery;

            ProfilingDataProvider provider = Provider;
            QueryCompiler         compiler = new QueryCompiler(Reporter, query);

            ringDiagram.SelectedRoot = null;

            task.Execute(() => LoadWorker(provider, compiler, rangeStart, rangeEnd),
                         list => LoadCompleted(list, layer, ad),
                         delegate { layer.Remove(ad); });
        }
        void txtSearchKeyDown(object sender, KeyEventArgs e)
        {
            if (!string.IsNullOrEmpty(txtSearch.Text) && list.Count > 0)
            {
                searchTask.Cancel();
                string text     = txtSearch.Text;
                int    start    = this.RangeStart;
                int    end      = this.RangeEnd;
                var    provider = this.Provider;

                AdornerLayer   layer = AdornerLayer.GetAdornerLayer(this);
                OverlayAdorner ad    = new OverlayAdorner(this);
                WaitBar        bar   = new WaitBar(Translation.WaitBarText);
                ad.Child = bar;
                layer.Add(ad);

                searchTask.Execute(
                    () => DoSearchInBackground(list.Roots.Select(i => i.Node).ToList(), start, end, text, true),
                    result => SearchCompleted(result, layer, ad),
                    delegate { layer.Remove(ad); });
            }
        }
		void txtSearchKeyDown(object sender, KeyEventArgs e)
		{
			if (!string.IsNullOrEmpty(txtSearch.Text) && list.Count > 0) {
				searchTask.Cancel();
				string text = txtSearch.Text;
				int start = RangeStart;
				int end = RangeEnd;
				var provider = Provider;
				
				AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);
				OverlayAdorner ad = new OverlayAdorner(this);
				WaitBar bar = new WaitBar(Translation.WaitBarText);
				ad.Child = bar;
				layer.Add(ad);
				
				searchTask.Execute(
					() => DoSearchInBackground(list.Roots.Select(i => i.Node).ToList(), start, end, text, true),
					result => SearchCompleted(result, layer, ad),
					delegate { layer.Remove(ad); });
			}
		}
		void LoadData()
		{
			AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);
			OverlayAdorner ad = new OverlayAdorner(this);
			WaitBar bar = new WaitBar(Translation.WaitBarText);
			ad.Child = bar;
			layer.Add(ad);
			int rangeStart = RangeStart;
			int rangeEnd = RangeEnd;
			string query = CurrentQuery;
			
			ProfilingDataProvider provider = Provider;
			QueryCompiler compiler = new QueryCompiler(Reporter, query);
			ringDiagram.SelectedRoot = null;
			
			task.Execute(() => LoadWorker(provider, compiler, rangeStart, rangeEnd),
			             list => LoadCompleted(list, layer, ad),
			             delegate { layer.Remove(ad); });
		}