示例#1
0
		private void SearchDiscoveryCallback (DataNode node)
		{
			Console.WriteLine ("Discovery: " + node.NodeDisplay);
			TreeDataNode frontNode = FindFrontNode(node);
			Console.WriteLine ("  Front Node: " + frontNode.Data.NodeDisplay);
			_mainOutlineView.SelectRow (_mainOutlineView.RowForItem(frontNode), false);
			_mainOutlineView.ScrollRowToVisible(_mainOutlineView.RowForItem(frontNode));
			//_nodeTree.SelectedNode = FindFrontNode(node);
			
			if (_searchForm != null) {
				_searchForm.Accept();
				_searchForm = null;
			}
		}
示例#2
0
		private void SearchEndCallback (DataNode node)
		{
			_searchForm.Cancel();
			_searchForm = null;

			NSAlert.WithMessage("End of Results", "OK", null, null, "").RunModal();
		}
示例#3
0
		private void SearchNextNode ()
		{
			if (_searchState == null)
				return;
			
			SearchWorker worker = new SearchWorker (_searchState);
			
			Thread t = new Thread (new ThreadStart (worker.Run));
			t.IsBackground = true;
			t.Start ();

			_searchForm = new CancelFindWindowController ();
			if (RunWindow (_searchForm) == ModalResult.Cancel) {
				worker.Cancel();
				_searchState = null;
			}
			
			t.Join();
		}