コード例 #1
0
ファイル: threadlist.cpp プロジェクト: VerySleepy/verysleepy
void ThreadList::updateThreads(const ProcessInfo* processInfo, SymbolInfo *symInfo)
{
	this->selected_threads.clear();
	DeleteAllItems();
	this->threads.clear();
	ok_button->Enable(false);
	all_button->Enable(false);

	if(processInfo != NULL)
	{
		this->process_handle = processInfo->getProcessHandle();
		this->syminfo = symInfo;

		this->threads = processInfo->threads;

		int numDisplayedThreads = getNumDisplayedThreads();
		for(int i=0; i<numDisplayedThreads; ++i)
		{
			long tmp = this->InsertItem(i, "", -1);
			SetItemData(tmp, i);
		}

		all_button->Enable(this->threads.size() != 0);

		lastTime = wxGetLocalTimeMillis();
		updateTimes();
		updateSorting();
		fillList();
	}
}
コード例 #2
0
ファイル: LAVar.C プロジェクト: dreal-deps/opensmt
void LAVar::addBoundsAndUpdateSorting( const LAVarBound & pb1, const LAVarBound & pb2 )
{
  all_bounds.push_back( pb1 );
  all_bounds.push_back( pb2 );

  updateSorting( );
}
コード例 #3
0
ファイル: threadlist.cpp プロジェクト: VerySleepy/verysleepy
void ThreadList::OnSort(wxListEvent& event)
{
	SetSortImage(sort_column, SORT_NONE);

	if (sort_column == event.m_col)
	{
		// toggle if we clicked on the same column as last time
		sort_dir = (SortType)((SORT_UP+SORT_DOWN) - sort_dir);
	} else {
		// if switching columns, start with the default sort for that column type
		sort_column = event.m_col;
		sort_dir = (sort_column >= 1 && sort_column <= 4) ? SORT_DOWN : SORT_UP;
	}

	SetSortImage(sort_column, sort_dir);
	updateSorting();
}
コード例 #4
0
void ThreadList::updateThreads(const ProcessInfo* processInfo, SymbolInfo *symInfo)
{
	this->selected_threads.clear();
	DeleteAllItems();
	this->threads.clear();
	ok_button->Enable(false);

	if(processInfo != NULL)
	{
		this->process_handle = processInfo->getProcessHandle();
		this->syminfo = symInfo;

		this->threads = processInfo->threads;
		for(int i=0; i<(int)this->threads.size(); ++i)
		{
			long tmp = this->InsertItem(i, "", -1);
			SetItemData(tmp, i);
		}

		all_button->Enable(this->threads.size() != 0);

		lastTime = wxGetLocalTimeMillis();
		updateTimes();

		// We need to wait a bit before we can get any useful CPU usage data.
		{
			timer.Stop();
			int steps = 20;
			wxProgressDialog dlg("Sleepy", "Searching for threads...", steps);
			for (int n=0;n<steps;n++)
			{
				Sleep(200/steps);
				dlg.Update(n);
			}
			timer.Start(UPDATE_DELAY);
		}

		// Now we've waited, we can grab the data again.
		updateTimes();
		updateSorting();
		fillList();
	}
}
コード例 #5
0
ファイル: LAVar.C プロジェクト: dreal-deps/opensmt
void LAVar::addBoundAndUpdateSorting( const LAVarBound & pb )
{
  all_bounds.push_back( pb );

  updateSorting( );
}