public System.Boolean checkContainKey() { System.Boolean bCheckRes = false; bCheckRes = false; if (m_strLine.Length <= 0) { return(bCheckRes); } //m_strLine = m_strLine.ToLower(); m_strLine = m_strLine.ToUpper(); m_strKey = m_strKey.ToUpper(); m_nECheckContainKey = checkContainKeyType(); if (ECheckContainKey.ECheckContainKey_ContainKey == m_nECheckContainKey) { bCheckRes = true; } else { bCheckRes = false; } return(bCheckRes); }
public ECheckContainKey checkContainKeyType(DataProcessParam pDataProcessParam) { ECheckContainKey nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; System.Int32 nIndexOfValue = -1; nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; nIndexOfValue = m_strLine.IndexOf(pDataProcessParam.m_strStringSrc); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_HaveKey; return(nECheckContainKey); } return(nECheckContainKey); }
public ECheckContainKey checkContainKeyType() { ECheckContainKey nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; System.Int32 nIndexOfValue = -1; nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; nIndexOfValue = m_strLine.IndexOf(m_strKey); if (-1 != nIndexOfValue) { //find key ok nECheckContainKey = ECheckContainKey.ECheckContainKey_ContainKey; return(nECheckContainKey); } return(nECheckContainKey); }
private System.String _CheckAndGetReplacedLine(System.String strLine, ECheckContainKey nECheckContainKey) { System.String strReplacedLine; switch (nECheckContainKey) { case ECheckContainKey.ECheckContainKey_NoKey: strReplacedLine = strLine; break; case ECheckContainKey.ECheckContainKey_ContainKey: strReplacedLine = _GetReplacedLineByKey(strLine, m_strFindWhat, m_strReplaceWith); break; default: strReplacedLine = strLine; break; } return(strReplacedLine); }
public System.Boolean checkContainKey(DataProcessParam pDataProcessParam) { System.Boolean bCheckRes = false; bCheckRes = false; if (m_strLine.Length <= 0) { return(bCheckRes); } //m_strLine = m_strLine.ToLower(); m_nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; m_nECheckContainKey = checkContainKeyType(pDataProcessParam); if (ECheckContainKey.ECheckContainKey_HaveKey == m_nECheckContainKey) { bCheckRes = true; } return(bCheckRes); }
private System.String _ProcessLineByType(System.String strLine, ECheckContainKey nECheckContainKey) { System.String strDestLine; System.String strOldValueForReplace; System.String strNewValueForReplace; System.String strNewValueForReplace_ta_int32 = " ta_int32 "; System.String strNewValueForReplace_ta_int32_Point = " ta_int32* "; System.String strNewValueForReplace_ta_uint32 = " ta_uint32 "; switch (nECheckContainKey) { case ECheckContainKey.ECheckContainKey_NoKey: strDestLine = strLine; break; case ECheckContainKey.ECheckContainKey_unsigned_Space_long: strOldValueForReplace = m_LineCheckContainKey.m_Key_unsigned_Space_long; strNewValueForReplace = strNewValueForReplace_ta_uint32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_unsigned_Space_Space_long: strOldValueForReplace = m_LineCheckContainKey.m_Key_unsigned_Space_Space_long; strNewValueForReplace = strNewValueForReplace_ta_uint32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_unsigned_Table_long: strOldValueForReplace = m_LineCheckContainKey.m_Key_unsigned_Table_long; strNewValueForReplace = strNewValueForReplace_ta_uint32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_long_space_int: strOldValueForReplace = m_LineCheckContainKey.m_Key_long_space_int; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_signed_space_long: strOldValueForReplace = m_LineCheckContainKey.m_Key_signed_space_long; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_Space_long_Space: strOldValueForReplace = m_LineCheckContainKey.m_Key_Space_long_Space; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_Table_long_Table: strOldValueForReplace = m_LineCheckContainKey.m_Key_Table_long_Table; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_Space_long_Table: strOldValueForReplace = m_LineCheckContainKey.m_Key_Space_long_Table; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_Table_long_Space: strOldValueForReplace = m_LineCheckContainKey.m_Key_Table_long_Space; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_long_Point: strOldValueForReplace = m_LineCheckContainKey.m_Key_long_Point; strNewValueForReplace = strNewValueForReplace_ta_int32_Point; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_long_Space: strOldValueForReplace = m_LineCheckContainKey.m_Key_long_Space; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; case ECheckContainKey.ECheckContainKey_long_Table: strOldValueForReplace = m_LineCheckContainKey.m_Key_long_Table; strNewValueForReplace = strNewValueForReplace_ta_int32; strDestLine = _Process_ECheckContainKey(strLine, strOldValueForReplace, strNewValueForReplace); break; default: strDestLine = strLine; break; } return(strDestLine); }
public void reSetLine(System.String strLine) { m_nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; m_strLine = strLine; }
public LineCheckContainKey(System.String strLine) { m_nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; m_strLine = strLine; }
public LineCheckContainKey() { m_nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; m_strLine = System.String.Empty; }
public ECheckContainKey checkContainKeyType() { ECheckContainKey nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; System.Int32 nIndexOfValue = -1; nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; nIndexOfValue = m_strLine.IndexOf(m_Key_long_space_long); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_unsigned_Space_long); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_unsigned_Space_long; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_unsigned_Space_Space_long); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_unsigned_Space_Space_long; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_unsigned_Table_long); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_unsigned_Table_long; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_long_space_int); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_long_space_int; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_signed_space_long); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_signed_space_long; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_Space_long_Space); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_Space_long_Space; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_Table_long_Table); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_Table_long_Table; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_Space_long_Table); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_Space_long_Table; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_Table_long_Space); if (-1 != nIndexOfValue) { nECheckContainKey = ECheckContainKey.ECheckContainKey_Table_long_Space; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_long_Point); if (-1 != nIndexOfValue) { System.Boolean bCheckCharBeforLongRes = false; bCheckCharBeforLongRes = _CheckCharBeforLong(m_strLine, nIndexOfValue); if (bCheckCharBeforLongRes) { nECheckContainKey = ECheckContainKey.ECheckContainKey_long_Point; return(nECheckContainKey); } nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_long_Space); if (-1 != nIndexOfValue) { System.Boolean bCheckCharBeforLongRes = false; bCheckCharBeforLongRes = _CheckCharBeforLong(m_strLine, nIndexOfValue); if (bCheckCharBeforLongRes) { nECheckContainKey = ECheckContainKey.ECheckContainKey_long_Space; return(nECheckContainKey); } nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; return(nECheckContainKey); } nIndexOfValue = m_strLine.IndexOf(m_Key_long_Table); if (-1 != nIndexOfValue) { System.Boolean bCheckCharBeforLongRes = false; bCheckCharBeforLongRes = _CheckCharBeforLong(m_strLine, nIndexOfValue); if (bCheckCharBeforLongRes) { nECheckContainKey = ECheckContainKey.ECheckContainKey_long_Table; return(nECheckContainKey); } nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; return(nECheckContainKey); } return(nECheckContainKey); }
public void resetValue(System.String strLine, System.String strKey) { m_nECheckContainKey = ECheckContainKey.ECheckContainKey_NoKey; m_strLine = strLine; m_strKey = strKey; }