Example #1
0
		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); });
			}
		}
Example #2
0
		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); });
		}