本文整理汇总了C++中CTimeSpan::GetHours方法的典型用法代码示例。如果您正苦于以下问题:C++ CTimeSpan::GetHours方法的具体用法?C++ CTimeSpan::GetHours怎么用?C++ CTimeSpan::GetHours使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTimeSpan
的用法示例。
在下文中一共展示了CTimeSpan::GetHours方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateItem
void CDialogToDoHistory::UpdateItem( int iItem )
{
DWORD dwId;
m_listTodoHistory.GetItemData(iItem,dwId);
ToDoTask todo = g_todoSet.GetToDo(dwId);
ATLASSERT(todo.id!=ToDoTask::ERROR_TASKID);
//改变的文字颜色
COLORREF clrBgn,clrText;
m_listTodoHistory.GetItemColours(iItem,m_iColCreateTime,clrBgn,clrText);
m_listTodoHistory.SetItemColours(iItem,m_iColCreateTime,clrBgn,RGB(0X66,0X66,0X66));
m_listTodoHistory.SetSubItemData(iItem,m_iColCreateTime,GlobeFuns::TimeToInt(todo.tmCreateTime));
m_listTodoHistory.SetItemText(iItem,m_iColTitle,todo.strTask.c_str());
m_listTodoHistory.SetItemText(iItem,m_iColPriority,ToDoTask::PriorityText(todo.priority));
m_listTodoHistory.SetItemColours(iItem,m_iColPriority,RGB(10,170-todo.priority*25,10),RGB(0,0,0));
m_listTodoHistory.SetSubItemData(iItem,m_iColPriority,todo.priority);
CString strTime;
if (todo.tmPlanFinshTime>=todo.tmCreateTime)
{
CTimeSpan ts = todo.tmPlanFinshTime-todo.tmCreateTime;
CString strTmp;
if (ts.GetDays()>0)
{
strTmp.Format("%d天",ts.GetDays());
strTime += strTmp;
}
if (ts.GetHours()>0)
{
strTmp.Format("%d时",ts.GetHours());
strTime += strTmp;
}
if (ts.GetDays()==0 //任务持续一天以上的,就不要精确到分钟了。
&& ts.GetMinutes()>0)
{
strTmp.Format("%d分",ts.GetMinutes());
strTime += strTmp;
}
if (strTime.IsEmpty())
{
strTmp.Format("%d秒",ts.GetSeconds());
strTime += strTmp;
}
m_listTodoHistory.SetSubItemData(iItem,m_iColTotleHours,GlobeFuns::TimeToInt(CTime(0)+ts));
}
else
{
strTime = "(无数据)";
}
m_listTodoHistory.SetItemText(iItem,m_iColTotleHours,strTime);
m_listTodoHistory.SetItemText(iItem,m_iColRemark,todo.strRemark.c_str());
}
示例2: ShowDuration
void SaveBinaryNoParsingDlg::ShowDuration(CTimeSpan ts, UINT id)
{
char buf[128];
//CTimeSpan ts = CTime::GetCurrentTime() - startTime;
if(ts.GetDays() > 0)
{
sprintf_s(buf, 128, "%d day(s) and %02d:%02d:%02d", (int)ts.GetDays(), (int)ts.GetHours(), (int)ts.GetMinutes(), (int)ts.GetSeconds());
}
else
{
sprintf_s(buf, 128, "%02d:%02d:%02d", (int)ts.GetHours(), (int)ts.GetMinutes(), (int)ts.GetSeconds());
}
GetDlgItem(id)->SetWindowText(buf);
}
示例3:
CString CTradeStatistic2::CalculateElapseTime()
{
CString strElapsedTime;
CTime tmNow = CTime::GetCurrentTime();
CTimeSpan tElapsed = tmNow - m_tmBegin;
strElapsedTime.Format("%d小时 %d分钟 %d秒", tElapsed.GetHours(), tElapsed.GetMinutes(), tElapsed.GetSeconds());
return strElapsedTime;
}
示例4: DLLBuildDone
void DLLBuildDone()
{
g_hToolThread = NULL;
CTime tEnd = CTime::GetCurrentTime();
CTimeSpan tElapsed = tEnd - g_tBegin;
CString strElapsed;
strElapsed.Format("Run time was %i hours, %i minutes and %i seconds", tElapsed.GetHours(), tElapsed.GetMinutes(), tElapsed.GetSeconds());
Sys_Printf(strElapsed.GetBuffer(0));
Pointfile_Check();
if (g_PrefsDlg.m_bRunQuake == TRUE)
{
char cCurDir[1024];
GetCurrentDirectory(1024, cCurDir);
CString strExePath = g_PrefsDlg.m_strQuake2;
CString strOrgPath;
CString strOrgFile;
ExtractPath_and_Filename(currentmap, strOrgPath, strOrgFile);
if (g_PrefsDlg.m_bSetGame == TRUE) // run in place with set game.. don't copy map
{
CString strBasePath = ValueForKey(g_qeglobals.d_project_entity, "basepath");
strExePath += " +set game ";
strExePath += strBasePath;
WinExec(strExePath, SW_SHOW);
}
else
{
CString strCopyPath = strExePath;
char* pBuffer = strCopyPath.GetBufferSetLength(_MAX_PATH + 1);
pBuffer[strCopyPath.ReverseFind('\\') + 1] = '\0';
strCopyPath.ReleaseBuffer();
SetCurrentDirectory(strCopyPath);
CString strOrgPath;
CString strOrgFile;
ExtractPath_and_Filename(currentmap, strOrgPath, strOrgFile);
AddSlash(strCopyPath);
FindReplace(strOrgFile, ".map", ".bsp");
strCopyPath += "\\baseq2\\maps\\";
strCopyPath += strOrgFile;
AddSlash(strOrgPath);
strOrgPath += strOrgFile;
bool bRun = (strOrgPath.CompareNoCase(strCopyPath) == 0);
if (!bRun)
bRun = (CopyFile(strOrgPath, strCopyPath, FALSE) == TRUE);
if (bRun)
{
FindReplace(strOrgFile, ".bsp", "");
strExePath += " +map ";
strExePath += strOrgFile;
WinExec(strExePath, SW_SHOW);
}
}
SetCurrentDirectory(cCurDir);
}
}
示例5: FormatElapsed
string VirtualListCtrlFT::FormatElapsed(CTimeSpan &span)
{
string ret;
char buf[4096];
if(span.GetTotalHours()==0) // < hour
{
sprintf(buf,"%u:%02u",span.GetMinutes(),span.GetSeconds());
}
else // > hour
{
sprintf(buf,"%u:%02u:%02u",span.GetHours(),span.GetMinutes(),span.GetSeconds());
}
ret=buf;
return ret;
}
示例6: SWait
void CPMotion::SWait(short Seconds) //waits n seconds
{
//OK
CTime WaitUntilTime = CTime::GetCurrentTime();
WaitUntilTime += CTimeSpan(0, 0, 0, Seconds);
bool done = false;
while (!done)
{
m_Robot->DoWindowMessages();
CTime StartTime = CTime::GetCurrentTime();
CTimeSpan TimeDiff = WaitUntilTime - StartTime;
if ((TimeDiff.GetHours() == 0) && (TimeDiff.GetMinutes() == 0) &&
(TimeDiff.GetSeconds() <= 0))
{
done = true;
}
}
}
示例7: RWait
bool CPMotion::RWait(short Seconds) //waits n seconds or exit on nudge
{
//OK
CTime WaitUntilTime = CTime::GetCurrentTime();
WaitUntilTime += CTimeSpan(0, 0, 0, Seconds);
bool done = false;
while ((!done) && (!(m_Robot->m_Nudged)))
{
m_Robot->DoWindowMessages();
CTime StartTime = CTime::GetCurrentTime();
CTimeSpan TimeDiff = WaitUntilTime - StartTime;
if ((TimeDiff.GetHours() == 0) && (TimeDiff.GetMinutes() == 0) &&
(TimeDiff.GetSeconds() <= 0))
{
done = true;
}
}
return (done || (m_Robot->m_Nudged)); // ||boolean
}
示例8: UpdateDuration
void CAddTimer::UpdateDuration()
{
CTimeSpan aday(1,0,0,0);
CTimeSpan tempduration;
CTime end, start;
UpdateData(TRUE);
//m_endtime.GetTime(end);
//m_starttime.GetTime(start);
end = m_endtimex;
start = m_starttimex;
if (end < start) end += aday;
tempduration = end - start;
//Only enable ok button if duration is greater than 0
if((tempduration.GetTotalSeconds() > 0) && (m_channellist.GetCurSel() != LB_ERR)){
m_ok.EnableWindow(TRUE);
}else{
m_ok.EnableWindow(FALSE);
}
CString temp;
if(tempduration.GetHours()>0) temp += tempduration.Format("%Hhr");
if(tempduration.GetMinutes()>0) temp += tempduration.Format("%Mmin");
//temp += duration.Format("%Ssec");
m_duration = temp;
//Get programme name from guide
CProgGuideDlg pgdlg(NULL,NULL);
m_progname = pgdlg.getProg(m_channellist.GetCurSel(),m_starttimex);
UpdateData(FALSE);
}
示例9: GetCurWndRecordTime
void CDLGPlaywin::GetCurWndRecordTime(char *rtime)
{
CTime nowtime=CTime::GetTickCount();
CTimeSpan ts = nowtime - m_video.record[m_curScreen].starttime;
sprintf(rtime,"%02d:%02d:%02d",ts.GetHours(),ts.GetMinutes(),ts.GetSeconds());
}
示例10: CheckBspProcess
void CheckBspProcess( void )
{
char outputpath[1024];
char temppath[512];
DWORD exitcode;
char* out;
BOOL ret;
if ( !bsp_process )
return;
ret = GetExitCodeProcess( bsp_process, &exitcode );
if ( !ret )
Error( "GetExitCodeProcess failed" );
if ( exitcode == STILL_ACTIVE )
return;
bsp_process = 0;
GetTempPath( 512, temppath );
sprintf( outputpath, "%sjunk.txt", temppath );
LoadFile( outputpath, ( void** )&out );
Sys_Printf( "%s", out );
Sys_Printf( "\ncompleted.\n" );
free( out );
CTime tEnd = CTime::GetCurrentTime();
CTimeSpan tElapsed = tEnd - g_tBegin;
CString strElapsed;
strElapsed.Format( "Run time was %i hours, %i minutes and %i seconds", tElapsed.GetHours(), tElapsed.GetMinutes(), tElapsed.GetSeconds() );
Sys_Printf( strElapsed.GetBuffer( 0 ) );
Sys_Beep();
Pointfile_Check();
// run game if no PointFile and pref is set
//++timo needs to stop after BSP if leaked .. does run through vis and light instead ..
if ( g_PrefsDlg.m_bRunQuake == TRUE && !g_qeglobals.d_pointfile_display_list )
{
char cCurDir[1024];
GetCurrentDirectory( 1024, cCurDir );
CString strExePath = "../../qio.exe";
//= g_PrefsDlg.m_strQuake2;
CString strOrgPath;
CString strOrgFile;
ExtractPath_and_Filename( currentmap, strOrgPath, strOrgFile );
if ( g_PrefsDlg.m_bSetGame == TRUE ) // run in place with set game.. don't copy map
{
CString strBasePath = ValueForKey( g_qeglobals.d_project_entity, "basepath" );
strExePath += " +set game ";
strExePath += strBasePath;
WinExec( strExePath, SW_SHOW );
}
else
{
CString strCopyPath = strExePath;
char* pBuffer = strCopyPath.GetBufferSetLength( _MAX_PATH + 1 );
pBuffer[strCopyPath.ReverseFind( '\\' ) + 1] = '\0';
strCopyPath.ReleaseBuffer();
SetCurrentDirectory( strCopyPath );
CString strOrgPath;
CString strOrgFile;
ExtractPath_and_Filename( currentmap, strOrgPath, strOrgFile );
AddSlash( strCopyPath );
FindReplace( strOrgFile, ".map", ".bsp" );
//++timo modified for Quake3 !!
strCopyPath += "baseq3\\maps\\";
strCopyPath += strOrgFile;
AddSlash( strOrgPath );
strOrgPath += strOrgFile;
bool bRun = ( strOrgPath.CompareNoCase( strCopyPath ) == 0 );
if ( !bRun )
bRun = ( CopyFile( strOrgPath, strCopyPath, FALSE ) == TRUE );
if ( bRun )
{
FindReplace( strOrgFile, ".bsp", "" );
strExePath += " +map ";
strExePath += strOrgFile;
WinExec( strExePath, SW_SHOW );
}
}
SetCurrentDirectory( cCurDir );
}
}
示例11: OnUpdate
//.........这里部分代码省略.........
else
bInserting = true; // different counts, must re-do list
if (bInserting)
pList.DeleteAllItems ();
// add all documents to the list
pos = App.m_pWorldDocTemplate->GetFirstDocPosition();
for (int nItem = 0; pos != NULL; nItem++)
{
CMUSHclientDoc* pDoc = (CMUSHclientDoc*) App.m_pWorldDocTemplate->GetNextDoc(pos);
if (bInserting)
pDoc->m_view_number = nItem + 1; // so we can use Ctrl+1 etc.
else
nItem = pDoc->m_view_number - 1; // use existing item number
CString strSeq;
CString strLines;
CString strNewLines;
CString strStatus;
CString strSince;
CString strDuration;
strSeq.Format ("%ld", pDoc->m_view_number);
strNewLines.Format ("%ld", pDoc->m_new_lines);
strLines.Format ("%ld", pDoc->m_total_lines);
// work out world status
strStatus = GetConnectionStatus (pDoc->m_iConnectPhase);
// when they connected
if (pDoc->m_iConnectPhase == eConnectConnectedToMud)
strSince = pDoc->FormatTime (pDoc->m_tConnectTime, "%#I:%M %p, %d %b");
else
strSince.Empty ();
// work out world connection duration
// first time spent in previous connections
CTimeSpan ts = pDoc->m_tsConnectDuration;
// now time spent connected in this session, if we are connected
if (pDoc->m_iConnectPhase == eConnectConnectedToMud)
ts += CTime::GetCurrentTime() - pDoc->m_tConnectTime;
if (ts.GetDays () > 0)
strDuration = ts.Format ("%Dd %Hh %Mm %Ss");
else
if (ts.GetHours () > 0)
strDuration = ts.Format ("%Hh %Mm %Ss");
else
if (ts.GetMinutes () > 0)
strDuration = ts.Format ("%Mm %Ss");
else
strDuration = ts.Format ("%Ss");
// sequence
if (bInserting)
pList.InsertItem (nItem, strSeq); // eColumnSeq
pList.SetItemText(nItem, eColumnMush, pDoc->m_mush_name);
pList.SetItemText(nItem, eColumnNew, strNewLines);
pList.SetItemText(nItem, eColumnLines, strLines);
pList.SetItemText(nItem, eColumnStatus, strStatus);
pList.SetItemText(nItem, eColumnSince, strSince);
pList.SetItemText(nItem, eColumnDuration, strDuration);
if (bInserting)
pList.SetItemData(nItem, (DWORD) pDoc);
LVITEM lvitem;
memset (&lvitem, 0, sizeof lvitem);
// update where tick goes
lvitem.iImage = 0;
if (pDoc->m_pActiveCommandView || pDoc->m_pActiveOutputView)
lvitem.iImage = 1; // show the tick
lvitem.mask = LVIF_IMAGE;
lvitem.iItem = nItem;
pList.SetItem (&lvitem);
} // end of searching for all documents
// make sure in same order that we left them
pList.SortItems (CompareFunc, m_reverse << 8 | m_last_col);
m_bUpdateLockout = FALSE;
} // end of CActivityView::OnUpdate
示例12: OnMouseMove
void COscillogram::OnMouseMove(UINT nFlags, CPoint point)
{
CStringArray valArray;
CDWordArray colArray;
CString strVal;
CRect mRect;
CClientDC dc(this);
float length; //鼠标位置绝对象素数
float gValue;
int oldMode;
int curCell; //所在单元格
CPen pen(PS_SOLID,0,RGB(0,0,0));
BOOL PtState = FALSE;
//(整个函数过程的功能)计算所有线所在单元格的数值
oldMode = dc.SetMapMode(MM_LOMETRIC);
SetOscillogramRect(&dc);
dc.SelectObject(&pen);
dc.SetROP2(R2_NOTXORPEN);
dc.DPtoLP(&point);
//如果 鼠标不在波形图内 或者 没有曲线 不做处理返回
if(!(point.x >= m_GridRect.left && point.x <= m_GridRect.right+3
&& point.y <= m_GridRect.top && point.y >= m_GridRect.bottom)
|| GetCurveCount() < 1 || m_showTitle == FALSE)
{
if(m_bPt.x != -1)
{
DrawMouseLine(&dc,m_bPt);
m_bPt =-1;
}
m_TitleTip.ShowWindow(SW_HIDE);
return;
}
//绘画跟随鼠标的十字线
if(m_bPt.x == -1)
{
m_bPt = point;
DrawMouseLine(&dc,point);
}
else
{
DrawMouseLine(&dc,m_bPt);
m_bPt = point;
DrawMouseLine(&dc,point);
}
//计算个单元格数值
length = (float)( point.x - m_GridRect.left );
curCell = (int)( length / m_xSpan );
if(!m_showTime)
{
float n1 = (m_xMaxVal - m_xMinVal)/(m_xCount-1);
float n2 = m_xMinVal + curCell*n1;
strVal.Format("%s: %.2f",m_xText,n2);
}
else
{
CTimeSpan m_xTimeSpan = 0;
CTimeSpan sc = m_endTime - m_beginTime;
CTime cnTime = m_beginTime;
double secCount = (sc.GetDays()*86400) + (sc.GetHours()*3600) +
(sc.GetMinutes()*60) + sc.GetSeconds();
secCount = secCount / (m_xCount-1);
int day = (int)secCount/86400; //天
secCount -= day*86400;
int hour = (int)secCount/3600; //小时
secCount -= hour*3600;
int minute = (int)secCount/60; //分钟
secCount -= minute*60;
int second = (int)secCount; //秒
m_xTimeSpan = CTimeSpan(day,hour,minute,second);
for(int j=0;j<curCell;j++)
cnTime += m_xTimeSpan;
strVal.Format("%s: %s",m_xText,cnTime.Format("%Y/%m/%d %H:%M:%S"));
}
colArray.Add(RGB(0,0,0));
valArray.Add(strVal);
for(int i=0;i<GetCurveCount();i++)
{
gValue = GetCurve(i)->ptVal.GetPointValue(curCell,PtState);
if(PtState)
strVal.Format("%s: %.2f",GetCurveName(i),gValue);
else
strVal.Format("%s: ",GetCurveName(i));
colArray.Add(GetCurve(i)->lColor);
valArray.Add(strVal);
}
//显示浮动窗体
dc.LPtoDP(&point);
dc.SetMapMode(oldMode);
//.........这里部分代码省略.........
示例13: DrawGrid
void COscillogram::DrawGrid(CDC *dc)
{
//_DrawGrid(dc);
CString tempStr;
CSize tempSzie;
int tempPos;
CFont m_cFont, *oldFont;
CPen pen(PS_SOLID,6,m_GridColor);
m_cFont.CreatePointFont(260,"宋体");//"Arial");
oldFont = dc->SelectObject(&m_cFont);
dc->SelectObject(&pen);
dc->SetTextColor(m_xyTextColor);
float m_xTemp = (float)m_GridRect.Width() / (m_xShowCount-1);
float m_yTemp = (float)m_GridRect.Height() / (m_yShowCount-1);
CTimeSpan m_xTimeSpan = 0;
if(m_showTime)
{
CTimeSpan sc = m_endTime - m_beginTime;
double secCount = (sc.GetDays()*86400) + (sc.GetHours()*3600) +
(sc.GetMinutes()*60) + sc.GetSeconds();
secCount = secCount / (m_xShowCount-1);
int day = (int)secCount/86400; //天
secCount -= day*86400;
int hour = (int)secCount/3600; //小时
secCount -= hour*3600;
int minute = (int)secCount/60; //分钟
secCount -= minute*60;
int second = (int)secCount; //秒
m_xTimeSpan = CTimeSpan(day,hour,minute,second);
}
for(int i=0;i<m_xShowCount;i++)
{
tempPos = m_GridRect.left + (int)(m_xTemp*i);
DotLine(dc, tempPos,
m_GridRect.top ,
tempPos ,
m_GridRect.bottom ,
m_GridColor );
if(!m_showTime)
tempStr.Format("%.2f",
(m_xMaxVal-m_xMinVal)/(m_xShowCount-1)
* i + m_xMinVal );
else
{
CTime cnTime = m_beginTime;;
for(int j=0;j<i;j++)
cnTime += m_xTimeSpan;
tempStr = cnTime.Format("%H:%M:%S");//%Y/%m/%d
}
tempSzie = dc->GetTextExtent(tempStr);
dc->TextOut(tempPos - tempSzie.cx/2 ,
m_GridRect.bottom - 15 ,
tempStr );
}
for(int j=0;j<m_yShowCount;j++)
{
tempPos = m_GridRect.top + (int)(m_yTemp*j);
DotLine(dc, m_GridRect.left ,
tempPos ,
m_GridRect.right ,
tempPos ,
m_GridColor );
tempStr.Format("%.2f",
(m_yMaxVal-m_yMinVal)/(m_yShowCount-1)
* (m_yShowCount-1-j) + m_yMinVal );
tempSzie = dc->GetTextExtent(tempStr);
dc->TextOut(m_GridRect.left - tempSzie.cx-15 ,
tempPos + tempSzie.cy/2 ,
tempStr );
}
//X轴文本
tempSzie = dc->GetTextExtent(m_xText);
dc->TextOut(m_GridRect.right + 15,m_GridRect.bottom + tempSzie.cy/2,m_xText);
//Y轴文本
tempSzie = dc->GetTextExtent(m_yText);
dc->TextOut(m_GridRect.left - tempSzie.cx/2,m_GridRect.top + tempSzie.cy + 15,m_yText);
//XY轴线
dc->MoveTo(m_GridRect.left,m_GridRect.top);
dc->LineTo(m_GridRect.left,m_GridRect.bottom);
dc->MoveTo(m_GridRect.left,m_GridRect.bottom);
//.........这里部分代码省略.........
示例14: OnClose
void CWorldSocket::OnClose(int nErrorCode)
{
bool bWasClosed = m_pDoc->m_iConnectPhase == eConnectNotConnected;
TRACE1 ("CWorldSocket::OnClose, error code %i\n", nErrorCode);
m_pDoc->m_iConnectPhase = eConnectDisconnecting;
m_pDoc->UpdateAllViews (NULL);
m_pDoc->MXP_Off (true); // turn off MXP now
// update button bar - make button red
if (m_pDoc->m_view_number >= 1 &&
m_pDoc->m_view_number <= 10)
Frame.OnUpdateBtnWorlds (m_pDoc->m_view_number, NULL);
// execute "disconnect" script
if (m_pDoc->m_ScriptEngine)
{
if (m_pDoc->SeeIfHandlerCanExecute (m_pDoc->m_strWorldDisconnect))
{
DISPPARAMS params = { NULL, NULL, 0, 0 };
long nInvocationCount = 0;
m_pDoc->ExecuteScript (m_pDoc->m_dispidWorldDisconnect,
m_pDoc->m_strWorldDisconnect,
eWorldAction,
"world disconnect",
"disconnecting from world",
params,
nInvocationCount);
}
} // end of executing disconnect script
m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_DISCONNECT);
// close log file if we auto-opened it
if (!m_pDoc->m_strAutoLogFileName.IsEmpty ())
m_pDoc->CloseLog ();
if (m_pDoc->m_bShowConnectDisconnect && !bWasClosed)
{
CTime theTime;
theTime = CTime::GetCurrentTime();
CString strConnected;
strConnected = theTime.Format (TranslateTime ("--- Disconnected on %A, %B %d, %Y, %#I:%M %p ---"));
m_pDoc->Note (strConnected);
// find time spent connected
CTimeSpan ts = CTime::GetCurrentTime() - m_pDoc->m_tConnectTime;
CString strDuration = TFormat ("--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---",
PLURAL ((long) ts.GetDays()),
PLURAL ((long) ts.GetHours()),
PLURAL ((long) ts.GetMinutes()),
PLURAL ((long) ts.GetSeconds()));
m_pDoc->Note (strDuration);
// and a horizontal rule
m_pDoc->m_pCurrentLine->flags = HORIZ_RULE;
m_pDoc->StartNewLine (true, 0);
} // end of message in world window wanted
CString strInfo = TFormat ("--- Received %i line%s, sent %i line%s.",
PLURAL (m_pDoc->m_nTotalLinesReceived),
PLURAL (m_pDoc->m_nTotalLinesSent)
);
m_pDoc->Note (strInfo);
strInfo = TFormat ("--- Output buffer has %i/%i line%s in it (%.1f%% full).",
m_pDoc->m_LineList.GetCount (),
m_pDoc->m_maxlines,
(m_pDoc->m_LineList.GetCount ()) == 1 ? "" : "s",
(double) m_pDoc->m_LineList.GetCount () / (double) m_pDoc->m_maxlines * 100.0
);
m_pDoc->Note (strInfo);
strInfo = TFormat ("--- Matched %i trigger%s, %i alias%s, and %i timer%s fired.",
PLURAL (m_pDoc->m_iTriggersMatchedThisSessionCount),
PLURALES (m_pDoc->m_iAliasesMatchedThisSessionCount),
PLURAL (m_pDoc->m_iTimersFiredThisSessionCount)
);
m_pDoc->Note (strInfo);
CString str;
str = TFormat ("The \"%s\" server has closed the connection",
(const char *) m_pDoc->m_mush_name);
if (App.m_bNotifyOnDisconnect && !m_pDoc->m_bDisconnectOK)
{
//.........这里部分代码省略.........