コード例 #1
0
ファイル: DLGhdddelete.cpp プロジェクト: a1324yn/zogvm
void CDLGhdddelete::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	int i;

	char str[32];
	int check;

		SQLDB.Begin();
	for( i=0;i<m_list.GetItemCount();i++)
	{
		m_list.GetItemText(i,6,str,32);
		check=m_list.GetCheck(i);

		if(check)
		{
			SQLDB.File_DeleteforHdd(_atoi64(str));
			SQLDB.Hdd_DeleteforHdd(_atoi64(str));
			SQLDB.Dir_DeleteforHdd(_atoi64(str));
		}
	}
		SQLDB.Commit();

	MessageBox(ConvertString("删除完毕"),NULL);

	hddList.clear();
	SQLDB.Hdd_Read(hddList);
	DisplayerList() ;

}
コード例 #2
0
ファイル: zogvmDlg.cpp プロジェクト: dulton/brpj
void CZogvmDlg::OnButtonBuild() 
{
	// TODO: Add your control notification handler code here
	GetDlgItem(IDC_BUTTON_BUILD)->EnableWindow(FALSE);


aaaa=GetTickCount();
	SQLDB.Begin();
	SQLDB.Hdd_SetNonsert();
	CDLGHdd::Add27HDDid();
	SQLDB.Commit();

	hddList.clear();
	//几个硬盘开几个线程
	SQLDB.Hdd_Read(hddList);
	
	bool flag=false;
	list<struct HDD_ST>::iterator beglist;

	for(beglist=hddList.begin();beglist!=hddList.end();beglist++)
	{
		beglist->dealstep=DEALSTEP_ALL_END;
		if(beglist->insertflag && beglist->enable)
		{
			flag=true;
			beglist->dealstep=DEALSTEP_START;
			CreateThread(NULL,0,BuildThreadPROC,(void*)&(*beglist),0,NULL);
		}
	}

	if(false == flag)
		GetDlgItem(IDC_BUTTON_BUILD)->EnableWindow(TRUE);

}
コード例 #3
0
ファイル: zogvm.cpp プロジェクト: dulton/brpj
BOOL CZogvmApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	GetCurrentDirectory(MAX_PATH, CurrentDir);


	SQLDB.OpenDB("zogvm.db");
	SQLDB.ZiDian_CreateTable();
	SQLDB.Type_CreateTable();
	SQLDB.Type_AddAll();
	SQLDB.Hdd_CreateTable();
	SQLDB.File_CreateTable();
	SQLDB.File_CreateView();
	SQLDB.Double_CreateTable();
	

	SQLDB.Begin();
	SQLDB.File_SetNoFlagAll();
	SQLDB.Hdd_SetNonsert();
	CDLGHdd::Add27HDDid();
	SQLDB.Commit();



	CZogvmDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

	SQLDB.CloseDB();

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}
コード例 #4
0
ファイル: DLGhdddelete.cpp プロジェクト: a1324yn/zogvm
void CDLGhdddelete::OnBnClickedButtonDeleteDouble()
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);

	SQLDB.Begin();
	SQLDB.Double_DeleteAll();
	SQLDB.File_CleanDouble2Zero();
	SQLDB.Commit();

	MessageBox(ConvertString("删除完毕"),NULL);
}
コード例 #5
0
ファイル: zogvmDlg.cpp プロジェクト: dulton/brpj
void CZogvmDlg::OnButtonBuild() 
{
	// TODO: Add your control notification handler code here
	GetDlgItem(IDC_BUTTON_BUILD)->EnableWindow(FALSE);
aaaa=GetTickCount();
	SQLDB.Begin();
	SQLDB.Hdd_SetNonsert();
	CDLGHdd::Add27HDDid();
	SQLDB.Commit();
	
	CreateThread(NULL,0,BuildThreadPROC,(void*)this,0,NULL);

}
コード例 #6
0
ファイル: zogvmDlg.cpp プロジェクト: dulton/brpj
void CZogvmDlg::OnBnClickedButtonTrashClean()
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);

	if(	MODE_TRASH==ModeFlag)
	{
		if(!m_c_delete_trash)
		{
			MessageBox("不小心点到的吧?真的要删,请勾选 真的删");
			return ;
		}

		WinfileviewList.clear();

		SQLDB.File_ReadTrash(WinfileviewList,0,PAGE_MAX_NUM);

		if(WinfileviewList.size()>0)
		{
			list<struct FILE_VIEW_ST>::iterator beglist;
			char str[512];
			
			SQLDB.Begin();
			for(beglist=WinfileviewList.begin();beglist!=WinfileviewList.end();beglist++)
			{
				if(beglist->hdd_data.insertflag)
				{
					sprintf(str,"%s%s%s",beglist->hdd_data.area,beglist->file_data.path,beglist->file_data.name);
					DeleteFile(str);
					SQLDB.File_Delete(beglist->file_data.file_nid);
				}
			}
			SQLDB.Commit();
		}
		MessageBox("本页清理完毕");

	}
	else
		MessageBox("不是 垃圾文件 模式,按钮无效");

	m_c_delete_trash=FALSE;
	UpdateData(FALSE);
}
コード例 #7
0
ファイル: DLGFileType.cpp プロジェクト: dulton/brpj
void CDLGFileType::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	int i;
	
	char str[32];
	int check;

	SQLDB.Begin();
	for( i=0;i<m_list_video.GetItemCount();i++)
	{
		m_list_video.GetItemText(i,1,str,32);
		check=m_list_video.GetCheck(i);
		SQLDB.Type_ModifyEnable(str,check);
	}
	for( i=0;i<m_list_music.GetItemCount();i++)
	{
		m_list_music.GetItemText(i,1,str,32);
		check=m_list_music.GetCheck(i);
		SQLDB.Type_ModifyEnable(str,check);
	}
	for( i=0;i<m_list_sub.GetItemCount();i++)
	{
		m_list_sub.GetItemText(i,1,str,32);
		check=m_list_sub.GetCheck(i);
		SQLDB.Type_ModifyEnable(str,check);
	}
	for( i=0;i<m_list_other.GetItemCount();i++)
	{
		m_list_other.GetItemText(i,1,str,32);
		check=m_list_other.GetCheck(i);
		SQLDB.Type_ModifyEnable(str,check);
	}
	SQLDB.Commit();

	typeList.clear();
	CDialog::OnOK();
}