예제 #1
0
void __fastcall TSearchFilesFrm::btBeginSearchClick(TObject *Sender)
{

	m_FileSearch.BeginSearch(edtSearchPath->Text, edtFileExt->Text, GetSearchData(), cbInclude->Checked, cgProcess);

	RefreshResult();
}
예제 #2
0
void CFilesHashDlg::OnBnClickedCheckup()
{
	// Remember current scroll position
	int iFirstVisible = m_editMain.GetFirstVisibleLine();

	if(!m_bFind)
	{
		// List mode
		RefreshResult();
		RefreshMainText(FALSE);
	}
	else
	{
		// Search mode
		m_editMain.SetWindowText(ResultFind(m_strFindFile, m_strFindHash));
	}

	// Reset scroll position
	m_editMain.LineScroll(iFirstVisible);
}
예제 #3
0
void CFilesHashDlg::OnBnClickedClean()
{
	if(!m_thrdData.threadWorking)
	{
		CString strBtnText;
		m_btnClr.GetWindowText(strBtnText);
		if(strBtnText.Compare(MAINDLG_CLEAR) == 0)
		{
			EnterCriticalSection(&g_criticalSection);
			{
				m_thrdData.strAll = _T("");
				m_thrdData.resultList.clear();
			
				m_editMain.SetWindowText(m_thrdData.strAll);
			}
			LeaveCriticalSection(&g_criticalSection);

			CStatic* pWnd =(CStatic *)GetDlgItem(IDC_STATIC_TIME);
			pWnd->SetWindowText(_T(""));
			pWnd = (CStatic*)GetDlgItem(IDC_STATIC_SPEED);
			pWnd->SetWindowText(_T(""));

			m_prog.SetPos(0);
			//m_progWhole.SetPos(0);
			SetWholeProgPos(0);
		}
		else if(strBtnText.Compare(MAINDLG_CLEAR_VERIFY) == 0)
		{
			m_bFind = FALSE; // 退出搜索模式
			m_btnClr.SetWindowText(MAINDLG_CLEAR);

			RefreshResult();
			RefreshMainText();
		}
	}
}
예제 #4
0
//---------------------------------------------------------------------------
void __fastcall TSearchFilesFrm::btResearchClick(TObject *Sender)
{
	m_FileSearch.ReSearch(GetSearchData());
	RefreshResult();
}