CString CReportEntityPicture::GetString() const
/* ============================================================
	Function :		CReportEntityPicture::GetString
	Description :	Creates a string representing this object.
	Access :		Public

	Return :		CString	-	Resulting string
	Parameters :	none

	Usage :			Call to save this object to file.

   ============================================================*/
{


	CRect rect = GetRect();

	double oldleft = GetLeft();
	double oldright = GetRight();
	double oldtop = GetTop();
	double oldbottom = GetBottom();

	double left = CUnitConversion::PixelsToInches( rect.left );
	double right = CUnitConversion::PixelsToInches( rect.right );
	double top = CUnitConversion::PixelsToInches( rect.top );
	double bottom = CUnitConversion::PixelsToInches( rect.bottom );

	CReportEntityPicture* const local = const_cast< CReportEntityPicture* const >( this );
	local->SetLeft( left );
	local->SetRight( right );
	local->SetTop( top );
	local->SetBottom( bottom );

	CString str;
	CString filename = GetFilename();
	MakeSaveString( filename );

	double thickness = CUnitConversion::PixelsToInches( GetBorderThickness() );
	str.Format( _T( ",%f,%i,%i,%s" ),
		thickness,
		GetBorderStyle( ),
		GetBorderColor( ),
		filename
		);

	str += _T( ";" );
	str = GetDefaultGetString() + str;

	local->SetLeft( oldleft );
	local->SetRight( oldright );
	local->SetTop( oldtop );
	local->SetBottom( oldbottom );

	return str;

}
示例#2
0
CString	CDiagramPort::GetString() const {
	CString str;

	bool lSerialPort0 = mSerialPort0;
	bool lSerialPort1 = mSerialPort1;
	bool lUSB = mUSB;
	bool lI2C = mI2C;
	bool lSPI = mSPI;
	bool lEthernet = mEthernet;

	str.Format(_T(",%i,%i,%i,%i,%i,%i;"), lSerialPort0,lSerialPort1,lUSB,lI2C,lSPI,lEthernet);

	str = GetDefaultGetString() + str;

	return str;
}