标签:style blog http color io os ar strong for
测试目的:对编辑器放大,缩小性能测试。
测试资源:一匹宝马。
测试结果:良好。
实现方法:通过调用本地保存的宝马文件,逐字逐行的显示在编辑器中,并放大,缩小。对不同的符号进行上色处理。
{/*LOOKBMW
_(\_/)
,((((^` (((( (6 \
,((((( , ,,,_ ,((((( /"._ ,`,
((((\\ ,... ,(((( / `-.-'
))) ;' `"'"'""(((( (
((( / ((( )) | |
(( | . ' |
)) \ _ ' `t ,.')
( | y;- -,-""'"-.\ \/
) / ./ ) / `\ |./ ( ( / /'
|| \\ //'|
|| \\ _//'||
|| )) |_/ ||
\_\ |_/ ||
`'" \_ `'"
$—LOOKBMW*/}
CStdioFile LookBmwFile;
CString bwmFilePath = Pack::GetConfigIniFile(_T("GlbBmwFilePath"));
if(!LookBmwFile.Open(bwmFilePath, CFile::modeRead | CFile::typeText))
{
MessageBox(_T("Loading files Error " + bwmFilePath + ", please reinstall the software..."));
}
CString strBmwTxt;
BOOL BwmTxtStart = false;
while(LookBmwFile.ReadString(strBmwTxt))
{
if(BwmTxtStart)
{
if(strBmwTxt == _T("$—LOOKBMW*/}")){
break;
}
CString str;
for(int i=0; i<strBmwTxt.GetLength(); i++)
{
str = (strBmwTxt[i]);
SendMessages(SCI_ADDTEXT, 1, (LPARAM)(LPCSTR)str);
UpdateWindow();
Sleep(15);
}
str = _T("\n");
SendMessages(SCI_ADDTEXT, 1, (LPARAM)(LPCSTR)str);
}
if(strBmwTxt.Trim() == _T("{/*LOOKBMW"))
{
BwmTxtStart = TRUE;
}
}
LookBmwFile.Close();
int j=3;
int i=5;
while(j--)
{
while(i--){
SendMessages(SCI_ZOOMIN, 0, 0);
UpdateWindow();
Sleep(70);
}
i=15;
while(i--){
SendMessages(SCI_ZOOMOUT, 0, 0);
UpdateWindow();
Sleep(70);
}
i=15;
}
i=10;
while(i--){
SendMessages(SCI_ZOOMIN, 0, 0);
UpdateWindow();
Sleep(70);
}
文/闫鑫原创 转载请注明出处http://blog.csdn.net/yxstars/article/details/39205345
标签:style blog http color io os ar strong for
原文地址:http://blog.csdn.net/yxstars/article/details/39205345