smallarmy  
使用火狐狸试试看能不能行,我还是要试试看能否发图片上去。
代码能否插入呢?能否折叠代码呢?我再试试看。
void CScreenShot::CaptureL()
{
// If this still active, it means the active object is still busy.
// Tell the users to retry again in a few seconds.
if (IsActive())
{
User::Leave(KErrNotReady);
}

TInt additionalDelay = 0;
// For continuous mode, we have to give 4 seconds delay because we
// display dialog box at the beginning.
if (CScreenShotData::EModeOneShot != iScreenShotData.Mode())
{
additionalDelay = KDelayContinuous;
}

// Tells this active object there is an outstanding request.
switch (iScreenShotData.Delay())
{
case CScreenShotData::ENoDelay:
iScreenShotStatus = EWaiting;
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(
additionalDelay * KOneSecond));
SetActive();
break;

case CScreenShotData::EOneSecond:
iScreenShotStatus = EWaiting;
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(
(additionalDelay + 1) * KOneSecond));
SetActive();
break;

case CScreenShotData::EFiveSeconds:
iScreenShotStatus = EWaiting;
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(
(additionalDelay + 5) * KOneSecond));
SetActive();
break;

case CScreenShotData::ETenSeconds:
iScreenShotStatus = EWaiting;
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(
(additionalDelay + 10) * KOneSecond));
SetActive();
break;

case CScreenShotData::EThirtySeconds:
iScreenShotStatus = EWaiting;
iTimer.After(iStatus, TTimeIntervalMicroSeconds32(
(additionalDelay + 30) * KOneSecond));
SetActive();
break;

default:
User::Invariant();
}

iIsCapturing = ETrue;
}

posted on 2008-09-03 09:59  阿军  阅读(87)  评论(0)    收藏  举报