Exemplo n.º 1
0
void DecodeDlg::DecodePreview() 
{
	CString lfn;

	EngineSetup();

	decoder->PostThreadMessage(ENG_CLEAR, 1, 0);	// Clear any existing list (and reset control)

	m_DecodeGo.SetLabel(IDS_CANCELBUTTON);

	InfoClear();

	HourGlass(true);

	m_DecodeList.SetSel(-1, FALSE);			// Clear all selections

	int rmax = m_DecodeList.GetCount();

	if (rmax == 0)
		return;

	TransferOptions(&decoder->UD);						// Copy options to the control

	CWaitCursor wai;

	if (SHOW_DEBUG)
		deBox.Init(&debugPosn);

	CString cpath = CurrentOutput();

	for (int row=0; row < rmax; row++)		// Step through the whole list
	{
		m_DecodeList.GetText(row, lfn);		// Read the filename

		if (clipboardSet && lfn == clipboardString)
		{
			cFile.Close();				// Make sure the temp is closed

			decoder->PostThreadMessage(ENG_DECODE, row,
				(LPARAM) (strdup((const char *) cFile)));
		}
		else
			decoder->PostThreadMessage(ENG_DECODE, row,
				(LPARAM) (strdup((const char *) lfn)));
	}

	decoder->PostThreadMessage(ENG_LOAD, 0, 0);

}
Exemplo n.º 2
0
void DIGENTRY DIPImpUnloadInfo( imp_image_handle *ii )
{
    InfoClear( ii );
    DCClose( ii->sym_file );
    UnloadInfo( ii );
}
Exemplo n.º 3
0
void DecodeDlg::DecodeGo() 
{

	if (m_DecodeOut.GetItemCount() == 0)
		return;

	InfoClear();

	CString cpath = CurrentOutput();
	int errct = 0;

	TransferOptions(&decoder->UD);

	decoder->UD.m_overwrite = TRUE;				// Force overwrite mode

	decoder->POE = (options[OPT_POE] != 0);		// Set Pause on Errors flag
//	decoder->OWrite = (options[OPT_OWRITE] != 0);	// Set Overwrite OK flag

	OnCommand(DO_NONE, 0);				// Unselect everything

	if (cpath.GetLength() > 3)			// More than just a drive spec
	{
		CString fname(cpath);

		if (fname[fname.GetLength() - 1] == '\\')
			fname = fname.Left(fname.GetLength() - 1);		// Remove trailing backslash

		CFileStatus fsta;

		if (!CFile::GetStatus(fname, fsta))
		{
			ArgMessageBox("Decode Files", MB_ICONEXCLAMATION | MB_OK,
				"Output directory:\r\n%s\r\ndoes not exist.", 
				(const char *) fname);
			return;
		}

		if (!(fsta.m_attribute & CFile::directory))
		{
			ArgMessageBox("Decode Files", MB_ICONEXCLAMATION | MB_OK,
				"Output path:\r\n%s\r\nis in use as a filename or is not a directory.",
				(const char *) fname);
			return;
		}
	}										// Directory test if

	int rmax = m_DecodeOut.GetItemCount();
	CString lfn;
	int ud_row;

	ri.AddMRU(&m_DecodePath, MAX_MRU);

	CWaitCursor wai;
	HourGlass(true);

	m_DecodeGo.SetLabel(IDS_CANCELBUTTON);

	cancelFlag = false;

	if (SHOW_DEBUG)
		deBox.Init(&debugPosn);

	decoder->PostThreadMessage(ENG_CLEAR, 0, 0);	// Waste any existing list, but don't reset

	for (int row=0; !cancelFlag && row < rmax; row++)		// Actually decode the files
	{
		ud_row = m_DecodeOut.GetItemData(row);	// The UUDeview row number

		if (decoder->UD.GetDFileFlags(ud_row) & 
				(CUud32acxCtrl::uudFileError | CUud32acxCtrl::uudFileDecoded))
			continue;					// Already processed

		lfn = cpath + m_DecodeOut.GetItemText(row, 0);		// The output filename

		decoder->PostThreadMessage(ENG_DECODE, (WPARAM) ud_row, (LPARAM) strdup(lfn));	// Add the file to decode
	}

	m_DecodeOut.ModifyStyle(0, LVS_SHOWSELALWAYS);

	decoder->PostThreadMessage(ENG_DECLIST, 0, 0);	// Start decoding....

}
Exemplo n.º 4
0
//
// Alter the buttons states, etc.
//
void DecodeDlg::SetState(enum MachineState ns, bool force)
{

	if (ns == State && !force)
		return;				// State is already set

	switch (ns) {
		case MS_CLEAR:
			m_DecodeGo.SetLabel(IDS_PREVIEW);
			SetToolTip(IDC_DECODEGO, IDS_DIS_CLEAR);
			m_DecodeGo.Disable();
			m_ClearDecode.Disable();
			m_RemoveDecode.Disable();
			m_DecodeInfo.Disable();
			m_RenameDecodeOut.Disable();
			m_RemoveDecodeOut.Disable();

			InfoClear();

			ClipboardKill();

			m_DecodeList.ResetContent();
			m_DecodeOut.DeleteAllItems();
			break;

		case MS_PREVIEW:
			m_DecodeGo.SetLabel(IDS_PREVIEW);
			SetToolTip(IDC_DECODEGO, IDS_DIS_PREVIEW);
			m_DecodeGo.Enable();
			m_ClearDecode.Enable();
			m_RemoveDecode.Disable();
			m_DecodeInfo.Disable();
			m_RenameDecodeOut.Disable();
			m_RemoveDecodeOut.Disable();

			InfoClear();

			m_DecodeOut.DeleteAllItems();
			break;

		case MS_GO:
			m_DecodeGo.SetLabel(IDS_GO);
			SetToolTip(IDC_DECODEGO, IDS_DIS_GO);
			m_DecodeGo.Enable();
			m_ClearDecode.Enable();
			m_RemoveDecode.Disable();
			m_DecodeInfo.Disable();
			m_RenameDecodeOut.Disable();
			m_RemoveDecodeOut.Disable();
			break;

		case MS_DONE:
			m_DecodeGo.SetLabel(IDS_PREVIEW);
			SetToolTip(IDC_DECODEGO, IDS_DIS_DONE);
			m_DecodeGo.Disable();
			m_ClearDecode.Enable();
			m_RemoveDecode.Disable();
			m_DecodeInfo.Disable();
			m_RenameDecodeOut.Disable();
			m_RemoveDecodeOut.Disable();
			break;

		}

	State = ns;

}
Exemplo n.º 5
0
void DIPIMPENTRY( UnloadInfo )( imp_image_handle *ii )
{
    InfoClear( ii );
    DCClose( ii->sym_fid );
    UnloadInfo( ii );
}