/// <summary> /// /// </summary> public void BeginStep(string strBeginString) { if (m_iStepPos == 0) { LOGs.WriteLine(LogMessageType.MSG_NOTICE, strBeginString); } }
/// <summary> /// /// </summary> public void EndStep(string strEndString) { if (m_IndicatingPos < 50) { m_IndicatingPos = 50; StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("[100%]"); strBuilder.Append("["); for (int iIndex = 0; iIndex < m_IndicatingLength; iIndex++) { strBuilder.Append(m_Fill); } strBuilder.Append("]"); LOGs.WriteLine(LogMessageType.MSG_INFO, strBuilder.ToString()); } LOGs.WriteLine(LogMessageType.MSG_NOTICE, strEndString); }
/// <summary> /// /// </summary> public void Step() { if (m_iMaximumStep <= 0) { return; } if (m_IndicatingPos == 0) { StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("[000%]"); strBuilder.Append('['); for (int iIndex = 0; iIndex < m_IndicatingLength; iIndex++) { strBuilder.Append(m_Empty); } strBuilder.Append("]"); LOGs.WriteLine(LogMessageType.MSG_LOAD, strBuilder.ToString()); } else if (m_IndicatingPos >= 50) { return; } m_iStepPos++; int iSN = (m_iStepPos * m_IndicatingLength) / m_iMaximumStep; if (iSN > m_IndicatingPos) { StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("[{0:000}%]"); strBuilder.Append("["); int iIndex; for (iIndex = 0; iIndex < iSN; iIndex++) { strBuilder.Append(m_Fill); } for ( ; iIndex < m_IndicatingLength; iIndex++) { strBuilder.Append(m_Empty); } float fPercent = (((float)iSN / (float)m_IndicatingLength) * 100); strBuilder.Append("]"); LOGs.WriteLine(LogMessageType.MSG_LOAD, string.Format(strBuilder.ToString(), (int)fPercent)); m_IndicatingPos = iSN; } if (m_IndicatingPos >= 50) { StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("[100%]"); strBuilder.Append("["); for (int iIndex = 0; iIndex < m_IndicatingLength; iIndex++) { strBuilder.Append(m_Fill); } strBuilder.Append("]"); LOGs.WriteLine(LogMessageType.MSG_INFO, strBuilder.ToString()); } }
public void LOGsConstructorTest() { LOGs target = new LOGs(); Assert.Inconclusive( "TODO: 实现用来验证目标的代码" ); }